Mercurial > hg
changeset 4617:669e76b7df24
extensions: pull extension-aware bits out of ui
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 18 Jun 2007 13:24:34 -0500 |
parents | 70352337934e |
children | 7c8f8b736365 |
files | mercurial/extensions.py mercurial/ui.py |
diffstat | 2 files changed, 4 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- 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"):