Mercurial > public > mercurial-scm > hg
comparison mercurial/cmdutil.py @ 45388:6ba7190ff863
commit: clear mergestate also with --amend (issue6304)
The `hg commit --amend` uses the in-memory code, which naturally
doesn't touch the merge state (well, it shouldn't anyway; I think I've
fixed bugs in that area recently). We therefore need to clear the
mergestate after calling `repo.commitctx()` since we expect that from
`hg commit --amend`.
Differential Revision: https://phab.mercurial-scm.org/D8932
author | Martin von Zweigbergk <martinvonz@google.com> |
---|---|
date | Tue, 18 Aug 2020 15:03:57 -0700 |
parents | 8c466bcb0879 |
children | d2b5a7659fff |
comparison
equal
deleted
inserted
replaced
45387:cf21cda4281f | 45388:6ba7190ff863 |
---|---|
3257 | 3257 |
3258 commitphase = None | 3258 commitphase = None |
3259 if opts.get(b'secret'): | 3259 if opts.get(b'secret'): |
3260 commitphase = phases.secret | 3260 commitphase = phases.secret |
3261 newid = repo.commitctx(new) | 3261 newid = repo.commitctx(new) |
3262 ms.reset() | |
3262 | 3263 |
3263 # Reroute the working copy parent to the new changeset | 3264 # Reroute the working copy parent to the new changeset |
3264 repo.setparents(newid, nullid) | 3265 repo.setparents(newid, nullid) |
3265 mapping = {old.node(): (newid,)} | 3266 mapping = {old.node(): (newid,)} |
3266 obsmetadata = None | 3267 obsmetadata = None |