Merge branch 'stable-2.13'

* stable-2.13:
  Improve 'Add Patch Set' ACL documentation.
  Exclude draft changes from ReindexAfterUpdate

Change-Id: Ia88d467f592a257a7bbe400e87f89681b5fbf3bc
This commit is contained in:
David Pursehouse
2016-09-21 09:41:47 +02:00
2 changed files with 9 additions and 1 deletions

View File

@@ -127,7 +127,7 @@ public class ReindexAfterUpdate implements GitReferenceUpdatedListener {
if (ref.equals(RefNames.REFS_CONFIG)) {
return asChanges(queryProvider.get().byProjectOpen(project));
}
return asChanges(queryProvider.get().byBranchOpen(
return asChanges(queryProvider.get().byBranchNew(
new Branch.NameKey(project, ref)));
}

View File

@@ -151,6 +151,14 @@ public class InternalChangeQuery extends InternalQuery<ChangeData> {
open()));
}
public List<ChangeData> byBranchNew(Branch.NameKey branch)
throws OrmException {
return query(and(
ref(branch),
project(branch.getParentKey()),
status(Change.Status.NEW)));
}
public Iterable<ChangeData> byCommitsOnBranchNotMerged(Repository repo,
ReviewDb db, Branch.NameKey branch, Collection<String> hashes)
throws OrmException, IOException {