177 mapping[old.node()] = (newid,) |
177 mapping[old.node()] = (newid,) |
178 else: |
178 else: |
179 # Fully removed the old commit |
179 # Fully removed the old commit |
180 mapping[old.node()] = () |
180 mapping[old.node()] = () |
181 |
181 |
182 scmutil.cleanupnodes(repo, mapping, 'uncommit', fixphase=True) |
|
183 |
|
184 with repo.dirstate.parentchange(): |
182 with repo.dirstate.parentchange(): |
185 repo.dirstate.setparents(newid, node.nullid) |
183 repo.dirstate.setparents(newid, node.nullid) |
186 s = old.p1().status(old, match=match) |
184 s = old.p1().status(old, match=match) |
187 _fixdirstate(repo, old, repo[newid], s) |
185 _fixdirstate(repo, old, repo[newid], s) |
|
186 |
|
187 scmutil.cleanupnodes(repo, mapping, 'uncommit', fixphase=True) |
188 |
188 |
189 def predecessormarkers(ctx): |
189 def predecessormarkers(ctx): |
190 """yields the obsolete markers marking the given changeset as a successor""" |
190 """yields the obsolete markers marking the given changeset as a successor""" |
191 for data in ctx.repo().obsstore.predecessors.get(ctx.node(), ()): |
191 for data in ctx.repo().obsstore.predecessors.get(ctx.node(), ()): |
192 yield obsutil.marker(ctx.repo(), data) |
192 yield obsutil.marker(ctx.repo(), data) |