From ad3193a0e587073dee0edef46bdf24f6c6e09779 Mon Sep 17 00:00:00 2001 From: "Shawn O. Pearce" Date: Sat, 18 Apr 2009 09:54:51 -0700 Subject: 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 --- git_config.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'git_config.py') 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 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) -- cgit v1.2.3-54-g00ecf