Let users know which change prevents submit in case of MISSING_DEPENDENCY
If a change cannot be submitted because it depends on a commit that cannot be merged the user got the following message: Depends on change that was not submitted. Commit <commit> depends on commit <other-commit> which cannot be merged. To find the change to which <other-commit> belongs the user must do a change query. Do this for the user and return the change ID too. Now we return: Depends on change that was not submitted. Commit <commit> depends on commit <other-commit> of change <other-change> which cannot be merged. Returning the commit SHA1 of <other-commit> is still useful since the commit that prevents submit may be an outdated patch set and this can be found easier if the commit SHA1 is known. Change-Id: I1368af204702a06d01ee6f812a5da5ac419b89d7 Signed-off-by: Edwin Kempin <ekempin@google.com>
This commit is contained in:
@@ -216,7 +216,7 @@ public class MergeUtil {
|
||||
List<CodeReviewCommit> result = new ArrayList<>();
|
||||
try {
|
||||
result.addAll(mergeSorter.sort(toSort));
|
||||
} catch (IOException e) {
|
||||
} catch (IOException | OrmException e) {
|
||||
throw new IntegrationException("Branch head sorting failed", e);
|
||||
}
|
||||
result.sort(CodeReviewCommit.ORDER);
|
||||
@@ -566,7 +566,7 @@ public class MergeUtil {
|
||||
throws IntegrationException {
|
||||
try {
|
||||
return !mergeSorter.sort(Collections.singleton(toMerge)).contains(toMerge);
|
||||
} catch (IOException e) {
|
||||
} catch (IOException | OrmException e) {
|
||||
throw new IntegrationException("Branch head sorting failed", e);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user