~mdw
/
stgit
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Show the stderr for failed GIT commands
[stgit]
/
stgit
/
git.py
diff --git
a/stgit/git.py
b/stgit/git.py
index
05d851d
..
b7f3269
100644
(file)
--- a/
stgit/git.py
+++ b/
stgit/git.py
@@
-117,20
+117,23
@@
def _input(cmd, file_desc):
p.tochild.write(line)
p.tochild.close()
if p.wait():
p.tochild.write(line)
p.tochild.close()
if p.wait():
- raise GitException, '%s failed' % str(cmd)
+ raise GitException, '%s failed (%s)' % (str(cmd),
+ p.childerr.read().strip())
def _input_str(cmd, string):
p = popen2.Popen3(cmd, True)
p.tochild.write(string)
p.tochild.close()
if p.wait():
def _input_str(cmd, string):
p = popen2.Popen3(cmd, True)
p.tochild.write(string)
p.tochild.close()
if p.wait():
- raise GitException, '%s failed' % str(cmd)
+ raise GitException, '%s failed (%s)' % (str(cmd),
+ p.childerr.read().strip())
def _output(cmd):
p=popen2.Popen3(cmd, True)
output = p.fromchild.read()
if p.wait():
def _output(cmd):
p=popen2.Popen3(cmd, True)
output = p.fromchild.read()
if p.wait():
- raise GitException, '%s failed' % str(cmd)
+ raise GitException, '%s failed (%s)' % (str(cmd),
+ p.childerr.read().strip())
return output
def _output_one_line(cmd, file_desc = None):
return output
def _output_one_line(cmd, file_desc = None):
@@
-141,14
+144,16
@@
def _output_one_line(cmd, file_desc = None):
p.tochild.close()
output = p.fromchild.readline().strip()
if p.wait():
p.tochild.close()
output = p.fromchild.readline().strip()
if p.wait():
- raise GitException, '%s failed' % str(cmd)
+ raise GitException, '%s failed (%s)' % (str(cmd),
+ p.childerr.read().strip())
return output
def _output_lines(cmd):
p=popen2.Popen3(cmd, True)
lines = p.fromchild.readlines()
if p.wait():
return output
def _output_lines(cmd):
p=popen2.Popen3(cmd, True)
lines = p.fromchild.readlines()
if p.wait():
- raise GitException, '%s failed' % str(cmd)
+ raise GitException, '%s failed (%s)' % (str(cmd),
+ p.childerr.read().strip())
return lines
def __run(cmd, args=None):
return lines
def __run(cmd, args=None):