diff hgext/remotefilelog/remotefilelogserver.py @ 40511:466dd4d70bff

remotefilelog: rename wireproto methods and remaining capabilities This is a mess, in part because there should be more constants throughout. I know we typically do exp- instead of the x_ business in this change, but I also had to use this in some function names, so I figured until I can break that coupling I'd go with this. If it's too unpleasant during review, let me know and I can probably clean it up some more. # no-check-commit due to new foo_bar naming - too hard to avoid right now :( Differential Revision: https://phab.mercurial-scm.org/D5129
author Augie Fackler <augie@google.com>
date Thu, 04 Oct 2018 10:03:10 -0400
parents fc2766860796
children 6f0b6905ef6f
line wrap: on
line diff
--- a/hgext/remotefilelog/remotefilelogserver.py	Tue Oct 16 17:02:48 2018 -0400
+++ b/hgext/remotefilelog/remotefilelogserver.py	Thu Oct 04 10:03:10 2018 -0400
@@ -77,11 +77,11 @@
 
     # support file content requests
     wireprotov1server.wireprotocommand(
-        'getflogheads', 'path', permission='pull')(getflogheads)
+        'x_rfl_getflogheads', 'path', permission='pull')(getflogheads)
     wireprotov1server.wireprotocommand(
-        'getfiles', '', permission='pull')(getfiles)
+        'x_rfl_getfiles', '', permission='pull')(getfiles)
     wireprotov1server.wireprotocommand(
-        'getfile', 'file node', permission='pull')(getfile)
+        'x_rfl_getfile', 'file node', permission='pull')(getfile)
 
     class streamstate(object):
         match = None
@@ -198,8 +198,8 @@
             if isinstance(proto, _sshv1server):
                 # legacy getfiles method which only works over ssh
                 caps.append(constants.NETWORK_CAP_LEGACY_SSH_GETFILES)
-            caps.append('getflogheads')
-            caps.append('getfile')
+            caps.append('x_rfl_getflogheads')
+            caps.append('x_rfl_getfile')
         return caps
     extensions.wrapfunction(wireprotov1server, '_capabilities', _capabilities)
 
@@ -215,7 +215,7 @@
         context.basefilectx, '_adjustlinkrev', _adjustlinkrev)
 
     def _iscmd(orig, cmd):
-        if cmd == 'getfiles':
+        if cmd == 'x_rfl_getfiles':
             return False
         return orig(cmd)