Patchwork [2,of,3,evolve-ext] evolve: include node, rev, desc, and phase in list

login
register
mail settings
Submitter timeless
Date April 21, 2016, 6:26 a.m.
Message ID <ec9eea37f26590ea7840.1461220004@gcc2-power8.osuosl.org>
Download mbox | patch
Permalink /patch/14757/
State Accepted
Delegated to: Pierre-Yves David
Headers show

Comments

timeless - April 21, 2016, 6:26 a.m.
# HG changeset patch
# User timeless@gmail.com
# Date 1461219140 0
#      Thu Apr 21 06:12:20 2016 +0000
# Node ID ec9eea37f26590ea7840077c4dd44857138dd4a0
# Parent  105ab3a2a7a86b2cd6e720e42e9ece9e9b1590cf
# Available At https://bitbucket.org/timeless/mutable-history/
#              hg pull https://bitbucket.org/timeless/mutable-history/ -r ec9eea37f265
evolve: include node, rev, desc, and phase in list
Pierre-Yves David - May 2, 2016, 3:46 p.m.
Patches 1 and 2 are in.

Patch 3 is waiting on improved support in core (according to an IRC 
conversation with timeless about this.

On 04/21/2016 08:26 AM, timeless wrote:
> # HG changeset patch
> # User timeless@gmail.com
> # Date 1461219140 0
> #      Thu Apr 21 06:12:20 2016 +0000
> # Node ID ec9eea37f26590ea7840077c4dd44857138dd4a0
> # Parent  105ab3a2a7a86b2cd6e720e42e9ece9e9b1590cf
> # Available At https://bitbucket.org/timeless/mutable-history/
> #              hg pull https://bitbucket.org/timeless/mutable-history/ -r ec9eea37f265
> evolve: include node, rev, desc, and phase in list
>
> diff -r 105ab3a2a7a8 -r ec9eea37f265 hgext/evolve.py
> --- a/hgext/evolve.py	Thu Apr 21 06:11:57 2016 +0000
> +++ b/hgext/evolve.py	Thu Apr 21 06:12:20 2016 +0000
> @@ -1587,6 +1587,7 @@
>           desc = (desc[:desclen] + '...') if len(desc) > desclen else desc
>           fm.plain('%s: ' % ctx.hex()[:hashlen])
>           fm.plain('%s\n' % desc)
> +        fm.data(node=ctx.hex(), rev=ctx.rev(), desc=desc, phase=ctx.phasestr())
>   
>           for unpar in unpars if showunstable else []:
>               fm.plain('  unstable: %s (unstable parent)\n' % unpar[:hashlen])
> @@ -1621,6 +1622,7 @@
>                                'sourcetype': 'immutableprecursor'})
>           for dset in dsets:
>               divnodes = [{'node': node.hex(n),
> +                         'phase': repo[n].phasestr(),
>                           } for n in dset['divergentnodes']]
>               troubles.append({'troubletype': 'divergent',
>                                'commonprecursor': node.hex(dset['commonprecursor']),
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff -r 105ab3a2a7a8 -r ec9eea37f265 hgext/evolve.py
--- a/hgext/evolve.py	Thu Apr 21 06:11:57 2016 +0000
+++ b/hgext/evolve.py	Thu Apr 21 06:12:20 2016 +0000
@@ -1587,6 +1587,7 @@ 
         desc = (desc[:desclen] + '...') if len(desc) > desclen else desc
         fm.plain('%s: ' % ctx.hex()[:hashlen])
         fm.plain('%s\n' % desc)
+        fm.data(node=ctx.hex(), rev=ctx.rev(), desc=desc, phase=ctx.phasestr())
 
         for unpar in unpars if showunstable else []:
             fm.plain('  unstable: %s (unstable parent)\n' % unpar[:hashlen])
@@ -1621,6 +1622,7 @@ 
                              'sourcetype': 'immutableprecursor'})
         for dset in dsets:
             divnodes = [{'node': node.hex(n),
+                         'phase': repo[n].phasestr(),
                         } for n in dset['divergentnodes']]
             troubles.append({'troubletype': 'divergent',
                              'commonprecursor': node.hex(dset['commonprecursor']),