mercurial/patch.py
changeset 9684 618af2034ca6
parent 9683 5c8651e2f5e0
child 9712 18b134ef294c
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