[PATCH evolve-ext] evolve: duplicate evolution summary entries (issue5014)

Sean Farley sean at farley.io
Thu Dec 31 12:04:00 CST 2015


Laurent Charignon <lcharignon at fb.com> writes:

> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1451513163 28800
> #      Wed Dec 30 14:06:03 2015 -0800
> # Node ID 4640f0c88686138a9a5e41e6c2b2cbd1ba4aef21
> # Parent  526253198860fdbdcae01380ae97727195039f44
> evolve: duplicate evolution summary entries (issue5014)
>
> Since we added summary entries for trouble changesets in core we don't need to
> display it anymore in evolve for the version of hg with the change. Tested with
> 3.6.1 and 3.6.2.
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -764,13 +764,18 @@ def summaryhook(ui, repo):
>              ui.write(s)
>          else:
>              ui.note(s)
> -
> -    nbunstable = len(getrevs(repo, 'unstable'))
> -    nbbumped = len(getrevs(repo, 'bumped'))
> -    nbdivergent = len(getrevs(repo, 'divergent'))
> -    write('unstable: %i changesets\n', nbunstable)
> -    write('bumped: %i changesets\n', nbbumped)
> -    write('divergent: %i changesets\n', nbdivergent)
> +    # no util.versiontuple before 3.6.2 so we parse the version here
> +    versiontuple = tuple(map(int, util.version().split("+")[0].split(".")))

If there is no util.versiontuple until 3.6.2 then can't we just use a
try/except around that attribute?


More information about the Mercurial-devel mailing list