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