Merge branch 'stable-2.7'
* stable-2.7: Set version to 2.7 Fix installation of plugins Fix change stuck in SUBMITTED state but actually merged 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 Mark ALREADY_MERGED changes as merged in the DB and run hooks Conflicts: gerrit-acceptance-tests/pom.xml gerrit-antlr/pom.xml gerrit-cache-h2/pom.xml gerrit-common/pom.xml gerrit-extension-api/pom.xml gerrit-gwtdebug/pom.xml gerrit-gwtexpui/pom.xml gerrit-gwtui/pom.xml gerrit-gwtui/src/main/java/com/google/gerrit/client/admin/AdminConstants.properties gerrit-httpd/pom.xml gerrit-launcher/pom.xml gerrit-main/pom.xml gerrit-openid/pom.xml gerrit-patch-commonsnet/pom.xml gerrit-patch-jgit/pom.xml gerrit-pgm/pom.xml gerrit-plugin-api/pom.xml gerrit-plugin-archetype/pom.xml gerrit-plugin-gwt-archetype/pom.xml gerrit-plugin-gwtui/pom.xml gerrit-plugin-js-archetype/pom.xml gerrit-prettify/pom.xml gerrit-reviewdb/pom.xml gerrit-server/pom.xml gerrit-sshd/pom.xml gerrit-util-cli/pom.xml gerrit-util-ssl/pom.xml gerrit-war/pom.xml plugins/commit-message-length-validator plugins/replication plugins/reviewnotes pom.xml Change-Id: Iacb961caf52032e7e445be9ed81376db849e171b
This commit is contained in:
@@ -303,11 +303,11 @@ Testing submit rules
|
||||
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
|
||||
|
@@ -22,8 +22,8 @@ projects = All projects
|
||||
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
|
||||
headingMaxObjectSizeLimit = Maximum Git object size limit
|
||||
headingGroupOptions = Group Options
|
||||
isVisibleToAll = Make group visible to all registered users.
|
||||
|
@@ -509,7 +509,7 @@ public class MergeOp {
|
||||
if (rw.isMergedInto(commit, branchTip)) {
|
||||
commit.statusCode = CommitMergeStatus.ALREADY_MERGED;
|
||||
try {
|
||||
setMergedPatchSet(chg.getId(), ps.getId());
|
||||
setMerged(chg, null);
|
||||
} catch (OrmException e) {
|
||||
log.error("Cannot mark change " + chg.getId() + " merged", e);
|
||||
}
|
||||
|
@@ -60,10 +60,7 @@ public class DispatchCommandProvider implements Provider<DispatchCommand> {
|
||||
return new RegistrationHandle() {
|
||||
@Override
|
||||
public void remove() {
|
||||
if (!m.remove(name.value(), commandProvider)) {
|
||||
throw new IllegalStateException(String.format(
|
||||
"can not unregister command: %s", name.value()));
|
||||
}
|
||||
m.remove(name.value(), commandProvider);
|
||||
}
|
||||
};
|
||||
}
|
||||
@@ -71,11 +68,12 @@ public class DispatchCommandProvider implements Provider<DispatchCommand> {
|
||||
public RegistrationHandle replace(final CommandName name,
|
||||
final Provider<Command> cmd) {
|
||||
final ConcurrentMap<String, CommandProvider> m = getMap();
|
||||
m.put(name.value(), new CommandProvider(cmd, null));
|
||||
final CommandProvider commandProvider = new CommandProvider(cmd, null);
|
||||
m.put(name.value(), commandProvider);
|
||||
return new RegistrationHandle() {
|
||||
@Override
|
||||
public void remove() {
|
||||
m.remove(name.value(), cmd);
|
||||
m.remove(name.value(), commandProvider);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
Submodule plugins/commit-message-length-validator updated: 9f988c6e5b...45f347d0e2
Submodule plugins/replication updated: 3fffd16403...d4871d5df6
Submodule plugins/reviewnotes updated: 1fac69b085...d47005095f
Reference in New Issue
Block a user