Patchwork obsolete: drop the legacy `_enabled` variable

login
register
mail settings
Submitter Matt Harbison
Date April 30, 2019, 3:09 a.m.
Message ID <ca762c2bbe6b00a4af99.1556593760@Envy>
Download mbox | patch
Permalink /patch/39903/
State Accepted
Headers show

Comments

Matt Harbison - April 30, 2019, 3:09 a.m.
# HG changeset patch
# User Matt Harbison <matt_harbison@yahoo.com>
# Date 1556593242 14400
#      Mon Apr 29 23:00:42 2019 -0400
# Node ID ca762c2bbe6b00a4af999eb77a3f6daf48acb0cd
# Parent  d0e773ad907784c0479499e3a33e93d746d42e7a
obsolete: drop the legacy `_enabled` variable

Evolve 8.5.0 stopped setting this, and it would have been easier to figure out
why TortoiseHg stopped allowing amends if it would have crashed on the missing
variable.
Yuya Nishihara - April 30, 2019, 4:38 a.m.
On Mon, 29 Apr 2019 23:09:20 -0400, Matt Harbison wrote:
> # HG changeset patch
> # User Matt Harbison <matt_harbison@yahoo.com>
> # Date 1556593242 14400
> #      Mon Apr 29 23:00:42 2019 -0400
> # Node ID ca762c2bbe6b00a4af999eb77a3f6daf48acb0cd
> # Parent  d0e773ad907784c0479499e3a33e93d746d42e7a
> obsolete: drop the legacy `_enabled` variable

Queued, thanks.

Patch

diff --git a/mercurial/obsolete.py b/mercurial/obsolete.py
--- a/mercurial/obsolete.py
+++ b/mercurial/obsolete.py
@@ -93,10 +93,6 @@  parsers = policy.importmod(r'parsers')
 _calcsize = struct.calcsize
 propertycache = util.propertycache
 
-# the obsolete feature is not mature enough to be enabled by default.
-# you have to rely on third party extension extension to enable this.
-_enabled = False
-
 # Options for obsolescence
 createmarkersopt = 'createmarkers'
 allowunstableopt = 'allowunstable'
@@ -124,11 +120,6 @@  def _getoptionvalue(repo, option):
         if 'all' in result:
             return True
 
-        # For migration purposes, temporarily return true if the config hasn't
-        # been set but _enabled is true.
-        if len(result) == 0 and _enabled:
-            return True
-
         # Temporary hack for next check
         newconfig = repo.ui.config('experimental', 'evolution.createmarkers')
         if newconfig: