Merge branch 'stable-3.1' into stable-3.2
* stable-3.1:
Add 'Move a Change' section to user guide
Move Api version for plugin manifests to non-stamped binary
Change-Id: I5f25f9f0bc67ca090d6e4573b52dc7ccfd56dc59
diff --git a/Documentation/intro-user.txt b/Documentation/intro-user.txt
index 8afd546..b91adbb 100644
--- a/Documentation/intro-user.txt
+++ b/Documentation/intro-user.txt
@@ -444,6 +444,23 @@
[NOTE]
Never rebase commits that are already part of a central branch.
+[[move]]
+== Move a Change
+
+Changes can be link:rest-api-changes.html#move-change[moved] to a desired
+destination branch in the same project. This is useful in cases where
+development activity switches from one branch to another and there is a
+need to move open changes on the inactive branch to the new active one.
+Another useful case is to move changes from a newer branch back to an older
+bugfix branch where an issue first appeared.
+
+Users can move a change only if they have link:access-control.html#category_abandon[
+abandon permission] on the change and link:access-control.html#category_push[
+push permission] on the destination branch.
+
+The move operation will not update the change's parent and users will have
+to link:#rebase[rebase] the change. Also, merge commits cannot be moved.
+
[[abandon]]
[[restore]]
== Abandon/Restore a Change
diff --git a/tools/bzl/plugin.bzl b/tools/bzl/plugin.bzl
index 61b12f1..d49e700 100644
--- a/tools/bzl/plugin.bzl
+++ b/tools/bzl/plugin.bzl
@@ -40,7 +40,10 @@
java_binary(
name = "%s__non_stamped" % name,
- deploy_manifest_lines = manifest_entries + ["Gerrit-ApiType: plugin"],
+ deploy_manifest_lines = manifest_entries + [
+ "Gerrit-ApiType: plugin",
+ "Gerrit-ApiVersion: " + GERRIT_VERSION,
+ ],
main_class = "Dummy",
runtime_deps = [
":%s__plugin" % name,
@@ -64,7 +67,7 @@
"GEN_VERSION=$$(cat bazel-out/stable-status.txt | grep -w STABLE_BUILD_%s_LABEL | cut -d ' ' -f 2)" % dir_name.upper(),
"cd $$TMP",
"unzip -q $$ROOT/$<",
- "echo \"Implementation-Version: $$GEN_VERSION\nGerrit-ApiVersion: " + GERRIT_VERSION + "\n$$(cat META-INF/MANIFEST.MF)\" > META-INF/MANIFEST.MF",
+ "echo \"Implementation-Version: $$GEN_VERSION\n$$(cat META-INF/MANIFEST.MF)\" > META-INF/MANIFEST.MF",
"find . -exec touch '{}' ';'",
"zip -Xqr $$ROOT/$@ .",
]),