[PATCH 7 of 8 evolve-ext, V2] evolve: make the disallowing new unstable more accurate

Pierre-Yves David pierre-yves.david at ens-lyon.org
Tue Dec 20 13:18:53 EST 2016



On 12/06/2016 05:41 PM, Mateusz Kwapich wrote:
> # HG changeset patch
> # User Mateusz Kwapich <mitrandir at fb.com>
> # Date 1481040901 28800
> #      Tue Dec 06 08:15:01 2016 -0800
> # Branch stable
> # Node ID a7cc11231c424e435252e7388dd05b139e766af2
> # Parent  02a29df6827d1dae26b885c9c6c9d56be33ecd00
> evolve: make the disallowing new unstable more accurate
>
> If the changesets are already unstable don't trigger disallownewunstable

Well, yes, such run would not create more unstability. But the point of 
allow unstable is to prevent people to create unstable situation 
locally. And this would allow to create more unstability over some 
existing unstability.

I'm curious about your usecase here. Can you elaborate ?

> diff --git a/hgext/evolve.py b/hgext/evolve.py
> --- a/hgext/evolve.py
> +++ b/hgext/evolve.py
> @@ -3365,7 +3365,7 @@ def _disallowednewunstable(repo, revs):
>      allowunstable = obsolete.isenabled(repo, obsolete.allowunstableopt)
>      if allowunstable:
>          return revset.baseset()
> -    return repo.revs("(%ld::) - %ld", revs, revs)
> +    return repo.revs("(%ld::) - %ld - unstable() - obsolete()", revs, revs)
>
>  @eh.wrapcommand('graft')
>  def graftwrapper(orig, ui, repo, *revs, **kwargs):
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel at mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

-- 
Pierre-Yves David


More information about the Mercurial-devel mailing list