update gerrit list
[openafs-wiki.git] / devel / Backporting.mdwn
index 76f59e0..d261afd 100644 (file)
@@ -18,6 +18,9 @@ Note that unlike most git based projects, OpenAFS developers have adopted a
 linear commit history. Merge commits are generally avoided, and developers
 generally run git rebase frequently before submitting changes to gerrit.
 
+An optional set of wrapper scripts called [[GitGerrit]] are available to search
+gerrit from command line, fetch commits by the legacy gerrit number, and to
+assist in cherry picking commits to stable branches.
 
 Master branch inclusion
 -----------------------
@@ -48,9 +51,23 @@ Example:
     git fetch origin
     git checkout origin/openafs-stable-1_8_x
     git cherry-pick -e -x origin/master~<number>
+    <remove old Change-Id in the editor>
+    git commit --amend
+    git show
+    <verify a new Change-Id has been added.>
 
-Alternatively, you can run `git commit --amend` immediately after each
-cherry-pick to remove rhe Change-ID.
+Run `git commit --amend` immediately after each cherry-pick to verify the
+cherry-pick command has a new Change-ID.
+
+Alternately, the [[GitGerrit]] git-gerrit-cherry-pick tool can be used to
+cherry pick by gerrit number and will automatically update the Change-Id
+in the commit message:
+
+Example:
+
+    git fetch origin
+    git checkout origin/openafs-stable-1_8_x
+    git gerrit-cherry-pick <gerrit-number>
 
 In the event the cherry-pick fails, due to code skew between the branches,
 it may be necessary to manually fix the merge conflict and run `git cherry-pick --continue`
@@ -78,6 +95,12 @@ Example:
     git checkout origin/openafs-stable-1_6_x
     git cherry-pick -e -x origin/openafs-stable-1_8_x~<number>
 
+Example with [[GitGerrit]]:
+
+    git fetch origin
+    git checkout origin/openafs-stable-1_6_x
+    git gerrit-cherry-pick <gerrit-number> --branch origin/openafs-stable-1_8_x
+
 In the event the cherry-pick fails, due to code skew between the branches,
 it may be necessary to manually fix the merge conflict and run `git check-pick --continue`
 to complete the cherry pick. In this case, the `(cherry picked from commit...)`
@@ -93,13 +116,13 @@ Example:
 Avoiding Path Conflicts
 -----------------------
 
-You make the life of the release manager/guardian/gatekeeper in charge of your
-change significantly easier by checking whether your change modifies a file
-which is also touched by an open change for the target branch, and if it does
-base your change on the already open change in question. That's even true
-if the changes are completely independent and a cherry-pick does not flag any
-conflicts, due to the way gerrit is configured. Obviously, it's even more true
-if the changes do conflict. A very good alternative is helping to get the other
-change either accepted or abandonded before you push yours.
+Due to the way gerrit is configured, it may claim that one of your commits has a "Merge conflict" if it modifies any file that also has changes in other gerrits under review for that branch.  That's even true if the changes are completely independent, and a cherry-pick does not flag any conflicts.
+
+Before submitting, check the other open gerrits for that branch for modifications to the same files you are modifying.  If you find any, please base your change on top of those open changes before submission.
+
+Alternatively, help get the "conflicting" change merged (or abandoned) before pushing your commit.
+
+Your efforts in avoiding "Merge conflicts" in this way will make the life of the release manager/guardian/gatekeeper in charge of your change significantly easier.  Thank you!
+
 
 [1]: https://gerrit.openafs.org/