equal
deleted
inserted
replaced
642 |
642 |
643 @wireprotocommand('known', 'nodes *') |
643 @wireprotocommand('known', 'nodes *') |
644 def known(repo, proto, nodes, others): |
644 def known(repo, proto, nodes, others): |
645 return ''.join(b and "1" or "0" for b in repo.known(decodelist(nodes))) |
645 return ''.join(b and "1" or "0" for b in repo.known(decodelist(nodes))) |
646 |
646 |
|
647 @wireprotocommand('pushkey', 'namespace key old new') |
647 def pushkey(repo, proto, namespace, key, old, new): |
648 def pushkey(repo, proto, namespace, key, old, new): |
648 # compatibility with pre-1.8 clients which were accidentally |
649 # compatibility with pre-1.8 clients which were accidentally |
649 # sending raw binary nodes rather than utf-8-encoded hex |
650 # sending raw binary nodes rather than utf-8-encoded hex |
650 if len(new) == 20 and new.encode('string-escape') != new: |
651 if len(new) == 20 and new.encode('string-escape') != new: |
651 # looks like it could be a binary node |
652 # looks like it could be a binary node |
793 finally: |
794 finally: |
794 fp.close() |
795 fp.close() |
795 os.unlink(tempname) |
796 os.unlink(tempname) |
796 |
797 |
797 commands.update({ |
798 commands.update({ |
798 'pushkey': (pushkey, 'namespace key old new'), |
|
799 'stream_out': (stream, ''), |
799 'stream_out': (stream, ''), |
800 'unbundle': (unbundle, 'heads'), |
800 'unbundle': (unbundle, 'heads'), |
801 }) |
801 }) |