mercurial/context.py
changeset 41776 322ce0bca19d
parent 41770 c7a843aa4b42
child 41789 2ba96fca8528
equal deleted inserted replaced
41775:a86e22007b54 41776:322ce0bca19d
  2232     This is a convenience method for building a memctx based on another
  2232     This is a convenience method for building a memctx based on another
  2233     context.
  2233     context.
  2234     """
  2234     """
  2235     def getfilectx(repo, memctx, path):
  2235     def getfilectx(repo, memctx, path):
  2236         fctx = ctx[path]
  2236         fctx = ctx[path]
  2237         copied = fctx.renamed()
  2237         copied = fctx.copysource()
  2238         if copied:
       
  2239             copied = copied[0]
       
  2240         return memfilectx(repo, memctx, path, fctx.data(),
  2238         return memfilectx(repo, memctx, path, fctx.data(),
  2241                           islink=fctx.islink(), isexec=fctx.isexec(),
  2239                           islink=fctx.islink(), isexec=fctx.isexec(),
  2242                           copied=copied)
  2240                           copied=copied)
  2243 
  2241 
  2244     return getfilectx
  2242     return getfilectx