Mercurial > hg
annotate mercurial/templates/atom/map @ 33766:4c706037adef
wireproto: overhaul iterating batcher code (API)
The remote batching code is difficult to read. Let's improve it.
As part of the refactor, the future returned by method calls on
batchiter() instances is now populated. However, you still need to
consume the results() generator for the future to be set. But at
least now we can stuff the future somewhere and not have to worry
about aligning method call order with result order since you can
use a future to hold the result.
Also as part of the change, we now verify that @batchable generators
yield exactly 2 values. In other words, we enforce their API.
The non-iter batcher has been unused since b6e71f8af5b8. And to my
surprise we had no explicit unit test coverage of it! test-batching.py
has been overhauled to use the iterating batcher.
Since the iterating batcher doesn't allow non-batchable method
calls nor local calls, tests have been updated to reflect reality.
The iterating batcher has been used for multiple releases apparently
without major issue. So this shouldn't cause alarm.
.. api::
@peer.batchable functions must now yield exactly 2 values
Differential Revision: https://phab.mercurial-scm.org/D319
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Wed, 09 Aug 2017 23:29:30 -0700 |
parents | 82858f144217 |
children |
rev | line source |
---|---|
5269
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
diff
changeset
|
1 default = 'changelog' |
8428
5ccca71775e1
atom/rss: use newer template syntax everywhere
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
7749
diff
changeset
|
2 feedupdated = '<updated>{date|rfc3339date}</updated>' |
5928
3340aa5a64f7
hgweb: move HTTP content types out of header templates
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents:
5269
diff
changeset
|
3 mimetype = 'application/atom+xml; charset={encoding}' |
5269
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
diff
changeset
|
4 header = header.tmpl |
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
diff
changeset
|
5 changelog = changelog.tmpl |
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
diff
changeset
|
6 changelogentry = changelogentry.tmpl |
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
diff
changeset
|
7 filelog = filelog.tmpl |
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
diff
changeset
|
8 tags = tags.tmpl |
46c5e1ee8aaa
Added support for the Atom syndication format
Robert Bachmann <rbach@rbach.priv.at>
parents:
diff
changeset
|
9 tagentry = tagentry.tmpl |
13858
1046cb663776
hgweb: add missing bookmarks templates to atom/rss styles
Yuya Nishihara <yuya@tcha.org>
parents:
9999
diff
changeset
|
10 bookmarks = bookmarks.tmpl |
1046cb663776
hgweb: add missing bookmarks templates to atom/rss styles
Yuya Nishihara <yuya@tcha.org>
parents:
9999
diff
changeset
|
11 bookmarkentry = bookmarkentry.tmpl |
18045
add2f9ddcfb5
hgweb: add branches RSS and Atom feeds
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
13858
diff
changeset
|
12 branches = branches.tmpl |
add2f9ddcfb5
hgweb: add branches RSS and Atom feeds
Angel Ezquerra <angel.ezquerra@gmail.com>
parents:
13858
diff
changeset
|
13 branchentry = branchentry.tmpl |
7749
f32af51aaee5
hgweb: add atom error template
Sune Foldager <cryo@cyanite.org>
parents:
5928
diff
changeset
|
14 error = error.tmpl |
21056
d70703954a2a
hgweb: adding branch, tags, bookmarks, user, and file list to atom feed entries
Aaron Jensen <ajensen@webmd.net>
parents:
18045
diff
changeset
|
15 filedifflink = '{file|escape}<br />' |
d70703954a2a
hgweb: adding branch, tags, bookmarks, user, and file list to atom feed entries
Aaron Jensen <ajensen@webmd.net>
parents:
18045
diff
changeset
|
16 fileellipses = '{file|escape}<br />' |
d70703954a2a
hgweb: adding branch, tags, bookmarks, user, and file list to atom feed entries
Aaron Jensen <ajensen@webmd.net>
parents:
18045
diff
changeset
|
17 filenodelink = '{file|escape}<br />' |
d70703954a2a
hgweb: adding branch, tags, bookmarks, user, and file list to atom feed entries
Aaron Jensen <ajensen@webmd.net>
parents:
18045
diff
changeset
|
18 filenolink = '{file|escape}<br />' |