org.eclipse.jgit.api.MergeCommand .
| Modifier and Type | Class and Description |
|---|---|
| public static enum | MergeResult.
The status the merge resulted in. |
| Modifier and Type | Field and Description |
|---|---|
| private ObjectId | |
| private List | |
| private Map | |
| private String | |
| private Map | |
| private ObjectId[] | |
| private MergeResult. | |
| private MergeStrategy | |
| private ObjectId |
| Access | Constructor and Description |
|---|---|
| public | MergeResult(ObjectId
the object the head points at after the merge newHead, ObjectId the common base which was used to produce a content-merge. May
be base, ObjectId[] null if the merge-result was produced without
computing a common baseall the commits which have been merged together mergedCommits, MergeResult.the status the merge resulted in mergeStatus,the used mergeStrategy, Map<String, MergeResult<?>> org.merge results as returned by
lowLevelResults)org.Constructor for MergeResult. |
| public | MergeResult(ObjectId
the object the head points at after the merge newHead, ObjectId the common base which was used to produce a content-merge. May
be base, ObjectId[] null if the merge-result was produced without
computing a common baseall the commits which have been merged together mergedCommits, MergeResult.the status the merge resulted in mergeStatus,the used mergeStrategy, Map<String, MergeResult<?>> org.merge results as returned by
lowLevelResults, String org.a user friendly description of the merge result description)Constructor for MergeResult. |
| public | MergeResult(ObjectId
the object the head points at after the merge newHead, ObjectId the common base which was used to produce a content-merge. May
be base, ObjectId[] null if the merge-result was produced without
computing a common baseall the commits which have been merged together mergedCommits, MergeResult.the status the merge resulted in mergeStatus,the used mergeStrategy, Map<String, MergeResult<?>> org.merge results as returned by
lowLevelResults, Map<String, ResolveMerger.org.list of paths causing this merge to fail as returned by
failingPaths,org.a user friendly description of the merge result description)Constructor for MergeResult. |
| public | MergeResult(List<String>
the conflicting files checkoutConflicts)Creates a new result that represents a checkout conflict before the operation even started for real. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addConflict(String
path of the file to add a conflict for path, int[][] the conflicts to set conflictingRanges)Add a conflict |
| public void | addConflict(String
path of the file to add a conflict for path, MergeResult<?> lowLevelResult)Add a conflict |
| public ObjectId | Returns: base the common base which was used to produce a content-merge. May benull if the merge-result was produced without
computing a common baseGet the common base |
| public List | Returns: the list of files that caused the checkout conflict.Returns a list of paths that cause a checkout conflict. |
| public Map | Returns: the conflicts ornull if no conflict occurredReturns information about the conflicts which occurred during a
|
| public Map | Returns: the list of paths causing this merge to fail ornull
if no failure occurredReturns a list of paths causing this merge to fail as returned by
|
| public ObjectId[] | Returns: all the commits which have been merged togetherGet the commits which have been merged |
| public MergeResult. | |
| public ObjectId | Returns: the object the head points at after the mergeGet the object the head points at after the merge |
| public void | |
| public String |
| base | back to summary |
|---|---|
| private ObjectId base | |
| checkoutConflicts | back to summary |
|---|---|
| private List<String> checkoutConflicts | |
| conflicts | back to summary |
|---|---|
| private Map<String, int[][]> conflicts | |
| description | back to summary |
|---|---|
| private String description | |
| failingPaths | back to summary |
|---|---|
| private Map<String, ResolveMerger. | |
| mergedCommits | back to summary |
|---|---|
| private ObjectId[] mergedCommits | |
| mergeStatus | back to summary |
|---|---|
| private MergeResult. | |
| mergeStrategy | back to summary |
|---|---|
| private MergeStrategy mergeStrategy | |
| newHead | back to summary |
|---|---|
| private ObjectId newHead | |
| MergeResult | back to summary |
|---|---|
| public MergeResult(ObjectId newHead, ObjectId base, ObjectId[] mergedCommits, MergeResult. Constructor for MergeResult.
| |
| MergeResult | back to summary |
|---|---|
| public MergeResult(ObjectId newHead, ObjectId base, ObjectId[] mergedCommits, MergeResult. Constructor for MergeResult.
| |
| MergeResult | back to summary |
|---|---|
| public MergeResult(ObjectId newHead, ObjectId base, ObjectId[] mergedCommits, MergeResult. Constructor for MergeResult.
| |
| MergeResult | back to summary |
|---|---|
| public MergeResult(List<String> checkoutConflicts) Creates a new result that represents a checkout conflict before the operation even started for real. | |
| addConflict | back to summary |
|---|---|
| public void addConflict(String path, int[][] conflictingRanges) Add a conflict
| |
| addConflict | back to summary |
|---|---|
| public void addConflict(String path, MergeResult<?> lowLevelResult) Add a conflict
| |
| getBase | back to summary |
|---|---|
| public ObjectId getBase() Get the common base
| |
| getCheckoutConflicts | back to summary |
|---|---|
| public List Returns a list of paths that cause a checkout conflict. These paths prevent the operation from even starting. | |
| getConflicts | back to summary |
|---|---|
| public Map Returns information about the conflicts which occurred during a
If the returned value contains a mapping "path"->[x][y]=z then this means
Example code how to parse this data:
MergeResult m=...;
Map<String, int[][]> allConflicts = m.getConflicts();
for (String path : allConflicts.keySet()) {
int[][] c = allConflicts.get(path);
System.out.println("Conflicts in file " + path);
for (int i = 0; i < c.length; ++i) {
System.out.println(" Conflict #" + i);
for (int j = 0; j < (c[i].length) - 1; ++j) {
if (c[i][j] >= 0)
System.out.println(" Chunk for "
+ m.getMergedCommits()[j] + " starts on line #"
+ c[i][j]);
}
}
}
| |
| getFailingPaths | back to summary |
|---|---|
| public Map Returns a list of paths causing this merge to fail as returned by
| |
| getMergedCommits | back to summary |
|---|---|
| public ObjectId[] getMergedCommits() Get the commits which have been merged
| |
| getMergeStatus | back to summary |
|---|---|
| public MergeResult. Get the merge status
| |
| getNewHead | back to summary |
|---|---|
| public ObjectId getNewHead() Get the object the head points at after the merge
| |
| setConflicts | back to summary |
|---|---|
| public void setConflicts(Map<String, int[][]> conflicts) Set conflicts | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non-
| |
| Modifier and Type | Field and Description |
|---|---|
| public static final MergeResult. | ABORTED
Merge was aborted |
| public static final MergeResult. | ALREADY_UP_TO_DATE
Already up to date, merge was a no-op |
| public static final MergeResult. | CHECKOUT_CONFLICT
Status representing a checkout conflict, meaning that nothing could be merged, as the pre-scan for the trees already failed for certain files (i.e. local modifications prevent checkout of files). |
| public static final MergeResult. | CONFLICTING
Merge raised conflicts to be resolved |
| public static final MergeResult. | FAILED
Merge failed |
| public static final MergeResult. | FAST_FORWARD
Merge is a fast-forward |
| public static final MergeResult. | FAST_FORWARD_SQUASHED
Merge is a fast-forward, squashed |
| public static final MergeResult. | MERGED
Merged |
| public static final MergeResult. | MERGED_NOT_COMMITTED
Merged, not committed |
| public static final MergeResult. | MERGED_SQUASHED
Merged, squashed, not updating HEAD |
| public static final MergeResult. | MERGED_SQUASHED_NOT_COMMITTED
Merged, squashed, not committed |
| public static final MergeResult. | NOT_SUPPORTED
Not yet supported |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public abstract boolean | Returns: whether the status indicates a successful resultWhether the merge was successful |
| public static MergeResult. | |
| public static MergeResult. |
| ABORTED | back to summary |
|---|---|
| public static final MergeResult. Merge was aborted
| |
| ALREADY_UP_TO_DATE | back to summary |
|---|---|
| public static final MergeResult. Already up to date, merge was a no-op | |
| CHECKOUT_CONFLICT | back to summary |
|---|---|
| public static final MergeResult. Status representing a checkout conflict, meaning that nothing could be merged, as the pre-scan for the trees already failed for certain files (i.e. local modifications prevent checkout of files). | |
| CONFLICTING | back to summary |
|---|---|
| public static final MergeResult. Merge raised conflicts to be resolved | |
| FAILED | back to summary |
|---|---|
| public static final MergeResult. Merge failed | |
| FAST_FORWARD | back to summary |
|---|---|
| public static final MergeResult. Merge is a fast-forward | |
| FAST_FORWARD_SQUASHED | back to summary |
|---|---|
| public static final MergeResult. Merge is a fast-forward, squashed
| |
| MERGED | back to summary |
|---|---|
| public static final MergeResult. Merged | |
| MERGED_NOT_COMMITTED | back to summary |
|---|---|
| public static final MergeResult. Merged, not committed
| |
| MERGED_SQUASHED | back to summary |
|---|---|
| public static final MergeResult. Merged, squashed, not updating HEAD
| |
| MERGED_SQUASHED_NOT_COMMITTED | back to summary |
|---|---|
| public static final MergeResult. Merged, squashed, not committed
| |
| NOT_SUPPORTED | back to summary |
|---|---|
| public static final MergeResult. Not yet supported | |
| MergeStatus | back to summary |
|---|---|
| private MergeStatus() | |
| isSuccessful | back to summary |
|---|---|
| public abstract boolean isSuccessful() Whether the merge was successful
| |
| valueOf | back to summary |
|---|---|
| public static MergeResult. | |
| values | back to summary |
|---|---|
| public static MergeResult. | |