wireproto: use decorator for the branchmap command
authorPierre-Yves David <pierre-yves.david@fb.com>
Fri, 28 Mar 2014 14:36:41 -0700
changeset 20909 c8b9cbf55840
parent 20908 ae4bf69c8068
child 20910 acbfce12fafd
wireproto: use decorator for the branchmap command
mercurial/wireproto.py
--- a/mercurial/wireproto.py	Fri Mar 28 14:36:05 2014 -0700
+++ b/mercurial/wireproto.py	Fri Mar 28 14:36:41 2014 -0700
@@ -521,6 +521,7 @@
         r.append(encodelist(b) + "\n")
     return "".join(r)
 
+@wireprotocommand('branchmap')
 def branchmap(repo, proto):
     branchmap = repo.branchmap()
     heads = []
@@ -783,7 +784,6 @@
         os.unlink(tempname)
 
 commands.update({
-    'branchmap': (branchmap, ''),
     'branches': (branches, 'nodes'),
     'capabilities': (capabilities, ''),
     'changegroup': (changegroup, 'roots'),