mercurial/copies.py
changeset 30360 0298a07f64d9
parent 30229 69ffbbe73dd0
child 30361 1070df141718
equal deleted inserted replaced
30359:673f0fdc1046 30360:0298a07f64d9
   276         if rev is None:
   276         if rev is None:
   277             revs = [p.rev() for p in ctx.parents()]
   277             revs = [p.rev() for p in ctx.parents()]
   278         ac = repo.changelog.ancestors(revs, inclusive=True)
   278         ac = repo.changelog.ancestors(revs, inclusive=True)
   279         ctx._ancestrycontext = ac
   279         ctx._ancestrycontext = ac
   280     def makectx(f, n):
   280     def makectx(f, n):
   281         if len(n) != 20:  # in a working context?
   281         if len(n) != 20 or n in node.wdirnodes:  # in a working context?
   282             if ctx.rev() is None:
   282             if ctx.rev() is None:
   283                 return ctx.filectx(f)
   283                 return ctx.filectx(f)
   284             return repo[None][f]
   284             return repo[None][f]
   285         fctx = repo.filectx(f, fileid=n)
   285         fctx = repo.filectx(f, fileid=n)
   286         # setup only needed for filectx not create from a changectx
   286         # setup only needed for filectx not create from a changectx