Commit b9f68d50 authored by Eric S. Raymond's avatar Eric S. Raymond

Make hint reporting less noisy.

parent 36825514
......@@ -4822,6 +4822,7 @@ def __init__(self, name=None):
self.readtime = time.time()
self.vcs = None
self.stronghint = False
self.hintlist = []
self.sourcedir = None
self.seekstream = None = [] # A list of the events encountered, in order
......@@ -4863,14 +4864,18 @@ def makedir(self):
raise Fatal(b"can't create operating directory")
def hint(self, name, strong=False):
"Hint what the source of this repository might be."
newvcs = next(vcstype for vcstype in vcstypes if == name)
if self.vcs and self.vcs != newvcs and self.stronghint and strong:
raise Recoverable("new hint %s conficts with old %s" \
% (,
newhint = not self.hintlist or name not in self.hintlist
if newhint and self.stronghint and strong:
announce("new hint %s conficts with old %s" \
% (name, self.hintlist[-1]))
return False
if not self.stronghint:
self.vcs = newvcs
self.vcs = next(vcstype for vcstype in vcstypes if == name)
if newhint:
notify = newhint and not self.stronghint
self.stronghint = self.stronghint or strong
return not self.stronghint
return notify
def size(self):
"Return the size of this import stream, for statistics display."
return sum(len(str(e)) for e in
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment