mercurial/wireproto.py
changeset 20916 31eacf182f80
parent 20915 6aae815f3e0d
child 20917 5ad151f8a3fa
equal deleted inserted replaced
20915:6aae815f3e0d 20916:31eacf182f80
   603         elif k == 'bundlecaps':
   603         elif k == 'bundlecaps':
   604             opts[k] = set(v.split(','))
   604             opts[k] = set(v.split(','))
   605     cg = repo.getbundle('serve', **opts)
   605     cg = repo.getbundle('serve', **opts)
   606     return streamres(proto.groupchunks(cg))
   606     return streamres(proto.groupchunks(cg))
   607 
   607 
       
   608 @wireprotocommand('heads')
   608 def heads(repo, proto):
   609 def heads(repo, proto):
   609     h = repo.heads()
   610     h = repo.heads()
   610     return encodelist(h) + "\n"
   611     return encodelist(h) + "\n"
   611 
   612 
   612 def hello(repo, proto):
   613 def hello(repo, proto):
   788     finally:
   789     finally:
   789         fp.close()
   790         fp.close()
   790         os.unlink(tempname)
   791         os.unlink(tempname)
   791 
   792 
   792 commands.update({
   793 commands.update({
   793     'heads': (heads, ''),
       
   794     'hello': (hello, ''),
   794     'hello': (hello, ''),
   795     'known': (known, 'nodes *'),
   795     'known': (known, 'nodes *'),
   796     'listkeys': (listkeys, 'namespace'),
   796     'listkeys': (listkeys, 'namespace'),
   797     'lookup': (lookup, 'key'),
   797     'lookup': (lookup, 'key'),
   798     'pushkey': (pushkey, 'namespace key old new'),
   798     'pushkey': (pushkey, 'namespace key old new'),