From 2efe6af8bba41a8451ded7be9a4e3b40190900ab Mon Sep 17 00:00:00 2001 From: James Moger <james.moger@gitblit.com> Date: Thu, 13 Mar 2014 10:45:22 -0400 Subject: [PATCH] Merged #31 "Tag entries do not have tooltips for long messages" --- src/main/java/com/gitblit/git/PatchsetReceivePack.java | 12 +++++++++--- 1 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/gitblit/git/PatchsetReceivePack.java b/src/main/java/com/gitblit/git/PatchsetReceivePack.java index bdba8b9..3ec3086 100644 --- a/src/main/java/com/gitblit/git/PatchsetReceivePack.java +++ b/src/main/java/com/gitblit/git/PatchsetReceivePack.java @@ -350,6 +350,9 @@ continue; } + LOGGER.info(MessageFormat.format("Verifying {0} push ref \"{1}\" received from {2}", + repository.name, cmd.getRefName(), user.username)); + // responsible verification String responsible = PatchsetCommand.getSingleOption(cmd, PatchsetCommand.RESPONSIBLE); if (!StringUtils.isEmpty(responsible)) { @@ -380,13 +383,18 @@ // watcher verification List<String> watchers = PatchsetCommand.getOptions(cmd, PatchsetCommand.WATCH); if (!ArrayUtils.isEmpty(watchers)) { + boolean verified = true; for (String watcher : watchers) { UserModel user = gitblit.getUserModel(watcher); if (user == null) { // watcher does not exist sendRejection(cmd, "Sorry, \"{0}\" is not a valid username for the watch list!", watcher); - continue; + verified = false; + break; } + } + if (!verified) { + continue; } } @@ -484,8 +492,6 @@ * @return the patchset command */ private PatchsetCommand preparePatchset(ReceiveCommand cmd) { - LOGGER.info(MessageFormat.format("Preparing {0} patchset command for \"{1}\" received from {2}", - repository.name, cmd.getRefName(), user.username)); String branch = getIntegrationBranch(cmd.getRefName()); long number = getTicketId(cmd.getRefName()); -- Gitblit v1.9.1