mercurial/patch.py
changeset 6532 833be17000b6
parent 6531 c2c4fa9af016
child 6602 a57a27b12965
equal deleted inserted replaced
6531:c2c4fa9af016 6532:833be17000b6
  1166         fp = repo.ui
  1166         fp = repo.ui
  1167 
  1167 
  1168     if not node1:
  1168     if not node1:
  1169         node1 = repo.dirstate.parents()[0]
  1169         node1 = repo.dirstate.parents()[0]
  1170 
  1170 
  1171     ccache = {}
       
  1172     def getctx(r):
       
  1173         if r not in ccache:
       
  1174             ccache[r] = context.changectx(repo, r)
       
  1175         return ccache[r]
       
  1176 
       
  1177     flcache = {}
  1171     flcache = {}
  1178     def getfilectx(f, ctx):
  1172     def getfilectx(f, ctx):
  1179         flctx = ctx.filectx(f, filelog=flcache.get(f))
  1173         flctx = ctx.filectx(f, filelog=flcache.get(f))
  1180         if f not in flcache:
  1174         if f not in flcache:
  1181             flcache[f] = flctx._filelog
  1175             flcache[f] = flctx._filelog