aboutsummaryrefslogtreecommitdiffstats
path: root/libbe/storage/vcs/base.py
diff options
context:
space:
mode:
authorW. Trevor King <wking@drexel.edu>2010-01-25 07:31:57 -0500
committerW. Trevor King <wking@drexel.edu>2010-01-25 07:31:57 -0500
commita87dde3eab86554f0ff70fb53d142ca7bca28b55 (patch)
treedc333344283ce3b980735d20d0a1d2f6f1f951ee /libbe/storage/vcs/base.py
parent7d01fa142b05149479e633525fc4d7ddfa2addf0 (diff)
downloadbugseverywhere-a87dde3eab86554f0ff70fb53d142ca7bca28b55.tar.gz
Don't print 'Multiple paths' message on cache regen
Diffstat (limited to 'libbe/storage/vcs/base.py')
-rw-r--r--libbe/storage/vcs/base.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/libbe/storage/vcs/base.py b/libbe/storage/vcs/base.py
index 7068e46..2269424 100644
--- a/libbe/storage/vcs/base.py
+++ b/libbe/storage/vcs/base.py
@@ -182,7 +182,7 @@ class CachedPathID (object):
self._cache_path = os.path.join(
self._root, self._spacer_dirs[0], 'id-cache')
- def init(self):
+ def init(self, verbose=True):
"""
Create cache file for an existing .be directory.
File if multiple lines of the form:
@@ -197,7 +197,7 @@ class CachedPathID (object):
id = self.id(dirpath)
relpath = dirpath[len(self._root)+1:]
if id.count('/') == 0:
- if id in self._cache:
+ if verbose == True and id in self._cache:
print >> sys.stderr, 'Multiple paths for %s: \n %s\n %s' % (id, self._cache[id], relpath)
self._cache[id] = relpath
except InvalidPath:
@@ -240,7 +240,7 @@ class CachedPathID (object):
extra = fields[1:]
if uuid not in self._cache:
self.disconnect()
- self.init()
+ self.init(verbose=False)
self.connect()
if uuid not in self._cache:
raise InvalidID(uuid)