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

login
register
mail settings
Submitter Mateusz Kwapich
Date Dec. 6, 2016, 4:41 p.m.
Message ID <a7cc11231c424e435252.1481042476@devvm314.lla2.facebook.com>
Download mbox | patch
Permalink /patch/17837/
State Changes Requested
Headers show

Comments

Mateusz Kwapich - Dec. 6, 2016, 4:41 p.m.
# HG changeset patch
# User Mateusz Kwapich <mitrandir@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
Pierre-Yves David - Dec. 20, 2016, 6:18 p.m.
On 12/06/2016 05:41 PM, Mateusz Kwapich wrote:
> # HG changeset patch
> # User Mateusz Kwapich <mitrandir@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@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel
>

Patch

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):