[Commented On] D11680: push: add option to abort on dirty working copy if parent is pushed
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Dec 16 19:07:56 UTC 2021
marmoute added a comment.
In D11680#182205 <https://phab.mercurial-scm.org/D11680#182205>, @spectral wrote:
>> Should Flag negation be rare ?
>> ------------------------------
>>
>> I disagree here. We should use clearest available verb for flags, using negation to get the meaning we need. I would draw a similarity with boolean naming in the code, where we don't have a preferred "default" state for the common case, but we phrase the boolean in a way that is easy to read.
>> In addition, having a mix of negation and non-negation as common case will help make the (negation) feature more discoverable.
>> What's your rationale for wanting them to be rare ?
>
> The biggest reason is because there's currently, as far as I know, no support in Mercurial's flag parser code for tribools, so these won't be annotated with the `[no-]` prefix in the help text.
I see, "None" and "True" value get treated the same in that regard. It seems a small technical limitation that is fairly easy to lift. Any other opi
>> Should the proposed behavior be part of tweakdefault ?
>> ------------------------------------------------------
>>
>> I don't think so, `hg push` is reasonably independent from the working copy and it is a common use-case to push with uncommitted changes (pushing the working copy parent or not). Making it disabled by default seems weird to me.
>
> I can't describe how many times the internal version of this check we have at Google has saved me from making a mistake. I would recommend that you check whether you truly do want to do this frequently or not :)
I am curious if the warning version of this would give you most of the benefit with none of the anoyance. Did you gave it a try ? (see my previous comment about "forgetting to add a files" as a bonus)
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D11680/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D11680
To: martinvonz, #hg-reviewers, Alphare
Cc: Alphare, spectral, marmoute, pulkit, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20211216/e418c1f5/attachment-0002.html>
More information about the Mercurial-patches
mailing list