Browse Source

Fixed message for exception thrown during recursive merge

During recursive merge jgit potentially has to merge multiple
common ancestors. If this fails because there are conflicts then
the exception thrown for that should have a message which states
this clearly. Previously a wrong message was given ("More than 200
merge bases ...")

Change-Id: Ia3c058d5575decdefd50390ed83b63668d31c1d1
stable-3.5
Christian Halstrick 11 years ago
parent
commit
289b7c60a9
  1. 1
      org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties
  2. 1
      org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java
  3. 6
      org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java

1
org.eclipse.jgit/resources/org/eclipse/jgit/internal/JGitText.properties

@ -311,6 +311,7 @@ mergeConflictOnNotes=Merge conflict on note {0}. base = {1}, ours = {2}, theirs
mergeStrategyAlreadyExistsAsDefault=Merge strategy "{0}" already exists as a default strategy mergeStrategyAlreadyExistsAsDefault=Merge strategy "{0}" already exists as a default strategy
mergeStrategyDoesNotSupportHeads=merge strategy {0} does not support {1} heads to be merged into HEAD mergeStrategyDoesNotSupportHeads=merge strategy {0} does not support {1} heads to be merged into HEAD
mergeUsingStrategyResultedInDescription=Merge of revisions {0} with base {1} using strategy {2} resulted in: {3}. {4} mergeUsingStrategyResultedInDescription=Merge of revisions {0} with base {1} using strategy {2} resulted in: {3}. {4}
mergeRecursiveConflictsWhenMergingCommonAncestors=Multiple common ancestors were found and merging them resulted in a conflict: {0}, {1}
mergeRecursiveReturnedNoCommit=Merge returned no commit:\n Depth {0}\n Head one {1}\n Head two {2} mergeRecursiveReturnedNoCommit=Merge returned no commit:\n Depth {0}\n Head one {1}\n Head two {2}
mergeRecursiveTooManyMergeBasesFor = "More than {0} merge bases for:\n a {1}\n b {2} found:\n count {3}" mergeRecursiveTooManyMergeBasesFor = "More than {0} merge bases for:\n a {1}\n b {2} found:\n count {3}"
messageAndTaggerNotAllowedInUnannotatedTags = Unannotated tags cannot have a message or tagger messageAndTaggerNotAllowedInUnannotatedTags = Unannotated tags cannot have a message or tagger

1
org.eclipse.jgit/src/org/eclipse/jgit/internal/JGitText.java

@ -370,6 +370,7 @@ public class JGitText extends TranslationBundle {
/***/ public String mergeStrategyAlreadyExistsAsDefault; /***/ public String mergeStrategyAlreadyExistsAsDefault;
/***/ public String mergeStrategyDoesNotSupportHeads; /***/ public String mergeStrategyDoesNotSupportHeads;
/***/ public String mergeUsingStrategyResultedInDescription; /***/ public String mergeUsingStrategyResultedInDescription;
/***/ public String mergeRecursiveConflictsWhenMergingCommonAncestors;
/***/ public String mergeRecursiveReturnedNoCommit; /***/ public String mergeRecursiveReturnedNoCommit;
/***/ public String mergeRecursiveTooManyMergeBasesFor; /***/ public String mergeRecursiveTooManyMergeBasesFor;
/***/ public String messageAndTaggerNotAllowedInUnannotatedTags; /***/ public String messageAndTaggerNotAllowedInUnannotatedTags;

6
org.eclipse.jgit/src/org/eclipse/jgit/merge/RecursiveMerger.java

@ -203,10 +203,8 @@ public class RecursiveMerger extends ResolveMerger {
throw new NoMergeBaseException( throw new NoMergeBaseException(
NoMergeBaseException.MergeBaseFailureReason.CONFLICTS_DURING_MERGE_BASE_CALCULATION, NoMergeBaseException.MergeBaseFailureReason.CONFLICTS_DURING_MERGE_BASE_CALCULATION,
MessageFormat.format( MessageFormat.format(
JGitText.get().mergeRecursiveTooManyMergeBasesFor, JGitText.get().mergeRecursiveConflictsWhenMergingCommonAncestors,
Integer.valueOf(MAX_BASES), a.name(), currentBase.getName(), nextBase.getName()));
b.name(),
Integer.valueOf(baseCommits.size())));
} }
} finally { } finally {
inCore = oldIncore; inCore = oldIncore;

Loading…
Cancel
Save