[PATCH 2 of 2 evolve-ext] evolve: add a --list flag to the evolve command

Pierre-Yves David pierre-yves.david at ens-lyon.org
Fri Feb 19 13:02:55 UTC 2016



On 08/07/2015 02:28 AM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1438936589 25200
> #      Fri Aug 07 01:36:29 2015 -0700
> # Node ID 03116d88098c586c685d8c3de01769d1b60ffd9f
> # Parent  de3c2a7d18f02eacf45dc7948c8fe4898a040d66
> evolve: add a --list flag to the evolve command
>
> Before this patch, it was complicated to understand all the troubles affecting
> a repository. This patch adds a --list flag to the evolve command displaying
> all the troubles in the repository. It can be used with the --bumped,
> --divergent and --unstable flag to restrict what is to be displayed.
>
> Example output (truncated to simplify):
>
> 18 unstable changesets:
> - [24312] record: add option to reverse chunks selection
> - [24313] record: ui change for chunk reversal
> ...
> 11 divergent changesets:
> - [25685] Fast smartlog
>    - base [25113] Fast smartlog
>    - others [26324] Fast smartlog
> - [26324] Fast smartlog
>    - base [25113] Fast smartlog
>    - others [25685] Fast smartlog
> - [26779] experimental: add set per phase in C phase computation
>    (!) Base not found, case not handled
> - [26808] Fast smartlog
>    - base [26414] Fast smartlog
>    - others [26837] revset: add a C implementation for revsbetween
> ...
> 1 bumped changesets:
>    - [12] add obsol_d'''
>    - precs [11] add obsol_d''

I think it would be better to have an output focussed on changesets:

347133753411 faster smartlog
   - unstable, parent is obsolete 6daf7757e92b
40b8c158c540 elegant elephant in the mud
   - divergent, changeset ce3bd728b858 also succeed to 4d3a5dcb6972
ce3bd728b858 the frog is leaping in the pond
   - unstable, parent is unstable 347133753411
   - divergent, changeset 40b8c158c540 also succeed to 4d3a5dcb6972
c77a679e9cfa the cow jump over the moon
   - unstable, parent is unstable ce3bd728b858
   - unstable, parent is obsolete 0446f698d38e

(exact output should probably be something else, but I hope this carry 
the idea)

Having that data displayed through a formatter object, would give us a 
free and very useful '-T json' output. This requires to upgrade the 
formatter code to handle multiple level of items. By chance, we also 
have access to python's context manager too because we dropped 2.6 support

Cheers,

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list