Patchwork obsolete: remove last instance of _enabled

login
register
mail settings
Submitter Durham Goode
Date March 18, 2015, 2:15 a.m.
Message ID <da6c09e839aac483faaa.1426644947@dev2000.prn2.facebook.com>
Download mbox | patch
Permalink /patch/8133/
State Accepted
Commit 8c445d8a915be919a03e69cc7211da5f78d16859
Headers show

Comments

Durham Goode - March 18, 2015, 2:15 a.m.
# HG changeset patch
# User Durham Goode <durham@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.
Pierre-Yves David - March 18, 2015, 9:09 p.m.
On 03/17/2015 07:15 PM, Durham Goode wrote:
> # HG changeset patch
> # User Durham Goode <durham@fb.com>
> # Date 1426629178 25200
> #      Tue Mar 17 14:52:58 2015 -0700
> # Node ID da6c09e839aac483faaaf619c377db329b8c40ae
> # Parent  567ae53657544744155897ada91f16f8af61ad8a
> obsolete: remove last instance of _enabled

This patch is tighly related to the evolve-ext one. I'll take care of it 
when I'll be done with them.
Durham Goode - March 18, 2015, 10:01 p.m.
On 3/18/15 2:09 PM, Pierre-Yves David wrote:
>
>
> On 03/17/2015 07:15 PM, Durham Goode wrote:
>> # HG changeset patch
>> # User Durham Goode <durham@fb.com>
>> # Date 1426629178 25200
>> #      Tue Mar 17 14:52:58 2015 -0700
>> # Node ID da6c09e839aac483faaaf619c377db329b8c40ae
>> # Parent  567ae53657544744155897ada91f16f8af61ad8a
>> obsolete: remove last instance of _enabled
>
> This patch is tighly related to the evolve-ext one. I'll take care of 
> it when I'll be done with them.
>
This doesn't require the evolve-ext ones.  obsolete.isenabled is already 
used throughout the core codebase, this instance just slipped in a week 
after obsolete.isenabled was introduced.
Matt Mackall - March 18, 2015, 10:09 p.m.
On Wed, 2015-03-18 at 15:01 -0700, Durham Goode wrote:
> 
> On 3/18/15 2:09 PM, Pierre-Yves David wrote:
> >
> >
> > On 03/17/2015 07:15 PM, Durham Goode wrote:
> >> # HG changeset patch
> >> # User Durham Goode <durham@fb.com>
> >> # Date 1426629178 25200
> >> #      Tue Mar 17 14:52:58 2015 -0700
> >> # Node ID da6c09e839aac483faaaf619c377db329b8c40ae
> >> # Parent  567ae53657544744155897ada91f16f8af61ad8a
> >> obsolete: remove last instance of _enabled
> >
> > This patch is tighly related to the evolve-ext one. I'll take care of 
> > it when I'll be done with them.
> >
> This doesn't require the evolve-ext ones.  obsolete.isenabled is already 
> used throughout the core codebase, this instance just slipped in a week 
> after obsolete.isenabled was introduced.

Looks legit, queued.

Patch

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)