##// END OF EJS Templates
hgweb: provide symrev (symbolic revision) property to the templates...
hgweb: provide symrev (symbolic revision) property to the templates One of the features of hgweb is that current position in repo history is remembered between separate requests. That is, links from /rev/<node_hash> lead to /file/<node_hash> or /log/<node_hash>, so it's easy to dig deep into the history. However, such links could only use node hashes and local revision numbers, so while staying at one exact revision is easy, staying on top of the changes is not, because hashes presumably can't change (local revision numbers can, but probably not in a way you'd find useful for navigating). So while you could use 'tip' or 'default' in a url, links on that page would be permanent. This is not always desired (think /rev/tip or /graph/stable or /log/@) and is sometimes just confusing (i.e. /log/<not the tip hash>, when recent history is not displayed). And if user changed url deliberately to say default instead of <some node hash>, the page ignores that fact and uses node hash in its links, which means that navigation is, in a way, broken. This new property, symrev, is used for storing current revision the way it was specified, so then templates can use it in links and thus "not dereference" the symbolic revision. It is an additional way to produce links, so not every link needs to drop {node|short} in favor of {symrev}, many will still use node hash (log and filelog entries, annotate lines, etc). Some pages (e.g. summary, tags) always use the tip changeset for their context, in such cases symrev is set to 'tip'. This is needed in case the pages want to provide archive links. highlight extension needs to be updated, since _filerevision now takes an additional positional argument (signature "web, req, tmpl" is used by most of webcommands.py functions). More references to symbolic revisions and related gripes: issue2296, issue2826, issue3594, issue3634.
av6 -
r25602:85fb416f default
Show More
Name Size Modified Last Commit Author
/ hgext
convert
highlight
largefiles
zeroconf
__init__.py Loading ...
acl.py Loading ...
blackbox.py Loading ...
bugzilla.py Loading ...
censor.py Loading ...
children.py Loading ...
churn.py Loading ...
color.py Loading ...
eol.py Loading ...
extdiff.py Loading ...
factotum.py Loading ...
fetch.py Loading ...
gpg.py Loading ...
graphlog.py Loading ...
hgcia.py Loading ...
hgk.py Loading ...
histedit.py Loading ...
keyword.py Loading ...
mq.py Loading ...
notify.py Loading ...
pager.py Loading ...
patchbomb.py Loading ...
progress.py Loading ...
purge.py Loading ...
rebase.py Loading ...
record.py Loading ...
relink.py Loading ...
schemes.py Loading ...
share.py Loading ...
shelve.py Loading ...
strip.py Loading ...
transplant.py Loading ...
win32mbcs.py Loading ...
win32text.py Loading ...