[PATCH 5 of 5 evolve-ext] evolve: make --rev solve only unstability by default
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Thu May 14 00:34:49 UTC 2015
On 05/13/2015 05:30 PM, Laurent Charignon wrote:
>
>
> On 5/13/15, 5:18 PM, "Pierre-Yves David" <pierre-yves.david at ens-lyon.org>
> wrote:
>
>>
>>
>> On 05/13/2015 10:04 AM, Laurent Charignon wrote:
>>> # HG changeset patch
>>> # User Laurent Charignon <lcharignon at fb.com>
>>> # Date 1431536286 25200
>>> # Wed May 13 09:58:06 2015 -0700
>>> # Node ID 30d386135d2e02b676a58926250247011461d131
>>> # Parent f7b2e0e5e05e76d181c99e6ed3fbcc9508cc0c33
>>> evolve: make --rev solve only unstability by default
>>>
>>> Before this patch evolve --rev was solving all the troubles in the
>>> specified revision. This patch restricts it to unstable only as this is
>>> generally what people expect to happen. The --bumped and --divergent
>>> flags
>>> can be used to have the same behavior than before and solve all of the
>>> troubles.
>>>
>>> diff --git a/hgext/evolve.py b/hgext/evolve.py
>>> --- a/hgext/evolve.py
>>> +++ b/hgext/evolve.py
>>> @@ -1242,7 +1242,8 @@
>>> ('', 'confirm', False,
>>> 'ask for confirmation before performing the action'),
>>> ('A', 'any', False, 'also consider troubled changesets unrelated
>>> to current working directory'),
>>> - ('r', 'rev', '', 'solves troubles of these revisions'),
>>> + ('r', 'rev', '', 'solves troubles of these revisions, only solve
>>> unstable by default'
>>> + 'use --bumped or --divergent to also solve bumped and
>>> divergent'),
>>> ('', 'bumped', False, 'with --rev: solves only bumped
>>> changesets'),
>>> ('', 'divergent', False, 'with --rev: solves only divergent
>>> changesets'),
>>> ('', 'unstable', False, 'with --rev: solves only unstable
>>> changesets'),
>>> @@ -1273,6 +1274,11 @@
>>>
>>> With --any, evolve picks any troubled changeset to repair.
>>>
>>> + With --rev, one can choose to solve troubles in a specified revset:
>>> +
>>> + - hg evolve --rev <revset> --divergent will only solve divergence
>>> in the specified revset
>>> + - hg evolve --rev <revset> --divergent --unstable will solve
>>> divergence and unstability in the specified revset
>>> + - hg evolve --rev <revset> will only solve unstability in the
>>> specified revset
>>> The working directory is updated to the newly created revision.
>>> """
>>>
>>> @@ -1313,7 +1319,7 @@
>>> if specifictypes:
>>> troubled = repo.revs(' or '.join(specifictypes))
>>> else:
>>> - troubled = repo.revs('troubled()')
>>> + troubled = repo.revs('unstable()')
>>
>> You could (should?) still select all 'troubled()' changeset but skip
>> solving the other troubles.
>
> Why would we want to do that?
> I agree that it would make the code slightly shorter but we would have a
> performance hit, isn't it?
We do not care about such performance hint yet.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list