[Python-checkins] pymigr: Tentative instructions to recreate a feature repo from a feature branch

antoine.pitrou python-checkins at python.org
Sat Mar 5 19:50:26 CET 2011


http://hg.python.org/pymigr/rev/418a54dc5744
changeset:   129:418a54dc5744
parent:      126:82522e6d54d4
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Mar 05 19:46:09 2011 +0100
summary:
  Tentative instructions to recreate a feature repo from a feature branch

files:
  README.txt

diff --git a/README.txt b/README.txt
--- a/README.txt
+++ b/README.txt
@@ -94,3 +94,57 @@
     [mail]
     notify = python-checkins at python.org
 
+
+How to recreate a feature repo from a feature branch?
+=====================================================
+
+Let's say the feature branch is 'pep-3151'.
+
+- Get the last corresponding changeset id from the revision map (here "cpython"
+  is a local clone of the main repository):
+
+    $ grep pep-3151 cpython/Misc/svnmap.txt |tail -n1
+    88675 728fbc26359c107ff755ce5bb6b9b3b080f1bef1 pep-3151
+
+- Clone the full history up to that changeset into a new repository:
+
+    $ hg clone -r 728fbc26359c107ff755ce5bb6b9b3b080f1bef1 \
+        http://hg.python.org/cpython-fullhistory pep-3151
+    $ cd pep-3151
+
+- Get the last svnmerge'd revision from the commit message:
+
+    $ hg log -r 728fbc26359c107ff755ce5bb6b9b3b080f1bef1
+    changeset:   44201:728fbc26359c
+    user:        Antoine Pitrou <solipsis at pitrou.net>
+    date:        Mon Feb 28 18:08:07 2011 +0000
+    summary:     Merged revisions 88633,88636,88639-88640,88643-88647,88650,88652-88654,88656,88658,88660,88663-88664,88668,88671 via svnmerge from
+
+  So, here, it's 88671.
+
+- Get its corresponding changeset id:
+
+    $ grep ^88671 ../cpython/Misc/svnmap.txt
+    88671 2f07d375ce6eecab471e5d8ebb889106f169da10 py3k
+
+- Pull that changeset too:
+
+    $ hg pull -r 2f07d375ce6eecab471e5d8ebb889106f169da10 ../cpython
+
+- Update to the feature changeset, and merge with the other:
+
+    $ hg update 728fbc26359c107ff755ce5bb6b9b3b080f1bef1
+    $ hg merge 2f07d375ce6eecab471e5d8ebb889106f169da10
+
+- Revert all files to the feature changeset and resolve "conflicts":
+
+    $ hg revert -a -r 728fbc26359c107ff755ce5bb6b9b3b080f1bef1
+    $ hg resolve -am
+
+- Commit the merge:
+
+    $ hg ci -m "Merge feature branch pep-3151 with its ancestor"
+
+The repo is now ready for further work (and should probably be published
+online).  It still needs pulling younger changesets on the main line of
+development, if you want to merge further.

-- 
Repository URL: http://hg.python.org/pymigr


More information about the Python-checkins mailing list