Mercurial > hg
view tests/helpers-testrepo.sh @ 33154:4ecc6047d45f
log: add an extension hook-point in changeset_printer
Extensions sometimes wants to add other information in the default log output
format (when no templating is used).
Add an empty function named '_exthook' for easing the extension life.
Extensions will be able to wrap this function and collaborate to display
additional information.
Exthook is called after displaying troubles and just before displaying the
files, extra and description.
Add a new test file to test it and not pollute other test files.
author | Boris Feld <boris.feld@octobus.net> |
---|---|
date | Mon, 26 Jun 2017 15:46:24 +0200 |
parents | 98e2c78e309c |
children | ddd65b4f3ae6 |
line wrap: on
line source
# Invoke the system hg installation (rather than the local hg version being # tested). # # We want to use the hg version being tested when interacting with the test # repository, and the system hg when interacting with the mercurial source code # repository. # # The mercurial source repository was typically orignally cloned with the # system mercurial installation, and may require extensions or settings from # the system installation. syshg () { ( syshgenv exec hg "$@" ) } # Revert the environment so that running "hg" runs the system hg # rather than the test hg installation. syshgenv () { . "$HGTEST_RESTOREENV" HGPLAIN=1 export HGPLAIN } # Most test-check-* sourcing this file run "hg files", which is not available # in ancient versions of hg. So we double check if "syshg files" works and # fallback to hg bundled in the repo. syshg files -h >/dev/null 2>/dev/null if [ $? -ne 0 ]; then syshg() { hg "$@" } syshgenv() { : } fi