Mercurial > public > mercurial-scm > hg
comparison tests/test-duplicateoptions.py @ 30559:d83ca854fa21
ui: factor out ui.load() to create a ui without loading configs (API)
This allows us to write doctests depending on a ui object, but not on global
configs.
ui.load() is a class method so we can do wsgiui.load(). All ui() calls but
for doctests are replaced with ui.load(). Some of them could be changed to
not load configs later.
author | Yuya Nishihara <yuya@tcha.org> |
---|---|
date | Sat, 22 Oct 2016 14:35:10 +0900 |
parents | ce49c8d4f0bb |
children | bd872f64a8ba |
comparison
equal
deleted
inserted
replaced
30557:cbeb54ec0481 | 30559:d83ca854fa21 |
---|---|
19 for ext in disabled: | 19 for ext in disabled: |
20 hgrc.write(ext + '=\n') | 20 hgrc.write(ext + '=\n') |
21 | 21 |
22 hgrc.close() | 22 hgrc.close() |
23 | 23 |
24 u = uimod.ui() | 24 u = uimod.ui.load() |
25 extensions.loadall(u) | 25 extensions.loadall(u) |
26 | 26 |
27 globalshort = set() | 27 globalshort = set() |
28 globallong = set() | 28 globallong = set() |
29 for option in commands.globalopts: | 29 for option in commands.globalopts: |