Show More
@@ -1084,7 +1084,7 b' def filelog(web):' | |||||
1084 | linerange = webutil.formatlinerange(*lrange) |
|
1084 | linerange = webutil.formatlinerange(*lrange) | |
1085 | # deactivate numeric nav links when linerange is specified as this |
|
1085 | # deactivate numeric nav links when linerange is specified as this | |
1086 | # would required a dedicated "revnav" class |
|
1086 | # would required a dedicated "revnav" class | |
1087 | nav = [] |
|
1087 | nav = templateutil.mappinglist([]) | |
1088 | if descend: |
|
1088 | if descend: | |
1089 | it = dagop.blockdescendants(fctx, *lrange) |
|
1089 | it = dagop.blockdescendants(fctx, *lrange) | |
1090 | else: |
|
1090 | else: |
@@ -125,13 +125,16 b' class revnav(object):' | |||||
125 | :limit: how far shall we link |
|
125 | :limit: how far shall we link | |
126 |
|
126 | |||
127 | The return is: |
|
127 | The return is: | |
128 |
- a single element |
|
128 | - a single element mappinglist | |
129 | - containing a dictionary with a `before` and `after` key |
|
129 | - containing a dictionary with a `before` and `after` key | |
130 | - values are dictionaries with `label` and `node` keys |
|
130 | - values are dictionaries with `label` and `node` keys | |
131 | """ |
|
131 | """ | |
132 | if not self: |
|
132 | if not self: | |
133 | # empty repo |
|
133 | # empty repo | |
134 | return ({'before': (), 'after': ()},) |
|
134 | return templateutil.mappinglist([ | |
|
135 | {'before': templateutil.mappinglist([]), | |||
|
136 | 'after': templateutil.mappinglist([])}, | |||
|
137 | ]) | |||
135 |
|
138 | |||
136 | targets = [] |
|
139 | targets = [] | |
137 | for f in _navseq(1, pagelen): |
|
140 | for f in _navseq(1, pagelen): | |
@@ -156,7 +159,11 b' class revnav(object):' | |||||
156 |
|
159 | |||
157 | navafter.append({'label': 'tip', 'node': 'tip'}) |
|
160 | navafter.append({'label': 'tip', 'node': 'tip'}) | |
158 |
|
161 | |||
159 | return ({'before': navbefore, 'after': navafter},) |
|
162 | # TODO: maybe this can be a scalar object supporting tomap() | |
|
163 | return templateutil.mappinglist([ | |||
|
164 | {'before': templateutil.mappinglist(navbefore), | |||
|
165 | 'after': templateutil.mappinglist(navafter)}, | |||
|
166 | ]) | |||
160 |
|
167 | |||
161 | class filerevnav(revnav): |
|
168 | class filerevnav(revnav): | |
162 |
|
169 |
General Comments 0
You need to be logged in to leave comments.
Login now