revlog: add a magic null revision to our index
We expand our index by one entry so that index[nullrev] points to a
unique entry, the null revision. This naturally eliminates numerous
extra tests in the performance-sensitive index access functions, most
of which are now trivial again.
Adding new entries is now done with insert(-1, e) rather than
append(e).
#header#
<title>#repo|escape#: #file|escape# history</title>
<link rel="alternate" type="application/rss+xml"
href="#url#rss-log/tip/#file|urlescape#" title="RSS feed for #repo|escape#:#file#">
</head>
</head>
<body>
<div class="buttons">
<a href="#url#log{sessionvars%urlparameter}">changelog</a>
<a href="#url#shortlog{sessionvars%urlparameter}">shortlog</a>
<a href="#url#tags{sessionvars%urlparameter}">tags</a>
<a href="#url#file/#node|short#/#file|urlescape#{sessionvars%urlparameter}">file</a>
<a href="#url#annotate/#node|short#/#file|urlescape#{sessionvars%urlparameter}">annotate</a>
<a type="application/rss+xml" href="#url#rss-log/tip/#file|urlescape#">rss</a>
</div>
<h2>#file|escape# revision history</h2>
<p>navigate: <small class="navigate">{nav%filenaventry}</small></p>
#entries%filelogentry#
#footer#