From b4ef4c91bbd71df490cd404cb6b99774659ac366 Mon Sep 17 00:00:00 2001 From: "https://launchpad.net/~jaltman" Date: Thu, 16 Apr 2015 18:30:17 -0400 Subject: [PATCH 1/1] Add instructions for stable branch pullups --- GitDevelopers.mdwn | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) diff --git a/GitDevelopers.mdwn b/GitDevelopers.mdwn index b36e543..a300dec 100644 --- a/GitDevelopers.mdwn +++ b/GitDevelopers.mdwn @@ -333,6 +333,68 @@ When a rebase is performed there may be conflicts that cannot be automatically r After you have resolved all conflicts and are once again happy with the commit, simply resubmit your change in the same way as if you had been asked to revise it (see notes above) +## Pulling Up a Change to a Stable Branch + +After a change has passed through the Gerrit Code Review process it will be merged onto the master branch of the OpenAFS repository. The merged commit will then become visible in your local repository the next time a + + git pull + +command is executed. OpenAFS releases are not issued from the master branch. Instead releases such as 1.6.11 are issued from stable branches such as openafs-stable-1_6_x. After a change is approved on master the change must be pulled up to the stable branch, be modified for any differences between master and openafs-stable-N_N_x and be resubmitted to Gerrit. + +Start by checking out the stable branch of interest. For example, if you want to submit a change to the next 1.6 series release you would first checkout master. + + git checkout --track origin/master + +or just + + git checkout master + +if you have already created the tracking branch. Then + + git pull + +to import any new changes to the local repository and fast-forward HEAD to the most recent commit merged onto origin/master. It is important to note that if any local changes were committed onto the local master tracking branch that a fast-forward operation will not occur. Instead the local changes and the changes to origin will be merged producing a merge commit. A merge commit is not compatible with the OpenAFS management of the git repository. To rebase local changes onto of the HEAD of origin/master the command + + git pull --rebase + +can be performed. If there are conflicts when applying the local changes to current HEAD of origin/master you will have an opportunity to resolve them. + +Once the change you wish to pullup to the stable branch is in the local repository you can use + + git log master + +to find it and record the sha1 identifier for the commit. Now you are ready to switch to the stable branch for example, openafs-stable-1_6_x. If you do not already have a local tracking branch execute + + git checkout --track origin/ + +and if you do then execute + + git checkout + +After switching branches you might be told that the local branch is behind the origin. If so, execute + + git pull + +to fast-forward the branch HEAD to the most recent commit. Now you can pull the commit from master by using performing a cherry-pick: + + git cherry-pick -x + +This will create a new commit on the current branch with a commit message that has been modified with + + (cherry picked from commit ) + +This commit message will include the Change-Id from the original submission to Gerrit. It is important that the Change-Id values submitted to Gerrit be unique but Gerrit will not enforce this. You must remember to edit the commit message and remove the old Change-Id using + + git commit --amend + +so that the Change ID Hook will generate a new Change-Id before pushing the change to Gerrit. + +Once the commit message has been ammended and any other required changes are made it is time to push the change to Gerrit: + + git push ssh://gerrit.openafs.org/openafs.git HEAD:refs/for// + +The change will then be evaluated by the OpenAFS Release team for incorporation into a future stable release. + ## Submitting by patch If all of this seems too daunting (and please don't let it put you off) you can still, of course, submit patches by email. -- 1.9.4