public class MergeOp
extends java.lang.Object
implements java.lang.AutoCloseable
Branches are reduced to the minimum number of heads needed to merge everything. This allows commits to be entered into the queue in any order (such as ancestors before descendants) and only the most recent commit on any line of development will be merged. All unmerged commits along a line of development must be in the submission queue in order to merge the tip of that line.
Conflicts are handled by discarding the entire line of development and marking it as conflicting, even if an earlier commit along that same line can be merged cleanly.
Modifier and Type | Class and Description |
---|---|
static class |
MergeOp.CommitStatus |
Modifier and Type | Method and Description |
---|---|
static void |
checkSubmitRule(ChangeData cd,
boolean allowClosed) |
void |
close() |
java.util.Set<Project.NameKey> |
getAllProjects() |
MergeOpRepoManager |
getMergeOpRepoManager() |
void |
merge(Change change,
IdentifiedUser caller,
boolean checkSubmitRules,
SubmitInput submitInput,
boolean dryrun)
Merges the given change.
|
public void close()
close
in interface java.lang.AutoCloseable
public static void checkSubmitRule(ChangeData cd, boolean allowClosed) throws ResourceConflictException
ResourceConflictException
public void merge(Change change, IdentifiedUser caller, boolean checkSubmitRules, SubmitInput submitInput, boolean dryrun) throws RestApiException, UpdateException, java.io.IOException, org.eclipse.jgit.errors.ConfigInvalidException, PermissionBackendException
Depending on the server configuration, more changes may be affected, e.g. by submission of a topic or via superproject subscriptions. All affected changes are integrated using the projects integration strategy.
change
- the change to be merged.caller
- the identity of the callercheckSubmitRules
- whether the prolog submit rules should be evaluatedsubmitInput
- parameters regarding the mergeRestApiException
- if an error occurred.PermissionBackendException
- if permissions can't be checkedjava.io.IOException
- an error occurred reading from NoteDb.UpdateException
org.eclipse.jgit.errors.ConfigInvalidException
public java.util.Set<Project.NameKey> getAllProjects()
public MergeOpRepoManager getMergeOpRepoManager()