Commit f347c6da5e83b137c337f9ccb190090c27cfc953
- Date: Wed Jun 11 15:14:26 +0000 2008
- Committer: Florian Apolloner (florian@apolloner.eu)
- Author: Florian Apolloner (florian@apolloner.eu)
- Commit SHA1: f347c6da5e83b137c337f9ccb190090c27cfc953
- Tree SHA1: 793b9e11cc84072c1214cc3697cc27c482a39852
added support for GIT_PYTHON_TRACE=='full', thx to SRabbelier for the suggestion
Commit diff
| |   |
| 84 | 84 | tuple(int(status), str(output)) # with_status = True |
| 85 | 85 | """ |
| 86 | 86 | |
| 87 | | if GIT_PYTHON_TRACE: |
| 88 | | print command |
| 87 | if GIT_PYTHON_TRACE and not GIT_PYTHON_TRACE == 'full': |
| 88 | print ' '.join(command) |
| 89 | 89 | |
| 90 | 90 | # Allow stderr to be merged into stdout when with_stderr is True. |
| 91 | 91 | # Otherwise, throw stderr away. |
| … | … | |
| 117 | 117 | raise GitCommandError("%s returned exit status %d" |
| 118 | 118 | % (str(command), status)) |
| 119 | 119 | |
| 120 | if GIT_PYTHON_TRACE == 'full': |
| 121 | print "%s %d: '%s'" % (command, status, stdout_value) |
| 122 | |
| 120 | 123 | # Allow access to the command's status code |
| 121 | 124 | if with_status: |
| 122 | 125 | return (status, stdout_value) |
| toggle raw diff |
--- a/lib/git/cmd.py
+++ b/lib/git/cmd.py
@@ -84,8 +84,8 @@ class Git(MethodMissingMixin):
tuple(int(status), str(output)) # with_status = True
"""
- if GIT_PYTHON_TRACE:
- print command
+ if GIT_PYTHON_TRACE and not GIT_PYTHON_TRACE == 'full':
+ print ' '.join(command)
# Allow stderr to be merged into stdout when with_stderr is True.
# Otherwise, throw stderr away.
@@ -117,6 +117,9 @@ class Git(MethodMissingMixin):
raise GitCommandError("%s returned exit status %d"
% (str(command), status))
+ if GIT_PYTHON_TRACE == 'full':
+ print "%s %d: '%s'" % (command, status, stdout_value)
+
# Allow access to the command's status code
if with_status:
return (status, stdout_value) |