diff -r cf21cda4281f -r 6ba7190ff863 mercurial/cmdutil.py --- a/mercurial/cmdutil.py Tue Aug 18 14:26:49 2020 -0700 +++ b/mercurial/cmdutil.py Tue Aug 18 15:03:57 2020 -0700 @@ -3259,6 +3259,7 @@ if opts.get(b'secret'): commitphase = phases.secret newid = repo.commitctx(new) + ms.reset() # Reroute the working copy parent to the new changeset repo.setparents(newid, nullid)