hgext/uncommit.py
changeset 49960 c166b212bdee
parent 48983 533820f5b997
child 49961 7a8bfc05b691
equal deleted inserted replaced
49959:376395868b7b 49960:c166b212bdee
   234                 mapping[old.node()] = (newid,)
   234                 mapping[old.node()] = (newid,)
   235             else:
   235             else:
   236                 # Fully removed the old commit
   236                 # Fully removed the old commit
   237                 mapping[old.node()] = ()
   237                 mapping[old.node()] = ()
   238 
   238 
   239             with repo.dirstate.parentchange():
   239             with repo.dirstate.parentchange(repo):
   240                 scmutil.movedirstate(repo, repo[newid], match)
   240                 scmutil.movedirstate(repo, repo[newid], match)
   241 
   241 
   242             scmutil.cleanupnodes(repo, mapping, b'uncommit', fixphase=True)
   242             scmutil.cleanupnodes(repo, mapping, b'uncommit', fixphase=True)
   243 
   243 
   244 
   244 
   315         )
   315         )
   316         newprednode = repo.commitctx(newctx)
   316         newprednode = repo.commitctx(newctx)
   317         newpredctx = repo[newprednode]
   317         newpredctx = repo[newprednode]
   318         dirstate = repo.dirstate
   318         dirstate = repo.dirstate
   319 
   319 
   320         with dirstate.parentchange():
   320         with dirstate.parentchange(repo):
   321             scmutil.movedirstate(repo, newpredctx)
   321             scmutil.movedirstate(repo, newpredctx)
   322 
   322 
   323         mapping = {curctx.node(): (newprednode,)}
   323         mapping = {curctx.node(): (newprednode,)}
   324         scmutil.cleanupnodes(repo, mapping, b'unamend', fixphase=True)
   324         scmutil.cleanupnodes(repo, mapping, b'unamend', fixphase=True)