##// END OF EJS Templates
branchmap: explicitly convert file into iterator...
Yuya Nishihara -
r39174:8547c859 default
parent child Browse files
Show More
@@ -41,7 +41,8 b' def read(repo):'
41 f = None
41 f = None
42 try:
42 try:
43 f = repo.cachevfs(_filename(repo))
43 f = repo.cachevfs(_filename(repo))
44 cachekey = next(f).rstrip('\n').split(" ", 2)
44 lineiter = iter(f)
45 cachekey = next(lineiter).rstrip('\n').split(" ", 2)
45 last, lrev = cachekey[:2]
46 last, lrev = cachekey[:2]
46 last, lrev = bin(last), int(lrev)
47 last, lrev = bin(last), int(lrev)
47 filteredhash = None
48 filteredhash = None
@@ -53,7 +54,7 b' def read(repo):'
53 # invalidate the cache
54 # invalidate the cache
54 raise ValueError(r'tip differs')
55 raise ValueError(r'tip differs')
55 cl = repo.changelog
56 cl = repo.changelog
56 for l in f:
57 for l in lineiter:
57 l = l.rstrip('\n')
58 l = l.rstrip('\n')
58 if not l:
59 if not l:
59 continue
60 continue
General Comments 0
You need to be logged in to leave comments. Login now