Package com.google.gerrit.server.submit
Class LocalMergeSuperSetComputation
- java.lang.Object
-
- com.google.gerrit.server.submit.LocalMergeSuperSetComputation
-
- All Implemented Interfaces:
MergeSuperSetComputation
public class LocalMergeSuperSetComputation extends Object implements MergeSuperSetComputation
Default implementation of MergeSuperSet that does the computation of the merge super set sequentially on the local Gerrit instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LocalMergeSuperSetComputation.LocalMergeSuperSetComputationModule
-
Field Summary
Fields Modifier and Type Field Description static int
MAX_SUBMITTABLE_CHANGES_AT_ONCE_DEFAULT
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChangeSet
byCommitsOnBranchNotMerged(MergeOpRepoManager.OpenRepo or, BranchNameKey branch, Set<String> visibleHashes, Set<String> nonVisibleHashes, CurrentUser user)
ChangeSet
completeWithoutTopic(MergeOpRepoManager orm, ChangeSet changeSet, CurrentUser user)
Compute the set of changes that should be submitted together.Set<String>
walkChangesByHashes(Collection<org.eclipse.jgit.revwalk.RevCommit> sourceCommits, Set<String> ignoreHashes, MergeOpRepoManager.OpenRepo or, BranchNameKey b, int limit)
-
-
-
Field Detail
-
MAX_SUBMITTABLE_CHANGES_AT_ONCE_DEFAULT
public static final int MAX_SUBMITTABLE_CHANGES_AT_ONCE_DEFAULT
- See Also:
- Constant Field Values
-
-
Method Detail
-
completeWithoutTopic
public ChangeSet completeWithoutTopic(MergeOpRepoManager orm, ChangeSet changeSet, CurrentUser user) throws IOException
Description copied from interface:MergeSuperSetComputation
Compute the set of changes that should be submitted together. As input a set of changes is provided for which it is known that they should be submitted together. This method should complete the set by including open predecessor changes that need to be submitted as well. To decide whether open predecessor changes should be included the method must take the submit type into account (e.g. for changes with submit type "Cherry-Pick" open predecessor changes must not be included).This method is invoked iteratively while new changes to be submitted together are discovered by expanding the topics of the changes. This method must not do any topic expansion on its own.
- Specified by:
completeWithoutTopic
in interfaceMergeSuperSetComputation
- Parameters:
orm
-MergeOpRepoManager
that should be used to access repositorieschangeSet
- A set of changes for which it is known that they should be submitted togetheruser
- The user for which the visibility checks should be performed- Returns:
- the completed set of changes that should be submitted together
- Throws:
IOException
-
byCommitsOnBranchNotMerged
public ChangeSet byCommitsOnBranchNotMerged(MergeOpRepoManager.OpenRepo or, BranchNameKey branch, Set<String> visibleHashes, Set<String> nonVisibleHashes, CurrentUser user) throws IOException
- Throws:
IOException
-
walkChangesByHashes
public Set<String> walkChangesByHashes(Collection<org.eclipse.jgit.revwalk.RevCommit> sourceCommits, Set<String> ignoreHashes, MergeOpRepoManager.OpenRepo or, BranchNameKey b, int limit) throws IOException
- Throws:
IOException
-
-