Patchwork [hglib,V3] tests: handle the removal of `obsolete._enabled` in Mercurial

login
register
mail settings
Submitter Matt Harbison
Date May 23, 2019, 1:29 a.m.
Message ID <7bee00ed7d597f8b0964.1558574996@Envy>
Download mbox | patch
Permalink /patch/40205/
State Accepted
Headers show

Comments

Matt Harbison - May 23, 2019, 1:29 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1557281819 14400
#      Tue May 07 22:16:59 2019 -0400
# Node ID 7bee00ed7d597f8b0964aa7117e405189d7ba28a
# Parent  33b512aa8dba0cbe523188fbb62d30ae2125a236
tests: handle the removal of `obsolete._enabled` in Mercurial

I'm not sure why we can't just set `experimental.evolution=all`, but it didn't
work.
Augie Fackler - May 23, 2019, 4:27 p.m.
Queued, thanks.

(I'm also updating the tox environment list to include more hg versions.)

> On May 22, 2019, at 21:29, Matt Harbison <mharbison72@gmail.com> wrote:
> 
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1557281819 14400
> #      Tue May 07 22:16:59 2019 -0400
> # Node ID 7bee00ed7d597f8b0964aa7117e405189d7ba28a
> # Parent  33b512aa8dba0cbe523188fbb62d30ae2125a236
> tests: handle the removal of `obsolete._enabled` in Mercurial
> 
> I'm not sure why we can't just set `experimental.evolution=all`, but it didn't
> work.
> 
> diff --git a/tests/test-hidden.py b/tests/test-hidden.py
> --- a/tests/test-hidden.py
> +++ b/tests/test-hidden.py
> @@ -22,6 +22,9 @@
>         super(test_obsolete_baselib, self).setUp()
>         self.append('.hg/obs.py',
>                     "import mercurial.obsolete\n"
> +                    "# 3.2 and later\n"
> +                    "mercurial.obsolete.isenabled = lambda r, opt: True\n"
> +                    "# Dropped in 5.1\n"
>                     "mercurial.obsolete._enabled = True")
>         self.append('.hg/hgrc','\n[extensions]\nobs=.hg/obs.py')
> 
> _______________________________________________
> Mercurial-devel mailing list
> Mercurial-devel@mercurial-scm.org
> https://www.mercurial-scm.org/mailman/listinfo/mercurial-devel

Patch

diff --git a/tests/test-hidden.py b/tests/test-hidden.py
--- a/tests/test-hidden.py
+++ b/tests/test-hidden.py
@@ -22,6 +22,9 @@ 
         super(test_obsolete_baselib, self).setUp()
         self.append('.hg/obs.py',
                     "import mercurial.obsolete\n"
+                    "# 3.2 and later\n"
+                    "mercurial.obsolete.isenabled = lambda r, opt: True\n"
+                    "# Dropped in 5.1\n"
                     "mercurial.obsolete._enabled = True")
         self.append('.hg/hgrc','\n[extensions]\nobs=.hg/obs.py')