[PATCH 3 of 3 evolve-ext-V3] evolve: make fold aware of allowunstable
Pierre-Yves David
pierre-yves.david at ens-lyon.org
Mon Jun 15 19:24:22 CDT 2015
On 06/15/2015 10:30 AM, Laurent Charignon wrote:
> # HG changeset patch
> # User Laurent Charignon <lcharignon at fb.com>
> # Date 1432072589 25200
> # Tue May 19 14:56:29 2015 -0700
> # Node ID a99f044f1d2b66f4afc3412f3a571b613d326504
> # Parent 344c3067174c08634e8564a1067028625c16b536
> evolve: make fold aware of allowunstable
>
> Before this patch, the fold command was performing the same way regardless of
> the value of experimental.evolution.
> With this patch if the configuration does not allow unstability, fold won't
> create instability.
>
> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -2422,6 +2422,10 @@
> raise util.Abort(_("cannot fold non-linear revisions "
> "(multiple heads given)"))
> head = repo[heads.first()]
> + disallowunstable = not obsolete.isenabled(repo, obsolete.allowunstableopt)
> + notarepohead = not head.rev() in repo.changelog.headrevs()
> + if disallowunstable and notarepohead:
> + raise util.Abort(_("cannot fold chain not ending with a head"))
Same here:
With:
1 - 2 - 3
\ 4
using: hg fold '2+3' will pass this test and still create unstability.
You want to check if anything like: '%ld:: - %ld' exists.
--
Pierre-Yves David
More information about the Mercurial-devel
mailing list