mirror of
https://github.com/facebook/sapling.git
synced 2024-10-07 15:27:13 +03:00
sshrepo: flush stderr before connecting to the hg server
This commit is contained in:
parent
7378a6b49a
commit
45f114cbf2
@ -52,6 +52,9 @@ class sshrepository(remoterepository):
|
||||
return self._url
|
||||
|
||||
def validate_repo(self, ui, sshcmd, args, remotecmd):
|
||||
# cleanup up previous run
|
||||
self.cleanup()
|
||||
|
||||
cmd = '%s %s "%s -R %s serve --stdio"'
|
||||
cmd = cmd % (sshcmd, args, remotecmd, self.path)
|
||||
|
||||
@ -90,7 +93,7 @@ class sshrepository(remoterepository):
|
||||
if not l: break
|
||||
self.ui.status(_("remote: "), l)
|
||||
|
||||
def __del__(self):
|
||||
def cleanup(self):
|
||||
try:
|
||||
self.pipeo.close()
|
||||
self.pipei.close()
|
||||
@ -101,6 +104,8 @@ class sshrepository(remoterepository):
|
||||
except:
|
||||
pass
|
||||
|
||||
__del__ = cleanup
|
||||
|
||||
def do_cmd(self, cmd, **args):
|
||||
self.ui.debug(_("sending %s command\n") % cmd)
|
||||
self.pipeo.write("%s\n" % cmd)
|
||||
|
@ -1,6 +1,7 @@
|
||||
# creating 'local'
|
||||
adding foo
|
||||
# init+push to remote2
|
||||
remote: abort: repository remote2 not found!
|
||||
changeset: 0:c4e059d443be
|
||||
tag: tip
|
||||
user: test
|
||||
@ -14,6 +15,7 @@ remote: adding manifests
|
||||
remote: adding file changes
|
||||
remote: added 1 changesets with 1 changes to 1 files
|
||||
# clone to remote1
|
||||
remote: abort: repository remote1 not found!
|
||||
searching for changes
|
||||
remote: abort: repository remote1 not found!
|
||||
remote: adding changesets
|
||||
|
Loading…
Reference in New Issue
Block a user