[PATCH 09 of 10 V2] branchmap: report filtername when read fails
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu Dec 27 18:56:24 CST 2012
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1356188217 -3600
# Node ID cf84b46c2a1a4914ecac9659e15c34111aab6022
# Parent 427da70a9d079c6ef91408bad67070fc4c1441ff
branchmap: report filtername when read fails
Now that we can have multiple one, we need to know which filecache failed to be
read from disk.
diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py
--- a/mercurial/branchmap.py
+++ b/mercurial/branchmap.py
@@ -46,11 +46,14 @@ def read(repo):
partial.setdefault(label, []).append(bin(node))
except KeyboardInterrupt:
raise
except Exception, inst:
if repo.ui.debugflag:
- repo.ui.warn(('invalid branchheads cache: %s\n') % inst)
+ msg = 'invalid branchheads cache: %s\n'
+ if repo.filtername is not None:
+ msg = 'invalid branchheads cache (%s): %%s\n' % repo.filtername
+ repo.ui.warn(msg % inst)
partial = branchcache()
return partial
More information about the Mercurial-devel
mailing list