D2018: largefiles: register wire protocol commands with modern APIs

indygreg (Gregory Szorc) phabricator at mercurial-scm.org
Wed Feb 7 17:41:21 EST 2018


This revision was automatically updated to reflect the committed changes.
Closed by commit rHGf540b6448738: largefiles: register wire protocol commands with modern APIs (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D2018?vs=5172&id=5308

REVISION DETAIL
  https://phab.mercurial-scm.org/D2018

AFFECTED FILES
  hgext/largefiles/uisetup.py

CHANGE DETAILS

diff --git a/hgext/largefiles/uisetup.py b/hgext/largefiles/uisetup.py
--- a/hgext/largefiles/uisetup.py
+++ b/hgext/largefiles/uisetup.py
@@ -165,13 +165,13 @@
                             overrides.openlargefile)
 
     # create the new wireproto commands ...
-    wireproto.commands['putlfile'] = (proto.putlfile, 'sha')
-    wireproto.commands['getlfile'] = (proto.getlfile, 'sha')
-    wireproto.commands['statlfile'] = (proto.statlfile, 'sha')
+    wireproto.wireprotocommand('putlfile', 'sha')(proto.putlfile)
+    wireproto.wireprotocommand('getlfile', 'sha')(proto.getlfile)
+    wireproto.wireprotocommand('statlfile', 'sha')(proto.statlfile)
+    wireproto.wireprotocommand('lheads', '')(wireproto.heads)
 
     # ... and wrap some existing ones
-    wireproto.commands['heads'] = (proto.heads, '')
-    wireproto.commands['lheads'] = (wireproto.heads, '')
+    wireproto.commands['heads'].func = proto.heads
 
     # make putlfile behave the same as push and {get,stat}lfile behave
     # the same as pull w.r.t. permissions checks



To: indygreg, #hg-reviewers, durin42
Cc: mercurial-devel


More information about the Mercurial-devel mailing list