Show More
@@ -7,7 +7,7 b'' | |||||
7 | # GNU General Public License version 2 or any later version. |
|
7 | # GNU General Public License version 2 or any later version. | |
8 |
|
8 | |||
9 | from mercurial import changegroup, exchange, util, bundle2 |
|
9 | from mercurial import changegroup, exchange, util, bundle2 | |
10 |
from mercurial.node import short |
|
10 | from mercurial.node import short | |
11 | from mercurial.i18n import _ |
|
11 | from mercurial.i18n import _ | |
12 | import errno |
|
12 | import errno | |
13 |
|
13 | |||
@@ -34,9 +34,7 b' def _bundle(repo, bases, heads, node, su' | |||||
34 | vfs.mkdir(backupdir) |
|
34 | vfs.mkdir(backupdir) | |
35 |
|
35 | |||
36 | # Include a hash of all the nodes in the filename for uniqueness |
|
36 | # Include a hash of all the nodes in the filename for uniqueness | |
37 | hexbases = (hex(n) for n in bases) |
|
37 | allcommits = repo.set('%ln::%ln', bases, heads) | |
38 | hexheads = (hex(n) for n in heads) |
|
|||
39 | allcommits = repo.set('%ls::%ls', hexbases, hexheads) |
|
|||
40 | allhashes = sorted(c.hex() for c in allcommits) |
|
38 | allhashes = sorted(c.hex() for c in allcommits) | |
41 | totalhash = util.sha1(''.join(allhashes)).hexdigest() |
|
39 | totalhash = util.sha1(''.join(allhashes)).hexdigest() | |
42 | name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix) |
|
40 | name = "%s/%s-%s-%s.hg" % (backupdir, short(node), totalhash[:8], suffix) |
General Comments 0
You need to be logged in to leave comments.
Login now