Commit e8d2f9de authored by Matthias Putz's avatar Matthias Putz

--amend

parent c0bbe1bf
......@@ -225,6 +225,7 @@ class GitCommand(object):
if ssh_proxy:
_add_ssh_client(p)
portable.SUBPROCESSES.append(p)
self.process = p
self.stdin = p.stdin
......@@ -233,6 +234,7 @@ class GitCommand(object):
p = self.process
(self.stdout, self.stderr) = p.communicate()
rc = p.returncode
portable.SUBPROCESSES.remove(p)
finally:
_remove_ssh_client(p)
return rc
......@@ -25,6 +25,7 @@ import sys
import traceback
import time
import urllib.request
import signal
import portable
from repo_trace import SetTrace
from git_command import git, GitCommand
......@@ -424,6 +425,8 @@ def _WindowsPager(repo):
def _Main(argv):
result = 0
signal.signal(signal.SIGTERM, portable.terminateHandle())
opt = optparse.OptionParser(usage="repo wrapperinfo -- ...")
opt.add_option("--repo-dir", dest="repodir",
help="path to .repo/")
......
......@@ -9,6 +9,12 @@ import platform
import subprocess
SYNC_REPO_PROGRAM = False
SUBPROCESSES = []
def terminateHandle():
for cmd in SUBPROCESSES:
if cmd:
cmd.terminate()
def stream2str(stream):
return str(stream, encoding='UTF-8')
......@@ -44,7 +50,7 @@ def os_link(src, dst):
dst = toWindowsPath(dst)
# symlink does create soft links in windows for directories => use mklink
# call windows cmd tool 'mklink' from git bash (mingw)
subprocess.Popen('cmd /c mklink /J %s %s' % (dst, src))
subprocess.Popen('cmd /c mklink /J %s %s' % (dst, src), stdout=subprocess.PIPE)
else:
# requires paths in relation to current dir (not in relation to target file)
src = toUnixPath(src)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment