wireproto: use decorator for the heads command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:40:31 -0700
changeset 20916 31eacf182f80
parent 20915 6aae815f3e0d
child 20917 5ad151f8a3fa
wireproto: use decorator for the heads command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:40:07 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:40:31 2014 -0700
@@ -605,6 +605,7 @@
     cg = repo.getbundle('serve', **opts)
     return streamres(proto.groupchunks(cg))
 
+@wireprotocommand('heads')
 def heads(repo, proto):
     h = repo.heads()
     return encodelist(h) + "\n"
@@ -790,7 +791,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'heads': (heads, ''),
     'hello': (hello, ''),
     'known': (known, 'nodes *'),
     'listkeys': (listkeys, 'namespace'),