[PATCH] obsolete: remove last instance of _enabled

Durham Goode durham at fb.com
Wed Mar 18 02:15:47 UTC 2015


# HG changeset patch
# User Durham Goode <durham at fb.com>
# Date 1426629178 25200
#      Tue Mar 17 14:52:58 2015 -0700
# Node ID da6c09e839aac483faaaf619c377db329b8c40ae
# Parent  567ae53657544744155897ada91f16f8af61ad8a
obsolete: remove last instance of _enabled

The _enabled bool has been replaced by obsolete.isenabled(...). This removes the
last instance of it so I can remove the _enabled flag entirely shortly.

diff --git a/mercurial/cmdutil.py b/mercurial/cmdutil.py
--- a/mercurial/cmdutil.py
+++ b/mercurial/cmdutil.py
@@ -2420,7 +2420,7 @@ def commit(ui, repo, commitfunc, pats, o
 def amend(ui, repo, commitfunc, old, extra, pats, opts):
     # amend will reuse the existing user if not specified, but the obsolete
     # marker creation requires that the current user's name is specified.
-    if obsolete._enabled:
+    if obsolete.isenabled(repo, obsolete.createmarkersopt):
         ui.username() # raise exception if username not set
 
     ui.note(_('amending changeset %s\n') % old)


More information about the Mercurial-devel mailing list