view mercurial/templates/map-cmdline.bisect @ 35092:4fb489a998c9

run-tests: allow to register any arbitrary pattern for replacement We add a 'common-pattern.py' file that allow to define extra pattern. This seems a cleaner approach than editing the 'run-test.py' file over and over. In addition allowing arbitrary pattern registration will also help extension. The format used is a python file is picked out of convenience defining a list of tuple in 'substitutions' variable. This is picked out of convenience since it is dead simple to implement. The end goal is to register more pattern for Mercurial test. There are multiple common patterns that change over time. That impact is annoying. Using pattern emplacement for them would be handy. The next patches will define all the needed patterns and the last patch will mass-update the tests outputs as it was easier to do in a single pass.
author Boris Feld <boris.feld@octobus.net>
date Sun, 05 Nov 2017 06:34:27 +0100
parents f4aeb952ab77
children f9a98075a37e
line wrap: on
line source

%include map-cmdline.default

[templates]
changeset = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{user}{ldate}{summary}\n'
changeset_quiet = '{lshortbisect} {rev}:{node|short}\n'
changeset_verbose = '{cset}{lbisect}{branches}{bookmarks}{tags}{parents}{user}{ldate}{lfiles}{lfile_copies_switch}{description}\n'
changeset_debug = '{fullcset}{lbisect}{branches}{bookmarks}{tags}{lphase}{parents}{manifest}{user}{ldate}{lfile_mods}{lfile_adds}{lfile_dels}{lfile_copies_switch}{extras}{description}\n'

# We take the zeroth word in order to omit "(implicit)" in the label
bisectlabel = ' bisect.{word('0', bisect)}'

lbisect ='{label("log.bisect{if(bisect, bisectlabel)}",
                                "bisect:      {bisect}\n")}'
lshortbisect ='{label("log.bisect{if(bisect, bisectlabel)}",
                                    "{bisect|shortbisect}")}'