diff options
| author | Shawn O. Pearce <sop@google.com> | 2009-04-18 09:54:51 -0700 |
|---|---|---|
| committer | Shawn O. Pearce <sop@google.com> | 2009-04-18 09:54:51 -0700 |
| commit | ad3193a0e587073dee0edef46bdf24f6c6e09779 (patch) | |
| tree | 84ed1894e6f590455ee361beb049c1c271c4e0e7 /git_config.py | |
| parent | b81ac9e65444d0f54d2b6dd24d20b74945c9a36a (diff) | |
| download | git-repo-ad3193a0e587073dee0edef46bdf24f6c6e09779.tar.gz | |
Fix `repo --trace` to show ref and config loads
The value of the varible TRACE was copied during the import, which
happens before the --trace option can be processed. So instead we
now use a function to determine if the value is set, as the function
can be safely copied early during import.
Signed-off-by: Shawn O. Pearce <sop@google.com>
Diffstat (limited to 'git_config.py')
| -rw-r--r-- | git_config.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/git_config.py b/git_config.py index f65a0353..78069c5d 100644 --- a/git_config.py +++ b/git_config.py | |||
| @@ -19,7 +19,8 @@ import re | |||
| 19 | import sys | 19 | import sys |
| 20 | from urllib2 import urlopen, HTTPError | 20 | from urllib2 import urlopen, HTTPError |
| 21 | from error import GitError, UploadError | 21 | from error import GitError, UploadError |
| 22 | from git_command import GitCommand, TRACE | 22 | from trace import Trace |
| 23 | from git_command import GitCommand | ||
| 23 | 24 | ||
| 24 | R_HEADS = 'refs/heads/' | 25 | R_HEADS = 'refs/heads/' |
| 25 | R_TAGS = 'refs/tags/' | 26 | R_TAGS = 'refs/tags/' |
| @@ -189,8 +190,7 @@ class GitConfig(object): | |||
| 189 | except OSError: | 190 | except OSError: |
| 190 | return None | 191 | return None |
| 191 | try: | 192 | try: |
| 192 | if TRACE: | 193 | Trace(': unpickle %s', self.file) |
| 193 | print >>sys.stderr, ': unpickle %s' % self.file | ||
| 194 | return cPickle.load(open(self._pickle, 'r')) | 194 | return cPickle.load(open(self._pickle, 'r')) |
| 195 | except IOError: | 195 | except IOError: |
| 196 | os.remove(self._pickle) | 196 | os.remove(self._pickle) |
