diff -r 09735cde6275 -r 5d65e04b6a80 mercurial/commit.py --- a/mercurial/commit.py Mon Oct 19 02:54:12 2020 +0200 +++ b/mercurial/commit.py Tue Oct 20 17:32:45 2020 +0200 @@ -105,7 +105,7 @@ # be compliant anyway # # if minimal phase was 0 we don't need to retract anything - phases.registernew(repo, tr, targetphase, [n]) + phases.registernew(repo, tr, targetphase, [repo[n].rev()]) return n