comparison tests/test-fix.t @ 42654:22c4bd7d1cbf

fix: add a test case around the effect of cwd on pattern matching This was not covered by previous tests. It is related to a regression encountered at Google due to misconfiguration of [fix]. Differential Revision: https://phab.mercurial-scm.org/D6692
author Danny Hooper <hooper@google.com>
date Wed, 24 Jul 2019 16:21:12 -0700
parents 9ed63cd0026c
children 2987d015aba4
comparison
equal deleted inserted replaced
42653:9ed63cd0026c 42654:22c4bd7d1cbf
1240 $ hg cat -r 2 foo 1240 $ hg cat -r 2 foo
1241 ab 1241 ab
1242 1242
1243 $ cd .. 1243 $ cd ..
1244 1244
1245 Test that we can configure a fixer to affect all files regardless of the cwd.
1246 The way we invoke matching must not prohibit this.
1247
1248 $ hg init affectallfiles
1249 $ cd affectallfiles
1250
1251 $ mkdir foo bar
1252 $ printf "foo" > foo/file
1253 $ printf "bar" > bar/file
1254 $ printf "baz" > baz_file
1255 $ hg add -q
1256
1257 $ cd bar
1258 $ hg fix --working-dir --config "fix.cooltool:command=echo fixed" \
1259 > --config "fix.cooltool:pattern=rootglob:**"
1260 $ cd ..
1261
1262 $ cat foo/file
1263 fixed
1264 $ cat bar/file
1265 fixed
1266 $ cat baz_file
1267 fixed
1268
1269 $ cd ..