comparison mercurial/branchmap.py @ 18187:4df8716d32f1

branchmap: use a different file name for filtered view of repo
author Pierre-Yves David <pierre-yves.david@ens-lyon.org>
date Mon, 24 Dec 2012 03:06:03 +0100
parents 5a047276764e
children 46ed5226503a
comparison
equal deleted inserted replaced
18186:d336f53cb2e3 18187:4df8716d32f1
8 from node import bin, hex, nullid, nullrev 8 from node import bin, hex, nullid, nullrev
9 import encoding 9 import encoding
10 import util 10 import util
11 11
12 def _filename(repo): 12 def _filename(repo):
13 """name of a branchcache file for a given repo""" 13 """name of a branchcache file for a given repo or repoview"""
14 return "cache/branchheads" 14 filename = "cache/branchheads"
15 if repo.filtername:
16 filename = '%s-%s' % (filename, repo.filtername)
17 return filename
15 18
16 def read(repo): 19 def read(repo):
17 try: 20 try:
18 f = repo.opener(_filename(repo)) 21 f = repo.opener(_filename(repo))
19 lines = f.read().split('\n') 22 lines = f.read().split('\n')