[PATCH hglib V2] tests: handle the removal of `obsolete._enabled` in Mercurial
Yuya Nishihara
yuya at tcha.org
Wed May 22 19:23:41 EDT 2019
On Tue, 21 May 2019 21:47:38 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison at yahoo.com>
> # Date 1557281819 14400
> # Tue May 07 22:16:59 2019 -0400
> # Node ID 19b12f3e7cc79566c4bb7d1c8df4a6d50d88133d
> # 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,7 +22,10 @@
> super(test_obsolete_baselib, self).setUp()
> self.append('.hg/obs.py',
> "import mercurial.obsolete\n"
> - "mercurial.obsolete._enabled = True")
> + "try:\n"
> + " mercurial.obsolete.isenabled = lambda r, opt: True\n"
> + "except AttributeError:\n"
> + " mercurial.obsolete._enabled = True")
I don't think AttributeError would be raised. Maybe just do both?
More information about the Mercurial-devel
mailing list