Patchwork [4,of,4,evolve-ext] evolve: add new variable and comment

login
register
mail settings
Submitter Laurent Charignon
Date May 5, 2015, 5:30 p.m.
Message ID <8376fe35ebdacf036850.1430847047@lcharignon-mbp.local>
Download mbox | patch
Permalink /patch/8897/
State Accepted
Headers show

Comments

Laurent Charignon - May 5, 2015, 5:30 p.m.
# HG changeset patch
# User Laurent Charignon <lcharignon@fb.com>
# Date 1430783765 25200
#      Mon May 04 16:56:05 2015 -0700
# Node ID 8376fe35ebdacf0368509fedef2a9fb97770ddc9
# Parent  29363f79514fc2f2deeb2c91099412aaf49a5d82
evolve: add new variable and comment

Add comment and introduce a new variable to keep track of if the progress ui
is shown. Later on we will use this variable in the implementation of the --rev
option.
Pierre-Yves David - May 5, 2015, 8:07 p.m.
On 05/05/2015 10:30 AM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon@fb.com>
> # Date 1430783765 25200
> #      Mon May 04 16:56:05 2015 -0700
> # Node ID 8376fe35ebdacf0368509fedef2a9fb97770ddc9
> # Parent  29363f79514fc2f2deeb2c91099412aaf49a5d82
> evolve: add new variable and comment

I've pushed this four to the clowncopter.

>
> Add comment and introduce a new variable to keep track of if the progress ui
> is shown. Later on we will use this variable in the implementation of the --rev
> option.
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -1246,11 +1246,13 @@
>       # Progress handling
>       seen = 1
>       count = allopt and _counttroubled(ui, repo) or 1
> +    showprogress = allopt
>
>       def progresscb():
>           if allopt:
>               ui.progress('evolve', seen, unit='changesets', total=count)
>
> +    # Continuation handling
>       if contopt:
>           if anyopt:
>               raise util.Abort('cannot specify both "--any" and "--continue"')
> @@ -1286,7 +1288,8 @@
>           progresscb()
>           nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt)
>
> -    if allopt:
> +    # Cleanup
> +    if showprogress:
>           ui.progress('evolve', None)
>
>       if repo['.'] != startnode:
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@selenic.com
> http://selenic.com/mailman/listinfo/mercurial-devel
>
Pierre-Yves David - May 5, 2015, 8:07 p.m.
On 05/05/2015 01:07 PM, Pierre-Yves David wrote:
>
>
> On 05/05/2015 10:30 AM, Laurent Charignon wrote:
>> # HG changeset patch
>> # User Laurent Charignon <lcharignon@fb.com>
>> # Date 1430783765 25200
>> #      Mon May 04 16:56:05 2015 -0700
>> # Node ID 8376fe35ebdacf0368509fedef2a9fb97770ddc9
>> # Parent  29363f79514fc2f2deeb2c91099412aaf49a5d82
>> evolve: add new variable and comment
>
> I've pushed this four to the clowncopter.

s/clowncopter/main evolve repo/

Patch

diff --git a/hgext/evolve.py b/hgext/evolve.py
--- a/hgext/evolve.py
+++ b/hgext/evolve.py
@@ -1246,11 +1246,13 @@ 
     # Progress handling
     seen = 1
     count = allopt and _counttroubled(ui, repo) or 1
+    showprogress = allopt
 
     def progresscb():
         if allopt:
             ui.progress('evolve', seen, unit='changesets', total=count)
 
+    # Continuation handling
     if contopt:
         if anyopt:
             raise util.Abort('cannot specify both "--any" and "--continue"')
@@ -1286,7 +1288,8 @@ 
         progresscb()
         nexttrouble = _picknexttroubled(ui, repo, anyopt or allopt)
 
-    if allopt:
+    # Cleanup
+    if showprogress:
         ui.progress('evolve', None)
 
     if repo['.'] != startnode: