comparison tests/test-cat.t @ 30833:bd5e9647f646

templater: add '{envvars}' to access environment variables Since the option for ui.exportableenviron is experimental, so is this template until the underlying API is sorted out.
author Matt Harbison <matt_harbison@yahoo.com>
date Tue, 17 Jan 2017 23:12:54 -0500
parents c560d8c68791
children 746e12a767b3
comparison
equal deleted inserted replaced
30832:da5fa0f13a41 30833:bd5e9647f646
66 Test working directory 66 Test working directory
67 67
68 $ echo b-wdir > b 68 $ echo b-wdir > b
69 $ hg cat -r 'wdir()' b 69 $ hg cat -r 'wdir()' b
70 b-wdir 70 b-wdir
71
72 Environment variables are not visible by default
73
74 $ PATTERN='t4' hg log -r '.' -T "{ifcontains('PATTERN', envvars, 'yes', 'no')}\n"
75 no
76
77 Environment variable visibility can be explicit
78
79 $ PATTERN='t4' hg log -r '.' -T "{envvars % '{key} -> {value}\n'}" \
80 > --config "experimental.exportableenviron=PATTERN"
81 PATTERN -> t4