[PATCH stable] rebase: derive node from target rev (issue3802)
pierre-yves.david at ens-lyon.org
Sun Feb 3 17:40:29 CST 2013
On Sun, Feb 03, 2013 at 02:30:51PM -0800, Siddharth Agarwal wrote:
> # HG changeset patch
> # User Siddharth Agarwal <sid0 at fb.com>
> # Date 1359930399 28800
> # Node ID 6c45e953b3f4a12ed8deedea3adeac8e80fc04e0
> # Parent d29cfda81aece14f39cd9d3f87d30b08d1c05fc0
> rebase: derive node from target rev (issue3802)
You should mention the changeset that introduced the regression.
> dest.rev() is the same as target when a new rebase is run, but dest isn't set
> when rebase --continue is run.
Patch looks ugly but correct. The rebase code probably need additional cleanup
and documentation. But as you said on IRC the fix for stable should be simpler.
However, It seems like your fix could be smaller.
> diff --git a/hgext/rebase.py b/hgext/rebase.py
> --- a/hgext/rebase.py
> +++ b/hgext/rebase.py
> @@ -316,6 +316,9 @@ def rebase(ui, repo, **opts):
> for k, v in state.iteritems():
> if v > nullmerge:
> nstate[repo[k].node()] = repo[v].node()
> + # XXX this is the same as dest.node() for the non-continue path --
> + # this should probably be cleaned up
> + targetnode = repo[target].node()
Can't that be just `dest = repo[target]` that would remove needs to update
other code part. making the change smaller and safer.
I just had a look at the "function" you are patching and it size and complexity
are really scary.
More information about the Mercurial-devel