Merge changes I14eb9d19,I8f6d5c5a into stable

* changes:
  Send new patchset event after its available
  Enable git:// download URLs if canonicalGitUrl set
This commit is contained in:
Shawn O. Pearce 2011-05-20 08:06:26 -07:00 committed by Android Code Review
commit ebe5db58f9
2 changed files with 3 additions and 3 deletions

View File

@ -191,7 +191,8 @@ class PatchSetComplexDisclosurePanel extends ComplexDisclosurePanel implements O
if (changeDetail.isAllowsAnonymous()
&& Gerrit.getConfig().getGitDaemonUrl() != null
&& allowedSchemes.contains(DownloadScheme.ANON_GIT)) {
&& (allowedSchemes.contains(DownloadScheme.ANON_GIT) ||
allowedSchemes.contains(DownloadScheme.DEFAULT_DOWNLOADS))) {
StringBuilder r = new StringBuilder();
r.append(Gerrit.getConfig().getGitDaemonUrl());
r.append(projectName);

View File

@ -1373,8 +1373,6 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
insertDummyApproval(result, reviewer, catId, db);
}
}
hooks.doPatchsetCreatedHook(result.change, ps);
}
final RefUpdate ru = repo.updateRef(ps.getRefName());
@ -1385,6 +1383,7 @@ public class ReceiveCommits implements PreReceiveHook, PostReceiveHook {
+ repo.getDirectory() + ": " + ru.getResult());
}
replication.scheduleUpdate(project.getNameKey(), ru.getName());
hooks.doPatchsetCreatedHook(result.change, ps);
request.cmd.setResult(ReceiveCommand.Result.OK);
try {