equal
deleted
inserted
replaced
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') |