Mercurial > hg-stable
comparison mercurial/commands.py @ 9102:bbc78cb1bf15
Merge with stable
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Thu, 09 Jul 2009 19:49:02 -0500 |
parents | 5d6c42f33b71 431462bd8478 |
children | 31177742f54a |
comparison
equal
deleted
inserted
replaced
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: |