Mercurial > public > mercurial-scm > hg-stable
diff hgext/remotefilelog/fileserverclient.py @ 40558:354acd0dc637
remotefilelog: rename capability for legacy ssh file fetching method
I think I want to delete this, but for now we'll just rename this so
it's easy to tell apart from other strings that have the same value.
Differential Revision: https://phab.mercurial-scm.org/D5126
author | Augie Fackler <augie@google.com> |
---|---|
date | Tue, 16 Oct 2018 16:38:40 -0400 |
parents | e2a1584e9e3f |
children | ed19958dbf5d |
line wrap: on
line diff
--- a/hgext/remotefilelog/fileserverclient.py Thu Oct 04 00:11:37 2018 -0400 +++ b/hgext/remotefilelog/fileserverclient.py Tue Oct 16 16:38:40 2018 -0400 @@ -78,7 +78,8 @@ def _updatecallstreamopts(self, command, opts): if command != 'getbundle': return - if 'remotefilelog' not in self.capabilities(): + if (constants.NETWORK_CAP_LEGACY_SSH_GETFILES + not in self.capabilities()): return if not util.safehasattr(self, '_localrepo'): return @@ -377,9 +378,8 @@ try: with self._connect() as conn: remote = conn.peer - # TODO: deduplicate this with the constant in - # shallowrepo - if remote.capable("remotefilelog"): + if remote.capable( + constants.NETWORK_CAP_LEGACY_SSH_GETFILES): if not isinstance(remote, _sshv1peer): raise error.Abort('remotefilelog requires ssh ' 'servers')