Mercurial > public > mercurial-scm > hg-stable
diff hgext/remotefilelog/fileserverclient.py @ 40561: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 | 13d4ad8d7801 |
line wrap: on
line diff
--- a/hgext/remotefilelog/fileserverclient.py Tue Oct 16 17:02:48 2018 -0400 +++ b/hgext/remotefilelog/fileserverclient.py Thu Oct 04 10:03:10 2018 -0400 @@ -54,8 +54,8 @@ class remotefilepeer(peer.__class__): @wireprotov1peer.batchable - def getfile(self, file, node): - if not self.capable('getfile'): + def x_rfl_getfile(self, file, node): + if not self.capable('x_rfl_getfile'): raise error.Abort( 'configured remotefile server does not support getfile') f = wireprotov1peer.future() @@ -66,8 +66,8 @@ yield data @wireprotov1peer.batchable - def getflogheads(self, path): - if not self.capable('getflogheads'): + def x_rfl_getflogheads(self, path): + if not self.capable('x_rfl_getflogheads'): raise error.Abort('configured remotefile server does not ' 'support getflogheads') f = wireprotov1peer.future() @@ -204,7 +204,7 @@ with remote.commandexecutor() as e: futures = [] for m in missed: - futures.append(e.callcommand('getfile', { + futures.append(e.callcommand('x_rfl_getfile', { 'file': idmap[m], 'node': m[-40:] })) @@ -219,7 +219,7 @@ def _getfiles_optimistic( remote, receivemissing, progresstick, missed, idmap, step): - remote._callstream("getfiles") + remote._callstream("x_rfl_getfiles") i = 0 pipeo = remote._pipeo pipei = remote._pipei @@ -394,7 +394,7 @@ _getfiles = _getfiles_optimistic _getfiles(remote, self.receivemissing, progresstick, missed, idmap, step) - elif remote.capable("getfile"): + elif remote.capable("x_rfl_getfile"): if remote.capable('batch'): batchdefault = 100 else: