# HG changeset patch # User Pierre-Yves David # Date 2013-01-19 01:29:56 # Node ID d6b3b36f1db2e3861bed85fa4a443aa9ca288a9b # Parent 4f9a5285851231cff8223575cf2af09d81db1c0b branchmap: display filtername when `updatebranch` fails to do its jobs We have a very handy assert at the ends of `branchmap.updatecache` that check the resulting branchmap is actually valid. I know we do not like assert in mercurial but this one is very handy for debugging. There is really not reason for `branchmap.updatecache` to have this kind of issue but this happened and handful of time during the development of this or introduction of other related feature. I advice to keep it around until we are a bit more confident with the new code. diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -79,7 +79,7 @@ def updatecache(repo): if revs: partial.update(repo, revs) partial.write(repo) - assert partial.validfor(repo) + assert partial.validfor(repo), filtername repo._branchcaches[repo.filtername] = partial class branchcache(dict):