diff -r c87373179ff3 -r 68c83b8d407a mercurial/cmdutil.py --- a/mercurial/cmdutil.py Tue Jun 30 22:28:40 2015 -0700 +++ b/mercurial/cmdutil.py Sun Sep 28 01:09:16 2014 -0700 @@ -2619,15 +2619,15 @@ (marks, old.hex(), hex(newid))) marks[bm] = newid marks.recordchange(tr) - #commit the whole amend process - if createmarkers and newid != old.node(): - # mark the new changeset as successor of the rewritten one - new = repo[newid] - obs = [(old, (new,))] - if node: - obs.append((ctx, ())) - - obsolete.createmarkers(repo, obs) + #commit the whole amend process + if createmarkers: + # mark the new changeset as successor of the rewritten one + new = repo[newid] + obs = [(old, (new,))] + if node: + obs.append((ctx, ())) + + obsolete.createmarkers(repo, obs) tr.close() finally: tr.release()