mercurial/branchmap.py
changeset 18187 4df8716d32f1
parent 18185 5a047276764e
child 18188 46ed5226503a
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')