##// END OF EJS Templates
get stderr also for git commands, pass in shell = False
marcink -
r2760:fd5f2b21 beta
parent child Browse files
Show More
@@ -341,9 +341,10 b' class SubprocessIOChunker(object):'
341 if isinstance(cmd, (list, tuple)):
341 if isinstance(cmd, (list, tuple)):
342 cmd = ' '.join(cmd)
342 cmd = ' '.join(cmd)
343
343
344 _shell = kwargs.get('shell') or True
345 kwargs['shell'] = _shell
344 _p = subprocess.Popen(cmd,
346 _p = subprocess.Popen(cmd,
345 bufsize=-1,
347 bufsize=-1,
346 shell=True,
347 stdin=inputstream,
348 stdin=inputstream,
348 stdout=subprocess.PIPE,
349 stdout=subprocess.PIPE,
349 stderr=subprocess.PIPE,
350 stderr=subprocess.PIPE,
@@ -115,6 +115,7 b' class GitRepository(BaseRepository):'
115 try:
115 try:
116 opts = dict(
116 opts = dict(
117 env=gitenv,
117 env=gitenv,
118 shell=False,
118 )
119 )
119 if os.path.isdir(self.path):
120 if os.path.isdir(self.path):
120 opts['cwd'] = self.path
121 opts['cwd'] = self.path
@@ -124,9 +125,7 b' class GitRepository(BaseRepository):'
124 raise RepositoryError("Couldn't run git command (%s).\n"
125 raise RepositoryError("Couldn't run git command (%s).\n"
125 "Original error was:%s" % (cmd, err))
126 "Original error was:%s" % (cmd, err))
126
127
127 so = ''.join(p)
128 return ''.join(p.output), ''.join(p.error)
128 se = None
129 return so, se
130
129
131 @classmethod
130 @classmethod
132 def _check_url(cls, url):
131 def _check_url(cls, url):
General Comments 0
You need to be logged in to leave comments. Login now