Mercurial > hg
changeset 35934:94ba29934f00
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
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sun, 04 Feb 2018 11:40:13 -0800 |
parents | 805edf16e8e0 |
children | 00b9e26d727b |
files | mercurial/sshpeer.py |
diffstat | 1 files changed, 1 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mercurial/sshpeer.py Sun Feb 04 11:37:19 2018 -0800 +++ b/mercurial/sshpeer.py Sun Feb 04 11:40:13 2018 -0800 @@ -173,8 +173,7 @@ # 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" %