[PATCH] update: introduce config option ui.allowdirtyupdate for dirty nonlinear updates

Augie Fackler raf at durin42.com
Thu Dec 8 10:01:38 EST 2016


On Thu, Dec 8, 2016 at 9:13 AM, Gábor STEFANIK <Gabor.STEFANIK at nng.com> wrote:
>>
>
>
> --------------------------------------------------------------------------
> This message, including its attachments, is confidential. For more information please read NNG's email policy here:
> http://www.nng.com/emailpolicy/
> By responding to this email you accept the email policy.
>
>
> -----Original Message-----
>> From: Jun Wu [mailto:quark at fb.com]
>> Sent: Wednesday, December 7, 2016 6:44 PM
>> To: Gábor STEFANIK <Gabor.STEFANIK at nng.com>
>> Cc: mercurial-devel <mercurial-devel at mercurial-scm.org>
>> Subject: Re: [PATCH] update: introduce config option ui.allowdirtyupdate for
>> dirty nonlinear updates
>>
>> Excerpts from Gábor Stefanik's message of 2016-12-07 16:56:09 +0100:
>> > # HG changeset patch
>> > # User Gábor Stefanik <gabor.stefanik at nng.com> # Date 1481126137 -3600
>> > #      Wed Dec 07 16:55:37 2016 +0100
>> > # Node ID dabbe365b843fcf9b8a0de6c08e9db6100b391e9
>> > # Parent  6472c33e16326b8c817a8bae0e75053b19badb2c
>> > update: introduce config option ui.allowdirtyupdate for dirty
>> > nonlinear updates
>> >
>> > Make it easier to test codepaths common to graft and update without
>> > having to mess around with obsolete markers to force a nonlinear update.
>> > Named by analogy with ui.allowemptycommit.
>> >
>> > diff -r 6472c33e1632 -r dabbe365b843 mercurial/merge.py
>> > --- a/mercurial/merge.py    Mon Dec 05 17:40:01 2016 +0100
>> > +++ b/mercurial/merge.py    Wed Dec 07 16:55:37 2016 +0100
>> > @@ -1536,7 +1536,10 @@
>> >
>> >              if pas not in ([p1], [p2]):  # nonlinear
>> >                  dirty = wc.dirty(missing=True)
>> > -                if dirty or onode is None:
>> > +                # experimental config: ui.allowdirtyupdate
>> > +                if repo.ui.configbool('ui', 'allowdirtyupdate', False):
>>
>> I think experimental config options are usually under the "experimental"
>> section.
>
> Format.generaldelta was also experimental.
>
> Grepping through the repo for "experimental config", I'm under the impression that
> "experimental" is to be used for options that can't be cleanly categorized under any
> existing sections, and don't warrant introducing a new section.

[experimental] is also for things that aren't sure to be supported forever.

>
> This is experimental for now, since we need to support "hg update --abort" to make
> this safe for users, but eventually I hope to get this de-experimentalized and maybe
> even enabled by default. It would be better not to break backwards compatibility
> just because this becomes no longer experimental.

Until we're confident that this feature will live forever, it should
be in experimental.

>
>>
>> > +                    pas = [p1]
>> > +                elif dirty or onode is None:
>> >                      # Branching is a bit strange to ensure we do the minimal
>> >                      # amount of call to obsolete.background.
>> >                      foreground = obsolete.foreground(repo,
>> > [p1.node()])
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel


More information about the Mercurial-devel mailing list