Patchwork [2,of,2,RESEND] extensions: remove strip_init=True from _disabledpaths()

login
register
mail settings
Submitter Yuya Nishihara
Date May 24, 2018, 1:57 p.m.
Message ID <5a2a14d118b52b14078c.1527170258@mimosa>
Download mbox | patch
Permalink /patch/31836/
State Accepted
Headers show

Comments

Yuya Nishihara - May 24, 2018, 1:57 p.m.
# HG changeset patch
# User Yuya Nishihara <yuya@tcha.org>
# Date 1525340398 -32400
#      Thu May 03 18:39:58 2018 +0900
# Node ID 5a2a14d118b52b14078ceb52d8b9732570ccf581
# Parent  a9b271c7d3c095c381da92be0ad7bfd2e9555ac9
extensions: remove strip_init=True from _disabledpaths()

It's no longer used.

Patch

diff --git a/mercurial/extensions.py b/mercurial/extensions.py
--- a/mercurial/extensions.py
+++ b/mercurial/extensions.py
@@ -540,9 +540,8 @@  def getwrapperchain(container, funcname)
         fn = getattr(fn, '_origfunc', None)
     return result
 
-def _disabledpaths(strip_init=False):
-    '''find paths of disabled extensions. returns a dict of {name: path}
-    removes /__init__.py from packages if strip_init is True'''
+def _disabledpaths():
+    '''find paths of disabled extensions. returns a dict of {name: path}'''
     import hgext
     extpath = os.path.dirname(
         os.path.abspath(pycompat.fsencode(hgext.__file__)))
@@ -561,8 +560,6 @@  def _disabledpaths(strip_init=False):
             path = os.path.join(extpath, e, '__init__.py')
             if not os.path.exists(path):
                 continue
-            if strip_init:
-                path = os.path.dirname(path)
         if name in exts or name in _order or name == '__init__':
             continue
         exts[name] = path