[JGIT PATCH 0/8] Crude merge support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This series add some basic merge support to JGit.  Its more of a
"merge toolkit" than a merge implementation.  I have about 200
lines of code in another codebase that calls this stuff in JGit to
actually make a merge.  Eventually I hope to migrate a lot of that
code back into JGit, but for now its not here as I'm not entirely
sure what API merge applications need, and how much of that code
is application specific and how much of it should be core to JGit.

FWIW, that code will be open-sourced soon-ish too.  But I really
think a lot of it belongs in JGit, so it will probably migrate over.

No unit tests yet.  Yea, I know.  I've had this done and in use
for about 3 or 4 weeks now.  I just couldn't find the time to get
the Javadoc cleaned up to post to the list for comments, let alone
write unit tests.

But it does add the missing "write-tree" support to DirCache. :)

Shawn O. Pearce (8):
  Expose the raw path for the current entry of a TreeWalk
  Expose DirCacheEntry.getFileMode as a utility function
  Add writeTree support to DirCache
  Allow a DirCache to be created with no backing store file
  Allow CanonicalTreeParsers to be created with a UTF-8 path prefix
  Recursively load an entire tree into a DirCacheBuilder
  Allow DirCacheEntry instances to be created with stage > 0
  Define a basic merge API, and a two-way tree merge strategy

 .../src/org/spearce/jgit/dircache/DirCache.java    |   37 ++++
 .../org/spearce/jgit/dircache/DirCacheBuilder.java |   58 ++++++
 .../org/spearce/jgit/dircache/DirCacheEntry.java   |   61 +++++-
 .../org/spearce/jgit/dircache/DirCacheTree.java    |  115 +++++++++++
 .../spearce/jgit/errors/UnmergedPathException.java |   67 +++++++
 .../src/org/spearce/jgit/lib/FileMode.java         |    7 +
 .../src/org/spearce/jgit/lib/ObjectWriter.java     |   12 +-
 .../src/org/spearce/jgit/merge/MergeStrategy.java  |  134 +++++++++++++
 .../src/org/spearce/jgit/merge/Merger.java         |  207 ++++++++++++++++++++
 .../org/spearce/jgit/merge/StrategyOneSided.java   |   98 +++++++++
 .../jgit/merge/StrategySimpleTwoWayInCore.java     |  179 +++++++++++++++++
 .../jgit/treewalk/AbstractTreeIterator.java        |   31 +++
 .../spearce/jgit/treewalk/CanonicalTreeParser.java |   28 +++
 .../src/org/spearce/jgit/treewalk/TreeWalk.java    |   17 ++-
 14 files changed, 1041 insertions(+), 10 deletions(-)
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/errors/UnmergedPathException.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/merge/MergeStrategy.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/merge/Merger.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/merge/StrategyOneSided.java
 create mode 100644 org.spearce.jgit/src/org/spearce/jgit/merge/StrategySimpleTwoWayInCore.java

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux