extensions: pull extension-aware bits out of ui
authorMatt Mackall <mpm@selenic.com>
Mon, 18 Jun 2007 13:24:34 -0500
changeset 4617 669e76b7df24
parent 4616 70352337934e
child 4618 7c8f8b736365
extensions: pull extension-aware bits out of ui
mercurial/extensions.py
mercurial/ui.py
--- a/mercurial/extensions.py	Mon Jun 18 13:24:34 2007 -0500
+++ b/mercurial/extensions.py	Mon Jun 18 13:24:34 2007 -0500
@@ -63,7 +63,10 @@
     commands.table.update(cmdtable)
 
 def loadall(ui):
-    for name, path in ui.extensions():
+    result = ui.configitems("extensions")
+    for i, (name, path) in enumerate(result):
+        if path:
+                path = os.path.expanduser(path)
         try:
             load(ui, name, path)
         except (util.SignalInterrupt, KeyboardInterrupt):
--- a/mercurial/ui.py	Mon Jun 18 13:24:34 2007 -0500
+++ b/mercurial/ui.py	Mon Jun 18 13:24:34 2007 -0500
@@ -319,13 +319,6 @@
             for name, value in self.configitems(section, untrusted):
                 yield section, name, str(value).replace('\n', '\\n')
 
-    def extensions(self):
-        result = self.configitems("extensions")
-        for i, (key, value) in enumerate(result):
-            if value:
-                result[i] = (key, os.path.expanduser(value))
-        return result
-
     def hgignorefiles(self):
         result = []
         for key, value in self.configitems("ui"):