[openstack-nova] add git patch management notes

Pádraig Brady pbrady at fedoraproject.org
Mon Mar 5 15:03:19 UTC 2012


commit 94a94132c12a87d32c42b5f282aa22dc87e6d520
Author: Pádraig Brady <P at draigBrady.com>
Date:   Mon Mar 5 15:02:07 2012 +0000

    add git patch management notes

 update-patches.txt |   99 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 99 insertions(+), 0 deletions(-)
---
diff --git a/update-patches.txt b/update-patches.txt
new file mode 100644
index 0000000..fbc0446
--- /dev/null
+++ b/update-patches.txt
@@ -0,0 +1,99 @@
+git checkout master
+git remote add -f fedora-openstack git at github.com:fedora-openstack/nova.git
+    Updating fedora-openstack
+    warning: no common commits
+    remote: Counting objects: 81335, done.
+    remote: Compressing objects: 100% (15974/15974), done.
+    remote: Total 81335 (delta 65136), reused 80211 (delta 64416)
+    Receiving objects: 100% (81335/81335), 85.12 MiB | 660 KiB/s, done.
+    Resolving deltas: 100% (65136/65136), done.
+    From github.com:fedora-openstack/nova
+    * [new branch]      f16-patches -> fedora-openstack/f16-patches
+    * [new branch]      master     -> fedora-openstack/master
+    From github.com:fedora-openstack/nova
+    * [new tag]         2011.3     -> 2011.3
+    * [new tag]         2011.3.1   -> 2011.3.1
+git branch master-patches fedora-openstack/master
+    Branch master-patches set up to track remote branch master from fedora-openstack.
+git remote add -f openstack git://github.com/openstack/nova.git
+    Updating openstack
+    remote: Counting objects: 15159, done.
+    remote: Compressing objects: 100% (3992/3992), done.
+    remote: Total 14587 (delta 12007), reused 12815 (delta 10480)
+    Receiving objects: 100% (14587/14587), 6.43 MiB | 352 KiB/s, done.
+    Resolving deltas: 100% (12007/12007), completed with 318 local objects.
+    From git://github.com/openstack/nova
+    * [new branch]      master     -> openstack/master
+    * [new branch]      milestone-proposed -> openstack/milestone-proposed
+    * [new branch]      stable/diablo -> openstack/stable/diablo
+    * [new tag]         0.9.0      -> 0.9.0
+    * [new tag]         2011.1rc1  -> 2011.1rc1
+    * [new tag]         2011.2     -> 2011.2
+    * [new tag]         2011.2gamma1 -> 2011.2gamma1
+    * [new tag]         2011.2rc1  -> 2011.2rc1
+    * [new tag]         diablo-1   -> diablo-1
+    * [new tag]         diablo-2   -> diablo-2
+    * [new tag]         diablo-3   -> diablo-3
+    * [new tag]         diablo-4   -> diablo-4
+    * [new tag]         essex-3    -> essex-3
+    From git://github.com/openstack/nova
+    * [new tag]         essex-1    -> essex-1
+
+
+
+Here is how I updated the fedora-openstack/master branch to essex-3 + ...
+
+0. Ensure up to date
+
+git fetch --all
+
+1. Rebase our patches onto essex-3
+
+git checkout master-patches
+    Switched to branch 'master-patches'
+git log --oneline # to pick sha of commit _before_ first commit to consider rebasing
+git rebase --onto essex-3 69fcb2df # use --interactive if want to edit/delete commits
+    First, rewinding head to replay your work on top of it...
+    Applying: Ensure we don't access the net when building docs
+
+2. Pick new patches after essex-3
+
+git log remotes/openstack/master # to find sha of other commits
+git cherry-pick ed6e3efc
+    [master-patches 126e601] fix `nova-manage image convert` exception
+# You can also cherry pick commits from gerrit by copy and pasting the cherry-pick commands from there
+
+3. Update the patches on master
+
+git checkout master
+    Switched to branch 'master'
+./update-patches.sh
+    rm '0001-Ensure-we-don-t-access-the-net-when-building-docs.patch'
+    [master da3a165] Updated patches from master-patches
+     1 files changed, 0 insertions(+), 25 deletions(-)
+     delete mode 100644 0001-Ensure-we-don-t-access-the-net-when-building-docs.patch
+    Switched to branch 'master-patches'
+    Your branch and 'fedora-openstack/master' have diverged,
+    and have 1747 and 281 different commit(s) each, respectively.
+    Switched to branch 'master'
+    Your branch is ahead of 'origin/master' by 1 commit.
+    [master 0c2be04] Updated patches from master-patches
+     3 files changed, 30 insertions(+), 1 deletions(-)
+     create mode 100644 0002-fix-nova-manage-image-convert-exception.patch
+
+4. Update changelog and version in spec file as appropriate and push
+
+git commit --amend -a
+fedpkg prep # to be sure to be sure the patches apply
+git push
+
+5. Push updated master-patches back to github
+(note the '+' below to allow non fast-forward updates)
+
+git push fedora-openstack +master-patches:master
+
+The same process applies for fedora-openstack/f16-patches.
+Note el6 patches are not yet maintained in git, so
+for now just merge from f16 (diablo).
+Note f17 patches are not yet maintained in git, so
+for now just merge from master (essex).


More information about the scm-commits mailing list