[PATCH 2 of 3 evolve-ext] evolve: use better error message when no trouble found with --rev
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Fri Jun 5 01:19:07 CDT 2015
On 06/04/2015 03:07 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1433455392 25200
> # Thu Jun 04 15:03:12 2015 -0700
> # Node ID c56ec61b8dcdf856e6c693046e2ef2ded2142b47
> # Parent 28f278575b4ce96477f34b1b40f7a80f31084039
> evolve: use better error message when no trouble found with --rev
>
> When no trouble was found with --rev we were lacking information about what to
> do. This patch reuses the error message used for hg evolve with no argument to
> inform the user of what to do (use --all or --any if the troubles are not in
> the specified revs).
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -1375,7 +1375,7 @@
> troubled = repo.revs('troubled()')
> _revs = repo.revs(revopt) & troubled if revopt else troubled
> if not _revs:
> - ui.write_err("No troubled changes in the specified revisions\n")
> + _handlenotrouble(ui, repo, startnode, dryrunopt)
> else:
> # For the progress bar to show
> count = len(_revs)
> diff --git a/tests/test-evolve.t b/tests/test-evolve.t
> --- a/tests/test-evolve.t
> +++ b/tests/test-evolve.t
> @@ -1017,7 +1017,8 @@
>
> Evolving an empty revset should do nothing
> $ hg evolve --rev "16 and 15"
> - No troubled changes in the specified revisions
> + nothing to evolve here
> + (2 troubled changesets, do you want --any ?)
This message seems not relevant in this context.
1) 'to evolve here' refers to the way evolve pick the next changesets to
evolve in the context of '.', this is not relevant in the --rev case.
2) adding --any to the command above is not going to have any effect.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list