[PATCH 2 of 2] amend: do a bare kill of temporary changeset
Augie Fackler
raf at durin42.com
Thu Oct 18 11:16:48 CDT 2012
I like this, but please resend with the other one when it's ready for v2?
On Thu, Oct 18, 2012 at 11:03 AM, <pierre-yves.david at logilab.fr> wrote:
> # 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