Files @ 927b7934b867
Branch filter:

Location: kallithea/setup.cfg

Mads Kiilerich
utils: let make_ui return an empty ui.ui() object if the requested hgrc file isn't present

89c30b145bb8 lost an "if repoui" in simplehg, and Kallithea would thus fail on
serving repos without a .hg/hgrc :

File ".../kallithea/lib/middleware/simplehg.py", line 285, in _augment_hgrc
for k, v in repoui.configitems(section):
AttributeError: 'bool' object has no attribute 'configitems'

It is *only* simplehg that invoke make_ui with read_from 'file'. In this case
it could return False if the requested file wasn't present.

It was odd and inconsistent that make_ui with read_from 'file' either returned
an ui object or the value False.

To fix the problem, just let make_ui return the empty ui.ui() if no .hg/hgrc is
present. An ui object that just doesn't have any config sections is much better
than any alternative.
[egg_info]
tag_build =
tag_svn_revision = 0
tag_date = 0

[aliases]
test = pytest

[compile_catalog]
domain = kallithea
directory = kallithea/i18n
statistics = true

[extract_messages]
add_comments = TRANSLATORS:
output_file = kallithea/i18n/kallithea.pot
msgid-bugs-address = translations@kallithea-scm.org
copyright-holder = Various authors, licensing as GPLv3
no-wrap = true

[init_catalog]
domain = kallithea
input_file = kallithea/i18n/kallithea.pot
output_dir = kallithea/i18n

[update_catalog]
domain = kallithea
input_file = kallithea/i18n/kallithea.pot
output_dir = kallithea/i18n
previous = true

[build_sphinx]
source-dir = docs/
build-dir = docs/_build
all_files = 1

[upload_sphinx]
upload-dir = docs/_build/html