branchmap: report filtername when read fails
authorPierre-Yves David <pierre-yves.david@logilab.fr>
Tue, 01 Jan 2013 21:27:13 +0100
changeset 18188 46ed5226503a
parent 18187 4df8716d32f1
child 18189 b9026ba002f6
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.
mercurial/branchmap.py
--- a/mercurial/branchmap.py	Mon Dec 24 03:06:03 2012 +0100
+++ b/mercurial/branchmap.py	Tue Jan 01 21:27:13 2013 +0100
@@ -48,7 +48,11 @@
         raise
     except Exception, inst:
         if repo.ui.debugflag:
-            repo.ui.warn(('invalid branchheads cache: %s\n') % inst)
+            msg = 'invalid branchheads cache'
+            if repo.filtername is not None:
+                msg += ' (%s)' % repo.filtername
+            msg += ': %s\n'
+            repo.ui.warn(msg % inst)
         partial = branchcache()
     return partial