mirror of
https://git.codelinaro.org/clo/tools/repo.git
synced 2025-06-01 14:43:34 +08:00
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>
This commit is contained in:
@ -19,7 +19,8 @@ import re
|
||||
import sys
|
||||
from urllib2 import urlopen, HTTPError
|
||||
from error import GitError, UploadError
|
||||
from git_command import GitCommand, TRACE
|
||||
from trace import Trace
|
||||
from git_command import GitCommand
|
||||
|
||||
R_HEADS = 'refs/heads/'
|
||||
R_TAGS = 'refs/tags/'
|
||||
@ -189,8 +190,7 @@ class GitConfig(object):
|
||||
except OSError:
|
||||
return None
|
||||
try:
|
||||
if TRACE:
|
||||
print >>sys.stderr, ': unpickle %s' % self.file
|
||||
Trace(': unpickle %s', self.file)
|
||||
return cPickle.load(open(self._pickle, 'r'))
|
||||
except IOError:
|
||||
os.remove(self._pickle)
|
||||
|
Reference in New Issue
Block a user