hgweb: display fate of obsolete changesets
Operations that obsolete changesets store enough metadata to explain what
happened after the fact. One way to get that metadata is showsuccsandmarkers
function, which returns a list of successors of a particular changeset and
appropriate obsolescence markers.
Templates have a set of experimental functions that have names starting with
obsfate. This patch uses some of these functions to interpret output of
succsandmarkers() and produce human-friendly messages that describe what
happened to an obsolete changeset, e.g. "pruned" or "rewritten as
6:
3de5eca88c00".
In commonentry(), succsandmarkers property is made callable so it's only
executed on demand; this saves time when changeset is not obsolete, and also in
e.g. /shortlog view, where there are a lot of changesets, but we don't need to
show each and every one in detail.
In spartan theme, succsandmarkers is used instead of the simple "obsolete:
yes", in other themes a new line is added to /rev page.
test-ssh: stabilize for Windows
Previously, this complained:
remote: '.' is not recognized as an internal or external command,
remote: operable program or batch file.
Making this a python script apparently revealed some races[1]. Thanks to Yuya
for suggesting this.
[1] https://www.mercurial-scm.org/pipermail/mercurial-devel/2017-December/109094.html
templater: register keywords to defaults table
Since the keywords are permanent, there should be no need to pass them
by a temporary mapping.
templater: drop unneeded resources from conflict-marker data
Follow-up for
32c278eb876f and
f1c54d003327.
templater: rewrite docstring of templater.__init__()
More importantly, this patch adds what the cache is.
rebase: don't take out a dirstate guard for in-memory rebase
Since IMM doesn't affect the dirstate, it's not needed, and might be faster.
Differential Revision: https://phab.mercurial-scm.org/D1745
test-split: stabilize for Windows
- $PYTHON needs to be quoted when used as an executable in $HGEDITOR. This
avoids the error "'c' is not recognized as an internal or external command".
- seq.py is printing out CRLF, and then the subsequent `sed` script seems to
convert to LF on MSYS. IDK if python print statements can be made to print
LF on Windows, and I'm pretty sure CRLF is baked into some other tests.
- A stray glob was causing the 'obsstore-off' case to report 'no result code
from test'.
- When I ran with --debug, the `hg diff` commands in the test both printed
color sequences, and paused the output as it was run through the pager.
lfs: use ui.note() and ui.debug() instead of ui.write() and their flags
Even though the upload/download message is still in a ui.verbose check, I
switched that to ui.note() too so that the 'ui.note' label is applied. The
debug message is no longer marked for translation because check-code complained.