[Python-checkins] pymigr (merge default -> default): Merge

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


http://hg.python.org/pymigr/rev/dda2911e18f9
changeset:   130:dda2911e18f9
parent:      129:418a54dc5744
parent:      128:32acd09d6bb4
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Sat Mar 05 19:50:11 2011 +0100
summary:
  Merge

files:
  

diff --git a/findxtags.py b/findxtags.py
new file mode 100644
--- /dev/null
+++ b/findxtags.py
@@ -0,0 +1,36 @@
+"""
+Script to find entries in .hgtags whose nodes are not in the repo
+and ask for replacement nodes, which are written to a file.
+
+The file is then used as input for fixxtags.py.
+"""
+
+import sys
+from mercurial import hg, ui, error
+
+tags = [x.split() for x in open(sys.argv[1])]
+
+replaced = [x.split() for x in open(sys.argv[2])]
+replaced = dict((x[0], (x[1], x[2])) for x in replaced)
+
+missing = []
+
+r = hg.repository(ui.ui())
+for thash, tname in tags:
+    try:
+        x = r[thash]
+    except error.RepoLookupError:
+        if thash not in replaced:
+            newhash = raw_input('Enter hash for tag %s: ' % tname)
+            if newhash == '': newhash = 'xx'
+            try:
+                newhash = r[newhash].hex()
+            except error.RepoLookupError:
+                print 'Error!'
+            else:
+                replaced[thash] = (newhash, tname)
+
+f = open(sys.argv[2], 'w')
+for oldhash, (newhash, tname) in replaced.iteritems():
+    f.write('%s %s %s\n' % (oldhash, newhash, tname))
+f.close()
diff --git a/fixxtags.py b/fixxtags.py
new file mode 100644
--- /dev/null
+++ b/fixxtags.py
@@ -0,0 +1,30 @@
+"""
+Script to replace nodes in .hgtags entries according to
+a file written by findxtags.py.
+"""
+
+import sys
+from mercurial import hg, ui, error
+
+tags = [x.split() for x in open(sys.argv[1])]
+
+replaced = [x.split() for x in open(sys.argv[2])]
+replaced = dict((x[0], (x[1], x[2])) for x in replaced)
+
+newf = []
+
+r = hg.repository(ui.ui())
+for thash, tname in tags:
+    try:
+        x = r[thash]
+    except error.RepoLookupError:
+        try:
+            newf.append('%s %s\n' % (replaced[thash][0], tname))
+        except KeyError:
+            print 'Not found: %s' % thash
+    else:
+        newf.append('%s %s\n' % (thash, tname))
+
+f = open(sys.argv[1], 'w')
+f.writelines(newf)
+f.close()
diff --git a/todo.txt b/todo.txt
--- a/todo.txt
+++ b/todo.txt
@@ -22,25 +22,25 @@
   -> done
 * some hook should prevent pushing python files indented by tabs.
   -> done in checkwhitespace.py
+* check if we should speed up svn revision matching/lookups (since the
+  lookup WSGI app can reside permanently in a mod_wsgi process, building
+  a cache at startup should be sufficient)
+  -> done in lookup.py
 
-Checklist for the converted repo
-================================
+Checklist for the converted repo [done]
+=======================================
 
 * close unused branches
-* add .hgeol in all active branches
-* commit wrong line-endings once
-* dummy-merge maintenance branches
+* add .hgeol in all active branches and commit wrong line-endings once
 * clean up tags on all branches, correct pre-2.4 tags that point to
   nothing
+* dummy-merge maintenance branches
 * install same hooks as in test repo
 
 Optional/Low priority
 =====================
 
 * find a nice way of modifying the templates (possibly involving jinja)
-* check if we should speed up svn revision matching/lookups (since the
-  lookup WSGI app can reside permanently in a mod_wsgi process, building
-  a cache at startup should be sufficient)
 * investigate roundup-rietveld integration changes required
 * set up garbage collection of unused repos in /home/hg/repos
   ("unused" meaning created more than X days ago, without a single changeset
@@ -50,16 +50,16 @@
 ===============
 
 * set up automatic (?) installation of changes to ssh keys, decide upon
-  account managers
+  account managers [done]
 * adapt build identification for Windows build process (see
   build-identification directory)
 * adapt Python-ast.c version generation process
 * discuss conversion of the peps repo
-* remove old hg mirrors at http://code.python.org/hg
+* remove old hg mirrors at http://code.python.org/hg [done]
 
 
-Buildbot
---------
+Buildbot [done]
+---------------
 
 * Experimental hg buildbots are already setup for the non-official mirrors
   at http://code.python.org. Their configuration must be moved to the official
@@ -79,8 +79,8 @@
 
   (it would be nice to customize that form to make it more readable...)
 
-Tracker
--------
+Tracker [done]
+--------------
 
 Activate the new substitutions in the python-dev tracker instance's
 ``extensions/local_replace.py``.

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


More information about the Python-checkins mailing list