[PATCH 1 of 2 evolve-ext] evolve: remove --biject for prune

Pierre-Yves David pierre-yves.david at ens-lyon.org
Mon Jun 29 14:37:50 CDT 2015



On 06/26/2015 10:53 AM, Laurent Charignon wrote:
>
>> On Jun 26, 2015, at 1:16 AM, Pierre-Yves David <pierre-yves.david at ens-lyon.org> wrote:
>>
>>
>>
>> On 06/25/2015 05:17 PM, Laurent Charignon wrote:
>>> # HG changeset patch
>>> # User Laurent Charignon <lcharignon at fb.com>
>>> # Date 1435262280 25200
>>> #      Thu Jun 25 12:58:00 2015 -0700
>>> # Node ID 0a1bf08ebdd93bfb199c18db4ea4e23c071e73cc
>>> # Parent  d3328e6775b1f23c6ab41ccd8712e02abb6eea72
>>> evolve: remove --biject for prune
>>>
>>> Before this patch, the prune function was expecting a --biject option to build
>>> a bijection between precursor and successor. This is the only thing that makes
>>> sense to do when we have more than 1 precusor and successor.
>>> This patch removes the --biject option, making bijection the default behavior
>>> when prune is given more than 1 precursor and more than 1 successor.
>>>
>>> diff --git a/hgext/evolve.py b/hgext/evolve.py
>>> --- a/hgext/evolve.py
>>> +++ b/hgext/evolve.py
>>> @@ -2092,7 +2092,6 @@ def _getmetadata(**opts):
>>>        ('s', 'succ', [], _("successor changeset")),
>>>        ('r', 'rev', [], _("revisions to prune")),
>>>        ('k', 'keep', None, _("does not modify working copy during prune")),
>>> -     ('', 'biject', False, _("do a 1-1 map between rev and successor ranges")),
>>>        ('B', 'bookmark', '', _("remove revs only reachable from given"
>>>                                " bookmark"))] + metadataopts,
>>>       _('[OPTION] [-r] REV...'))
>>> @@ -2111,16 +2110,16 @@ def cmdprune(ui, repo, *revs, **opts):
>>>       You can use the ``--succ`` option to inform mercurial that a newer version
>>>       of the pruned changeset exists.
>>>
>>> -    You can use the ``--biject`` option to specify a 1-1 (bijection) between
>>> -    revisions to prune and successor changesets. This option may be removed in
>>> -    a future release (with the functionality absorbed automatically).
>>> -
>>> +    If you precise one revision to prune and multiple successor, it is a split.
>>> +    If you precise several commits and a single successor, it is a fold.
>>> +    If you precise more than one revision to prune and more than one successor
>>> +    there has to be one successor per revision to prune and a 1-1 bijection
>>> +    is done.
>>
>> Precise is most probably not the verb we want here. I'm also not very fan of the wording but it is a bit too late for me to think about better ones.
> Ok I will change that
>
>>
>> Also for patch ordering purpose, we probably want patch2 before patch 1 (as the state after patch 1 and before patch 2 is fairly dangerous).
>
> I disagree, it does not seem dangerous to me, just a little more lenient.
> Ok to resend the series with the fix above?

- I'm not willing to release a version with no flag.
- I'm willing to release a version with all the flag (--fold --split 
--biject) if needed (could actually be a good idea?)

So patch 2 should be before patch 1. I do not anticipage the swapping to 
be a massive headache.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list