D728: rebase: move working parent movement logic to scmutil.cleanupnodes
pulkit (Pulkit Goyal)
phabricator at mercurial-scm.org
Mon Sep 18 16:48:40 EDT 2017
pulkit added a comment.
In https://phab.mercurial-scm.org/D728#12194, @quark wrote:
> In https://phab.mercurial-scm.org/D728#12181, @pulkit wrote:
>
> > How about having a new upper level function which handles all these things and also call `scmutil.cleanupnodes`? Maybe we can add phases logic in that function also afterwards.
>
From these I mean bookmark+wdir.
> It seems that you want a `copyphase=True|False` flag which could be added to `cleanupnodes`.
>
> For working copy movement, it shares the logic with bookmark movement so it's unlikely to be a separate method.
>
> I'm wondering if `hg.cleanupnodes` would be a better place than `scmutil` since it's getting more complex (and it also solves import cycles).
I was suggesting a function like `hg.updatenodes(mapping, wdir, phase)` which handles (phase+wdir+bookmark) and calls smcutil.cleanupnodes. That sounds cleaner but we need to extract the bookmark logic and maybe we cannot do that. :(
I was also concerned about it getting more complex. I was also going to add a formatter argument to it.
REPOSITORY
rHG Mercurial
REVISION DETAIL
https://phab.mercurial-scm.org/D728
To: quark, #hg-reviewers
Cc: pulkit, mercurial-devel
More information about the Mercurial-devel
mailing list