diff mercurial/patch.py @ 3902:0d27502a804c

Merge with crew-stable
author Brendan Cully <brendan@kublai.com>
date Fri, 15 Dec 2006 18:38:09 -0800
parents 6b4127c7d52a 2b3175acb653
children ba45041827a2
line wrap: on
line diff
--- a/mercurial/patch.py
+++ b/mercurial/patch.py
@@ -625,7 +625,7 @@ def export(repo, revs, template='hg-%h.p
     '''export changesets as hg patches.'''
 
     total = len(revs)
-    revwidth = max(map(len, revs))
+    revwidth = max([len(str(rev)) for rev in revs])
 
     def single(node, seqno, fp):
         parents = [p for p in repo.changelog.parents(node) if p != nullid]
@@ -654,8 +654,8 @@ def export(repo, revs, template='hg-%h.p
         if fp not in (sys.stdout, repo.ui):
             fp.close()
 
-    for seqno, cset in enumerate(revs):
-        single(cset, seqno, fp)
+    for seqno, rev in enumerate(revs):
+        single(repo.lookup(rev), seqno+1, fp)
 
 def diffstat(patchlines):
     fd, name = tempfile.mkstemp(prefix="hg-patchbomb-", suffix=".txt")