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