[Python-checkins] pymigr: Improve instructions

antoine.pitrou python-checkins at python.org
Thu Feb 24 18:28:47 CET 2011


antoine.pitrou pushed 38f0f23904fc to pymigr:

http://hg.python.org/pymigr/rev/38f0f23904fc
changeset:   99:38f0f23904fc
tag:         tip
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Thu Feb 24 18:28:42 2011 +0100
summary:
  Improve instructions

files:
  README.txt

diff --git a/README.txt b/README.txt
--- a/README.txt
+++ b/README.txt
@@ -1,14 +1,68 @@
 How to convert
 ==============
 
-- Get a fresh clone of hgsubversion (http://bitbucket.org/durin42/hgsubversion)
-- Add an extensions.hgsubversion entry to your ~/.hgrc
-- Get a clone of the pymigr repo (http://hg.python.org/pymigr/)
-- Get a copy of the Python SVN repo by asking djc or someone else who has one
-- Run the following command:
+Software
+--------
 
-    hg clone -A pymigr/author-map --branchmap branchmap.txt \
-    	file:///path/to/local/svnrepo/python python-hg
+- Get a fresh clone of hgsubversion (from http://hg.python.org/hgsubversion/#pymigr)
+  and also install its dependencies (e.g. subvertpy)
 
-This should get you a hg repo in python-hg. hgsubversion may leak memory; you
-should be able to kill it if it uses up too much. Resume with hg pull.
+- Enable hgsubversion by adding it to the "[extensions]" section in your .hgrc.
+
+- Enable the "hg shrink" extension by adding
+    shrink = path/to/mercurial-source-tree/contrib/shrink-revlog.py
+  to the "[extensions]" section in your .hgrc.  It is also recommended that you
+  apply the patch that is inside findlarge.py (it only modifies shrink-revlog.py)
+
+Data
+----
+
+- You should have a local copy of the Python SVN repo in the "python-svn"
+  subdirectory of this working copy.  The recommended way is to "svnadmin load"
+  the results of an "svnadmin dump" done on the server (once you have a dump,
+  you can create further incremental dumps and load them in your copy).
+
+Steps
+-----
+
+- Run "./convert.sh". This will mirror the "python-svn" SVN repo in a "python-hg"
+  Mercurial repo.  The full conversion takes several hours, but you can stop it
+  before the end if you like, and then do "hg pull" inside "python-hg" to
+  resume converting.  "hg pull" should also allow you to add new SVN changesets
+  when you have loaded an incremental dump into your "python-svn" repo.
+
+- Inside, "python-hg", prepare a bundle of the branches needed for the "work
+  repository" (a subset of the full converted repo containing only active
+  dev branches):
+
+    $ hg bundle --base null \
+        -r default -r 3.2.x -r 3.1.x -r 3.0.x \
+        -r trunk -r 2.7.x -r 2.6.x -r 2.5.x \
+        ../work.bundle
+
+- Create the work repository:
+
+    $ cd ..
+    $ hg init work
+    $ cd work
+    $ hg unbundle ../work.bundle
+
+- It is then recommended to shrink the work repo and the full history repo.
+  See findlarge.py's docstring for indications.  You should do the shrinking
+  in a separate clone, in case it gets corrupted (you don't want to convert
+  again from scratch).
+  A shrunk work repository should contain 8 branches (all non-closed),
+  7 heads (all non-closed), and weigh around 170MB (I'm talking about the ".hg"
+  directory).
+
+  Don't hesitate to inspect the results of the following commands:
+
+    $ hg branches -c   # displays all branches, including closed
+    $ hg heads -c      # displays all heads, inclusing closed
+    $ du -hs .hg       # displays on-disk repo size
+
+  Also, the size of a full bundle gives (IIUC) an approximation of the
+  amount of bytes transfered over the network when doing a remote clone:
+
+    $ hg bundle -a cpython.bundle
+

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


More information about the Python-checkins mailing list