Mercurial > kallithea
annotate docs/api/models.rst @ 7580:927b7934b867
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.
author | Mads Kiilerich <mads@kiilerich.com> |
---|---|
date | Tue, 19 Mar 2019 03:05:11 +0100 |
parents | cd6c577ade97 |
children | b6b6955981a5 |
rev | line source |
---|---|
849
64a5386216c5
Fixed models link at documentation
Lukasz Balcerzak <lukasz.balcerzak@python-center.org>
parents:
811
diff
changeset
|
1 .. _models: |
811 | 2 |
2095 | 3 ======================== |
5413
22a3fa3c4254
docs: cleanup of casing, markup and spacing of headings
Mads Kiilerich <madski@unity3d.com>
parents:
4226
diff
changeset
|
4 The :mod:`models` module |
811 | 5 ======================== |
6 | |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3224
diff
changeset
|
7 .. automodule:: kallithea.model |
811 | 8 :members: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
9 |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3224
diff
changeset
|
10 .. automodule:: kallithea.model.comment |
1839 | 11 :members: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
12 |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3224
diff
changeset
|
13 .. automodule:: kallithea.model.permission |
811 | 14 :members: |
1839 | 15 |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3224
diff
changeset
|
16 .. automodule:: kallithea.model.repo_permission |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
17 :members: |
1839 | 18 |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3224
diff
changeset
|
19 .. automodule:: kallithea.model.repo |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
20 :members: |
811 | 21 |
4226
499c513967a1
docs: fix building html
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
22 .. automodule:: kallithea.model.repo_group |
1839 | 23 :members: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
24 |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3224
diff
changeset
|
25 .. automodule:: kallithea.model.scm |
811 | 26 :members: |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
27 |
4186
7e5f8c12a3fc
First step in two-part process to rename directories to kallithea.
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
3224
diff
changeset
|
28 .. automodule:: kallithea.model.user |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
29 :members: |
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
30 |
4226
499c513967a1
docs: fix building html
Bradley M. Kuhn <bkuhn@sfconservancy.org>
parents:
4186
diff
changeset
|
31 .. automodule:: kallithea.model.user_group |
3224
8b8edfc25856
whitespace cleanup
Marcin Kuzminski <marcin@python-works.com>
parents:
2095
diff
changeset
|
32 :members: |