/** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) { return new RecursiveMerger(inserter, config); }
/** * {@inheritDoc} * <p> * Get a single base commit for two given commits. If the two source commits * have more than one base commit recursively merge the base commits * together until you end up with a single base commit. */ @Override protected RevCommit getBaseCommit(RevCommit a, RevCommit b) throws IncorrectObjectTypeException, IOException { return getBaseCommit(a, b, 0); }
Integer.valueOf(baseCommits.size()))); parents.add(nextBase); RevCommit bc = getBaseCommit(currentBase, nextBase, callDepth + 1); AbstractTreeIterator bcTree = (bc == null) ? new EmptyTreeIterator() : openTree(bc.getTree()); if (mergeTrees(bcTree, currentBase.getTree(), nextBase.getTree(), true)) currentBase = createCommitForTree(resultTree, parents); else throw new NoMergeBaseException(
/** * Create a new commit by explicitly specifying the content tree and the * parents. The commit message is not set and author/committer are set to * the current user. * * @param tree * the tree this commit should capture * @param parents * the list of parent commits * @return a new commit visible only within this merger's RevWalk. * @throws IOException */ private RevCommit createCommitForTree(ObjectId tree, List<RevCommit> parents) throws IOException { CommitBuilder c = new CommitBuilder(); c.setTreeId(tree); c.setParentIds(parents); c.setAuthor(mockAuthor(parents)); c.setCommitter(c.getAuthor()); return RevCommit.parse(walk, c.build()); }
Integer.valueOf(baseCommits.size()))); parents.add(nextBase); RevCommit bc = getBaseCommit(currentBase, nextBase, callDepth + 1); AbstractTreeIterator bcTree = (bc == null) ? new EmptyTreeIterator() : openTree(bc.getTree()); if (mergeTrees(bcTree, currentBase.getTree(), nextBase.getTree(), true)) currentBase = createCommitForTree(resultTree, parents); else throw new NoMergeBaseException(
/** * Create a new commit by explicitly specifying the content tree and the * parents. The commit message is not set and author/committer are set to * the current user. * * @param tree * the tree this commit should capture * @param parents * the list of parent commits * @return a new commit visible only within this merger's RevWalk. * @throws IOException */ private RevCommit createCommitForTree(ObjectId tree, List<RevCommit> parents) throws IOException { CommitBuilder c = new CommitBuilder(); c.setTreeId(tree); c.setParentIds(parents); c.setAuthor(mockAuthor(parents)); c.setCommitter(c.getAuthor()); return RevCommit.parse(walk, c.build()); }
Integer.valueOf(baseCommits.size()))); parents.add(nextBase); RevCommit bc = getBaseCommit(currentBase, nextBase, callDepth + 1); AbstractTreeIterator bcTree = (bc == null) ? new EmptyTreeIterator() : openTree(bc.getTree()); if (mergeTrees(bcTree, currentBase.getTree(), nextBase.getTree(), true)) currentBase = createCommitForTree(resultTree, parents); else throw new NoMergeBaseException(
/** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db, boolean inCore) { return new RecursiveMerger(db, inCore); }
/** * {@inheritDoc} * <p> * Get a single base commit for two given commits. If the two source commits * have more than one base commit recursively merge the base commits * together until you end up with a single base commit. */ @Override protected RevCommit getBaseCommit(RevCommit a, RevCommit b) throws IncorrectObjectTypeException, IOException { return getBaseCommit(a, b, 0); }
/** * Create a new commit by explicitly specifying the content tree and the * parents. The commit message is not set and author/committer are set to * the current user. * * @param tree * the tree this commit should capture * @param parents * the list of parent commits * @return a new commit visible only within this merger's RevWalk. * @throws IOException */ private RevCommit createCommitForTree(ObjectId tree, List<RevCommit> parents) throws IOException { CommitBuilder c = new CommitBuilder(); c.setTreeId(tree); c.setParentIds(parents); c.setAuthor(mockAuthor(parents)); c.setCommitter(c.getAuthor()); return RevCommit.parse(walk, c.build()); }
/** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db) { return new RecursiveMerger(db, false); }
/** * Get a single base commit for two given commits. If the two source commits * have more than one base commit recursively merge the base commits * together until you end up with a single base commit. * * @throws IOException * @throws IncorrectObjectTypeException */ @Override protected RevCommit getBaseCommit(RevCommit a, RevCommit b) throws IncorrectObjectTypeException, IOException { return getBaseCommit(a, b, 0); }
/** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db) { return new RecursiveMerger(db, false); }
/** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(ObjectInserter inserter, Config config) { return new RecursiveMerger(inserter, config); }
/** {@inheritDoc} */ @Override public ThreeWayMerger newMerger(Repository db, boolean inCore) { return new RecursiveMerger(db, inCore); }
@Override public ThreeWayMerger newMerger(Repository db) { return new RecursiveMerger(db, false); }
@Override public ThreeWayMerger newMerger(Repository db, boolean inCore) { return new RecursiveMerger(db, inCore); }