Merge branch 'stable-2.6' into stable-2.7
* stable-2.6:
Remove documentation links from admin page
NPE when deleting draft patch set when previous draft already deleted
Fix example for 'test-submit rule' in Prolog cookbook
Change-Id: Ib96358c1fe6a953d17e88fd9f5bd4832fd51334a
diff --git a/Documentation/prolog-cookbook.txt b/Documentation/prolog-cookbook.txt
index 7912cf2..170d11a 100644
--- a/Documentation/prolog-cookbook.txt
+++ b/Documentation/prolog-cookbook.txt
@@ -303,11 +303,11 @@
The prolog environment running the `submit_rule` is loaded with state describing the
change that is being evaluated. The easiest way to load this state is to test your
`submit_rule` against a real change on a running gerrit instance. The command
-link:cmd-test-submit-rule.html[test-submit-rule] loads a specific change and executes
+link:cmd-test-submit-rule.html[test-submit rule] loads a specific change and executes
the `submit_rule`. It optionally reads the rule from from `stdin` to facilitate easy testing.
====
- cat rules.pl | ssh gerrit_srv gerrit test-submit-rule I45e080b105a50a625cc8e1fb5b357c0bfabe6d68 -s
+ cat rules.pl | ssh gerrit_srv gerrit test-submit rule I45e080b105a50a625cc8e1fb5b357c0bfabe6d68 -s
====
Prolog vs Gerrit plugin for project specific submit rules
diff --git a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
index ce27780..178db6b 100644
--- a/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
+++ b/gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties
@@ -22,8 +22,8 @@
projectRepoBrowser = Repository Browser
useContentMerge = Automatically resolve conflicts
useContributorAgreements = Require a valid contributor agreement to upload
-useSignedOffBy = Require <a href="http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/user-signedoffby.html#Signed-off-by" target="_blank"><code>Signed-off-by</code></a> in commit message
-requireChangeID = Require <a href="http://gerrit-documentation.googlecode.com/svn/Documentation/2.5/user-changeid.html" target="_blank"><code>Change-Id</code></a> in commit message
+useSignedOffBy = Require <code>Signed-off-by</code> in commit message
+requireChangeID = Require <code>Change-Id</code> in commit message
headingGroupOptions = Group Options
isVisibleToAll = Make group visible to all registered users.
buttonSaveGroupOptions = Save Group Options
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/DeleteDraftPatchSet.java b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/DeleteDraftPatchSet.java
index adec292..d20b0f6 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/DeleteDraftPatchSet.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/changedetail/DeleteDraftPatchSet.java
@@ -112,9 +112,7 @@
}
if (change.currentPatchSetId().equals(patchSetId)) {
try {
- PatchSet.Id id =
- new PatchSet.Id(patchSetId.getParentKey(), patchSetId.get() - 1);
- change.setCurrentPatchSet(patchSetInfoFactory.get(db, id));
+ change.setCurrentPatchSet(patchSetInfoFactory.get(db, highestId));
} catch (PatchSetInfoNotAvailableException e) {
throw new NoSuchChangeException(changeId);
}