mercurial/templates/rss/map
author Gregory Szorc <gregory.szorc@gmail.com>
Mon, 13 Nov 2017 19:22:11 -0800
changeset 35112 073eec083e25
parent 21057 19ee4923a2b6
permissions -rw-r--r--
bundle2: extract logic for seeking bundle2 part into own class Currently, unbundlepart classes support bi-directional seeking. Most consumers of unbundlepart only ever seek forward - typically as part of moving to the end of the bundle part so they can move on to the next one. But regardless of the actual usage of the part, instances maintain an index mapping offsets within the underlying raw payload to offsets within the decoded payload. Maintaining the mapping of offset data can be expensive in terms of memory use. Furthermore, many bundle2 consumers don't have access to an underlying seekable stream. This includes all compressed bundles. So maintaining offset data when the underlying stream can't be seeked anyway is wasteful. And since many bundle2 streams can't be seeked, it seems like a bad idea to expose a seek API in bundle2 parts by default. If you provide them, people will attempt to use them. Seekable bundle2 parts should be the exception, not the rule. This commit starts the process dividing unbundlepart into 2 classes: a base class that supports linear, one-time reads and a child class that supports bi-directional seeking. In this first commit, we split various methods and attributes out into a new "seekableunbundlepart" class. Previous instantiators of "unbundlepart" now instantiate "seekableunbundlepart." This preserves backwards compatibility. The coupling between the classes is still tight: "unbundlepart" cannot be used on its own. This will be addressed in subsequent commits. Differential Revision: https://phab.mercurial-scm.org/D1386
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1901
c64bef3d7043 use safer string parser for template engine.
Vadim Gelfer <vadim.gelfer@gmail.com>
parents: 1766
diff changeset
     1
default = 'changelog'
5928
3340aa5a64f7 hgweb: move HTTP content types out of header templates
Dirkjan Ochtman <dirkjan@ochtman.nl>
parents: 3277
diff changeset
     2
mimetype = 'text/xml; charset={encoding}'
3277
105253b30239 Moved hgweb map-* files into their style directories and adjusted them.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3235
diff changeset
     3
header = header.tmpl
105253b30239 Moved hgweb map-* files into their style directories and adjusted them.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3235
diff changeset
     4
changelog = changelog.tmpl
105253b30239 Moved hgweb map-* files into their style directories and adjusted them.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3235
diff changeset
     5
changelogentry = changelogentry.tmpl
105253b30239 Moved hgweb map-* files into their style directories and adjusted them.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3235
diff changeset
     6
filelog = filelog.tmpl
105253b30239 Moved hgweb map-* files into their style directories and adjusted them.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3235
diff changeset
     7
filelogentry = filelogentry.tmpl
105253b30239 Moved hgweb map-* files into their style directories and adjusted them.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3235
diff changeset
     8
tags = tags.tmpl
105253b30239 Moved hgweb map-* files into their style directories and adjusted them.
Thomas Arendsen Hein <thomas@intevation.de>
parents: 3235
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
7748
09bec6fd747c hgweb: add rss error template
Sune Foldager <cryo@cyanite.org>
parents: 5928
diff changeset
    14
error = error.tmpl
21057
19ee4923a2b6 hgweb: adding branch, tags, bookmarks, user, and file list to rss feed entries
Aaron Jensen <ajensen@webmd.net>
parents: 18045
diff changeset
    15
filedifflink = '{file|escape}<br />'
19ee4923a2b6 hgweb: adding branch, tags, bookmarks, user, and file list to rss feed entries
Aaron Jensen <ajensen@webmd.net>
parents: 18045
diff changeset
    16
fileellipses = '{file|escape}<br />'
19ee4923a2b6 hgweb: adding branch, tags, bookmarks, user, and file list to rss feed entries
Aaron Jensen <ajensen@webmd.net>
parents: 18045
diff changeset
    17
filenodelink = '{file|escape}<br />'
19ee4923a2b6 hgweb: adding branch, tags, bookmarks, user, and file list to rss feed entries
Aaron Jensen <ajensen@webmd.net>
parents: 18045
diff changeset
    18
filenolink = '{file|escape}<br />'