comparison mercurial/commands.py @ 1067:fae1204603dc

Fixed zero-padded filenames with %r if there is a longer number in the middle. e.g. with: hg export -o ../%r.patch 99 100 98
author Thomas Arendsen Hein <thomas@intevation.de>
date Fri, 26 Aug 2005 16:37:28 +0200
parents ea878688221e
children 498456c2e8e5
comparison
equal deleted inserted replaced
1066:ea878688221e 1067:fae1204603dc
777 if not changesets: 777 if not changesets:
778 raise util.Abort("export requires at least one changeset") 778 raise util.Abort("export requires at least one changeset")
779 seqno = 0 779 seqno = 0
780 revs = list(revrange(ui, repo, changesets)) 780 revs = list(revrange(ui, repo, changesets))
781 total = len(revs) 781 total = len(revs)
782 revwidth = max(len(revs[0]), len(revs[-1])) 782 revwidth = max(map(len, revs))
783 ui.note(len(revs) > 1 and "Exporting patches:\n" or "Exporting patch:\n") 783 ui.note(len(revs) > 1 and "Exporting patches:\n" or "Exporting patch:\n")
784 for cset in revs: 784 for cset in revs:
785 seqno += 1 785 seqno += 1
786 doexport(ui, repo, cset, seqno, total, revwidth, opts) 786 doexport(ui, repo, cset, seqno, total, revwidth, opts)
787 787