# HG changeset patch # User Pierre-Yves David # Date 2012-12-24 02:06:03 # Node ID 4df8716d32f188caae4da08790afaedb2b383dfc # Parent d336f53cb2e315fd7928dc610a06e9e208609222 branchmap: use a different file name for filtered view of repo diff --git a/mercurial/branchmap.py b/mercurial/branchmap.py --- a/mercurial/branchmap.py +++ b/mercurial/branchmap.py @@ -10,8 +10,11 @@ import encoding import util def _filename(repo): - """name of a branchcache file for a given repo""" - return "cache/branchheads" + """name of a branchcache file for a given repo or repoview""" + filename = "cache/branchheads" + if repo.filtername: + filename = '%s-%s' % (filename, repo.filtername) + return filename def read(repo): try: