[PATCH 1 of 4 evolve-ext] evolve: extract the logic to solve one change into a method

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue May 5 16:51:55 CDT 2015



On 05/05/2015 02:29 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1430783806 25200
> #      Mon May 04 16:56:46 2015 -0700
> # Node ID 1dd10a7e485b881c472ead204407e85e9b64fa54
> # Parent  8376fe35ebdacf0368509fedef2a9fb97770ddc9
> evolve: extract the logic to solve one change into a method
>
> The goal is to later reuse this method to implement the --rev flag for
> evolve that solves the troubles in a revset.
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -1152,6 +1152,20 @@
>           mean = sum(len(x[1]) for x in allpclusters) // nbcluster
>           ui.write('        mean length:        %9i\n' % mean)
>
> +def _solveone(ui, repo, ctx, dryrun, confirm, progresscb):
> +    """ Resolve the troubles affecting one revision """

I took that one after removing the space around the text in the string. 
I'm not sure where this style comes from.

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list