Class MergeOp
- java.lang.Object
- 
- com.google.gerrit.server.git.MergeOp
 
- 
- All Implemented Interfaces:
- AutoCloseable
 
 public class MergeOp extends Object implements AutoCloseable Merges changes in submission order into a single branch.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. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMergeOp.CommitStatus
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static voidcheckSubmitRule(ChangeData cd, boolean allowClosed)voidclose()Set<Project.NameKey>getAllProjects()MergeOpRepoManagergetMergeOpRepoManager()voidmerge(ReviewDb db, Change change, IdentifiedUser caller, boolean checkSubmitRules, SubmitInput submitInput, boolean dryrun)Merges the given change.
 
- 
- 
- 
Method Detail- 
closepublic void close() - Specified by:
- closein interface- AutoCloseable
 
 - 
checkSubmitRulepublic static void checkSubmitRule(ChangeData cd, boolean allowClosed) throws ResourceConflictException, com.google.gwtorm.server.OrmException - Throws:
- ResourceConflictException
- com.google.gwtorm.server.OrmException
 
 - 
mergepublic void merge(ReviewDb db, Change change, IdentifiedUser caller, boolean checkSubmitRules, SubmitInput submitInput, boolean dryrun) throws com.google.gwtorm.server.OrmException, RestApiException, UpdateException, IOException, org.eclipse.jgit.errors.ConfigInvalidException, PermissionBackendException Merges the given change.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. - Parameters:
- db- the review database.
- change- the change to be merged.
- caller- the identity of the caller
- checkSubmitRules- whether the prolog submit rules should be evaluated
- submitInput- parameters regarding the merge
- Throws:
- com.google.gwtorm.server.OrmException- an error occurred reading or writing the database.
- RestApiException- if an error occurred.
- PermissionBackendException- if permissions can't be checked
- IOException- an error occurred reading from NoteDb.
- UpdateException
- org.eclipse.jgit.errors.ConfigInvalidException
 
 - 
getAllProjectspublic Set<Project.NameKey> getAllProjects() 
 - 
getMergeOpRepoManagerpublic MergeOpRepoManager getMergeOpRepoManager() 
 
- 
 
-