# HG changeset patch # User Gregory Szorc # Date 2018-02-04 19:40:13 # Node ID 94ba29934f00038c2f68b7d991d9ef80115d7ecb # Parent 805edf16e8e00b514562b826e1df140b58afb31e sshpeer: remove frivolous call to _cleanup() _validaterepo() is called once during __init__. _cleanup() no-ops if the self._pipe* attributes aren't set. These attributes are set during _validaterepo(). So the call to _cleanup() isn't necessary. But just to be on the safe side, we add an assertion. Differential Revision: https://phab.mercurial-scm.org/D2030 diff --git a/mercurial/sshpeer.py b/mercurial/sshpeer.py --- a/mercurial/sshpeer.py +++ b/mercurial/sshpeer.py @@ -173,8 +173,7 @@ class sshpeer(wireproto.wirepeer): # End of _basewirecommands interface. def _validaterepo(self, sshcmd, args, remotecmd, sshenv=None): - # cleanup up previous run - self._cleanup() + assert self._pipei is None cmd = '%s %s %s' % (sshcmd, args, util.shellquote("%s -R %s serve --stdio" %