Show More
@@ -98,6 +98,7 b' def _fixdirstate(repo, oldctx, newctx, m' | |||||
98 | newctx which can be result of either unamend or uncommit. |
|
98 | newctx which can be result of either unamend or uncommit. | |
99 | """ |
|
99 | """ | |
100 | ds = repo.dirstate |
|
100 | ds = repo.dirstate | |
|
101 | ds.setparents(newctx.node(), node.nullid) | |||
101 | copies = dict(ds.copies()) |
|
102 | copies = dict(ds.copies()) | |
102 | s = newctx.status(oldctx, match=match) |
|
103 | s = newctx.status(oldctx, match=match) | |
103 | for f in s.modified: |
|
104 | for f in s.modified: | |
@@ -176,7 +177,6 b' def uncommit(ui, repo, *pats, **opts):' | |||||
176 | mapping[old.node()] = () |
|
177 | mapping[old.node()] = () | |
177 |
|
178 | |||
178 | with repo.dirstate.parentchange(): |
|
179 | with repo.dirstate.parentchange(): | |
179 | repo.dirstate.setparents(newid, node.nullid) |
|
|||
180 | _fixdirstate(repo, old, repo[newid], match) |
|
180 | _fixdirstate(repo, old, repo[newid], match) | |
181 |
|
181 | |||
182 | scmutil.cleanupnodes(repo, mapping, 'uncommit', fixphase=True) |
|
182 | scmutil.cleanupnodes(repo, mapping, 'uncommit', fixphase=True) | |
@@ -239,7 +239,6 b' def unamend(ui, repo, **opts):' | |||||
239 | dirstate = repo.dirstate |
|
239 | dirstate = repo.dirstate | |
240 |
|
240 | |||
241 | with dirstate.parentchange(): |
|
241 | with dirstate.parentchange(): | |
242 | dirstate.setparents(newprednode, node.nullid) |
|
|||
243 | _fixdirstate(repo, curctx, newpredctx) |
|
242 | _fixdirstate(repo, curctx, newpredctx) | |
244 |
|
243 | |||
245 | mapping = {curctx.node(): (newprednode,)} |
|
244 | mapping = {curctx.node(): (newprednode,)} |
General Comments 0
You need to be logged in to leave comments.
Login now