Mercurial > public > mercurial-scm > hg
diff mercurial/branchmap.py @ 18166:3a2e810dd3d8
branchmap: improve invalid cache message when reading
This factors out the generation of the message. This helps future error reporting
when reading cache for filtered repository.
author | Pierre-Yves David <pierre-yves.david@logilab.fr> |
---|---|
date | Fri, 28 Dec 2012 00:13:32 +0100 |
parents | db25bf1dc828 |
children | 59ac9a551bf4 |
line wrap: on
line diff
--- a/mercurial/branchmap.py Mon Dec 31 17:46:22 2012 -0600 +++ b/mercurial/branchmap.py Fri Dec 28 00:13:32 2012 +0100 @@ -22,21 +22,20 @@ partial = branchcache(tipnode=last, tiprev=lrev) if not partial.validfor(repo): # invalidate the cache - raise ValueError('invalidating branch cache (tip differs)') + raise ValueError('tip differs') for l in lines: if not l: continue node, label = l.split(" ", 1) label = encoding.tolocal(label.strip()) if not node in repo: - raise ValueError('invalidating branch cache because node '+ - '%s does not exist' % node) + raise ValueError('node %s does not exist' % node) partial.setdefault(label, []).append(bin(node)) except KeyboardInterrupt: raise except Exception, inst: if repo.ui.debugflag: - repo.ui.warn(str(inst), '\n') + repo.ui.warn(('invalid branchheads cache: %s\n') % inst) partial = branchcache() return partial