Show More
@@ -10,7 +10,6 from i18n import _ | |||
|
10 | 10 | from node import bin, hex |
|
11 | 11 | import changegroup as changegroupmod |
|
12 | 12 | import peer, error, encoding, util, store |
|
13 | import discovery, phases | |
|
14 | 13 | |
|
15 | 14 | # abstract batching support |
|
16 | 15 | |
@@ -401,7 +400,7 def between(repo, proto, pairs): | |||
|
401 | 400 | return "".join(r) |
|
402 | 401 | |
|
403 | 402 | def branchmap(repo, proto): |
|
404 |
branchmap = |
|
|
403 | branchmap = repo.branchmap() | |
|
405 | 404 | heads = [] |
|
406 | 405 | for branch, nodes in branchmap.iteritems(): |
|
407 | 406 | branchname = urllib.quote(encoding.fromlocal(branch)) |
@@ -457,7 +456,7 def getbundle(repo, proto, others): | |||
|
457 | 456 | return streamres(proto.groupchunks(cg)) |
|
458 | 457 | |
|
459 | 458 | def heads(repo, proto): |
|
460 |
h = |
|
|
459 | h = repo.heads() | |
|
461 | 460 | return encodelist(h) + "\n" |
|
462 | 461 | |
|
463 | 462 | def hello(repo, proto): |
@@ -480,8 +479,6 def lookup(repo, proto, key): | |||
|
480 | 479 | try: |
|
481 | 480 | k = encoding.tolocal(key) |
|
482 | 481 | c = repo[k] |
|
483 | if c.phase() == phases.secret: | |
|
484 | raise error.RepoLookupError(_("unknown revision '%s'") % k) | |
|
485 | 482 | r = c.hex() |
|
486 | 483 | success = 1 |
|
487 | 484 | except Exception, inst: |
@@ -595,7 +592,7 def unbundle(repo, proto, heads): | |||
|
595 | 592 | their_heads = decodelist(heads) |
|
596 | 593 | |
|
597 | 594 | def check_heads(): |
|
598 |
heads = |
|
|
595 | heads = repo.heads() | |
|
599 | 596 | heads_hash = util.sha1(''.join(sorted(heads))).digest() |
|
600 | 597 | return (their_heads == ['force'] or their_heads == heads or |
|
601 | 598 | their_heads == ['hashed', heads_hash]) |
General Comments 0
You need to be logged in to leave comments.
Login now