changeset 9102 | bbc78cb1bf15 |
parent 9080 | 5d6c42f33b71 |
parent 9097 | 431462bd8478 |
child 9136 | 31177742f54a |
9092:9aebeea7ac00 | 9102:bbc78cb1bf15 |
---|---|
1181 return None |
1181 return None |
1182 sep, eol = ':', '\n' |
1182 sep, eol = ':', '\n' |
1183 if opts.get('print0'): |
1183 if opts.get('print0'): |
1184 sep = eol = '\0' |
1184 sep = eol = '\0' |
1185 |
1185 |
1186 fcache = {} |
1186 getfile = util.lrucachefunc(repo.file) |
1187 forder = [] |
|
1188 def getfile(fn): |
|
1189 if fn not in fcache: |
|
1190 if len(fcache) > 20: |
|
1191 del fcache[forder.pop(0)] |
|
1192 fcache[fn] = repo.file(fn) |
|
1193 else: |
|
1194 forder.remove(fn) |
|
1195 |
|
1196 forder.append(fn) |
|
1197 return fcache[fn] |
|
1198 |
1187 |
1199 def matchlines(body): |
1188 def matchlines(body): |
1200 begin = 0 |
1189 begin = 0 |
1201 linenum = 0 |
1190 linenum = 0 |
1202 while True: |
1191 while True: |