D2215: httppeer: remove redundant code to fetch capabilities
indygreg (Gregory Szorc)
phabricator at mercurial-scm.org
Wed Feb 14 21:05:20 EST 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd4012729cfe0: httppeer: remove redundant code to fetch capabilities (authored by indygreg, committed by ).
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D2215?vs=5614&id=5743
REVISION DETAIL
https://phab.mercurial-scm.org/D2215
AFFECTED FILES
mercurial/httppeer.py
CHANGE DETAILS
diff --git a/mercurial/httppeer.py b/mercurial/httppeer.py
--- a/mercurial/httppeer.py
+++ b/mercurial/httppeer.py
@@ -221,13 +221,9 @@
# Begin of _basewirepeer interface.
def capabilities(self):
- if self._caps is None:
- try:
- self._fetchcaps()
- except error.RepoError:
- self._caps = set()
- self.ui.debug('capabilities: %s\n' %
- (' '.join(self._caps or ['none'])))
+ # self._fetchcaps() should have been called as part of peer
+ # handshake. So self._caps should always be set.
+ assert self._caps is not None
return self._caps
# End of _basewirepeer interface.
To: indygreg, #hg-reviewers, lothiraldan
Cc: mercurial-devel
More information about the Mercurial-devel
mailing list