[PATCH 1 of 4 evolve-ext] evolve: don't crash on singled out revisions
pierre-yves.david at ens-lyon.org
Wed Jun 3 13:40:49 CDT 2015
On 06/02/2015 04:01 PM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1433186952 25200
> # Mon Jun 01 12:29:12 2015 -0700
> # Node ID 9a20329fa7e7d62ad59053be9353ec1285023763
> # Parent 69e5de3e6129185469c2cbf98383ac6d58260d0c
> evolve: don't crash on singled out revisions
> Before this patch, we were crashing on unsolvable revisions when using
> evolve --rev. This patch removes the crash and prints a warning when we
> encounter such revision.
This one is pushed to main with small adjustment. Please read feedback
below for potential followup patch.
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -1398,9 +1398,12 @@
> """Stabilize a unstable changeset"""
> obs = orig.parents()
> + if not obs.obsolete() and len(orig.parents()) == 2:
> + obs = orig.parents() # second parent is obsolete ?
> if not obs.obsolete():
> - obs = orig.parents() # second parent is obsolete ?
> - assert obs.obsolete()
> + ui.warn("Cannot solve instability of %s, skipping\n" % orig)
- We do not capitalise ui message (so s/Cannot/cannot/), I fixed that in
- Can we get the action first 'skipping %s:%i: bla bla bla' (in a follow
up patch) this is the most important information and should appear first
to ease analysis of the output.
- 'cannot solve instability' is a bit vague. can we get something more
informative? Various idea below.
- 'parent need to be stabilized first'
- 'no obsolete parent'
- 'instability is inherited' (far too obscure)
- 'already as stable as currently possible'
> + $ hg glog
small nit. I replaced that by `hg log -G` because it is a more modern form.
More information about the Mercurial-devel