##// END OF EJS Templates
repair: reliably obtain bytestr of node ids
Augie Fackler -
r34219:6193d810 default
parent child Browse files
Show More
@@ -12,7 +12,10 b' import errno'
12 12 import hashlib
13 13
14 14 from .i18n import _
15 from .node import short
15 from .node import (
16 hex,
17 short,
18 )
16 19 from . import (
17 20 bundle2,
18 21 changegroup,
@@ -35,8 +38,9 b' def _bundle(repo, bases, heads, node, su'
35 38 # Include a hash of all the nodes in the filename for uniqueness
36 39 allcommits = repo.set('%ln::%ln', bases, heads)
37 40 allhashes = sorted(c.hex() for c in allcommits)
38 totalhash = hashlib.sha1(''.join(allhashes)).hexdigest()
39 name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix)
41 totalhash = hashlib.sha1(''.join(allhashes)).digest()
42 name = "%s/%s-%s-%s.hg" % (backupdir, short(node),
43 hex(totalhash[:4]), suffix)
40 44
41 45 cgversion = changegroup.safeversion(repo)
42 46 comp = None
General Comments 0
You need to be logged in to leave comments. Login now