[PATCH 2 of 2] amend: do a bare kill of temporary changeset

pierre-yves.david at logilab.fr pierre-yves.david at logilab.fr
Thu Oct 18 16:03:06 UTC 2012


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1350575674 -7200
# Node ID 1b33bfbeae66d9bb6cb71730208fe4677250634d
# Parent  122ab0793ce25a8ada0895fca25d05dbde7326a3
amend: do a bare kill of temporary changeset

Before this changeset the temporary changeset created by amend was made a
precursors on the amend result. This add unnecessary complexity to the
obsolescence graph. This temporary commit will probably disappear in the future.
It is an unwanted byproduct of amend that nobody cares about.

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -1727,11 +1727,11 @@ def amend(ui, repo, commitfunc, old, ext
             if obsolete._enabled 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, (new,)))
+                    obs.append((ctx, ()))
 
                 obsolete.createmarkers(repo, obs)
             tr.close()
         finally:
             tr.release()



More information about the Mercurial-devel mailing list