changeset 25340:28800ab40395

repair: use _hexlist() to build revset expression from binary nodes _hexlist() should be efficient than _list().
author Yuya Nishihara <yuya@tcha.org>
date Sun, 24 May 2015 14:34:12 +0900
parents c50655b9c856
children 9d6cc87bd507
files mercurial/repair.py
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/repair.py	Thu May 28 23:49:19 2015 -0700
+++ b/mercurial/repair.py	Sun May 24 14:34:12 2015 +0900
@@ -7,7 +7,7 @@
 # GNU General Public License version 2 or any later version.
 
 from mercurial import changegroup, exchange, util, bundle2
-from mercurial.node import short, hex
+from mercurial.node import short
 from mercurial.i18n import _
 import errno
 
@@ -34,9 +34,7 @@
         vfs.mkdir(backupdir)
 
     # Include a hash of all the nodes in the filename for uniqueness
-    hexbases = (hex(n) for n in bases)
-    hexheads = (hex(n) for n in heads)
-    allcommits = repo.set('%ls::%ls', hexbases, hexheads)
+    allcommits = repo.set('%ln::%ln', bases, heads)
     allhashes = sorted(c.hex() for c in allcommits)
     totalhash = util.sha1(''.join(allhashes)).hexdigest()
     name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix)