comparison mercurial/patch.py @ 9684:618af2034ca6

patch: use the public ctx API instead of the internals
author Benoit Boissinot <benoit.boissinot@ens-lyon.org>
date Sat, 31 Oct 2009 18:02:34 +0100
parents 5c8651e2f5e0
children 18b134ef294c
comparison
equal deleted inserted replaced
9683:5c8651e2f5e0 9684:618af2034ca6
1225 def getfilectx(f, ctx): 1225 def getfilectx(f, ctx):
1226 fctx = ctx.filectx(f, filelog=cache.get(f)) 1226 fctx = ctx.filectx(f, filelog=cache.get(f))
1227 if f not in cache: 1227 if f not in cache:
1228 if len(cache) > 20: 1228 if len(cache) > 20:
1229 del cache[order.pop(0)] 1229 del cache[order.pop(0)]
1230 cache[f] = fctx._filelog 1230 cache[f] = fctx.filelog()
1231 else: 1231 else:
1232 order.remove(f) 1232 order.remove(f)
1233 order.append(f) 1233 order.append(f)
1234 return fctx 1234 return fctx
1235 return getfilectx 1235 return getfilectx