Patchwork D6692: fix: add a test case around the effect of cwd on pattern matching

login
register
mail settings
Submitter phabricator
Date July 26, 2019, 4:05 p.m.
Message ID <494072d60d794756275a5c1c39707f0b@localhost.localdomain>
Download mbox | patch
Permalink /patch/41083/
State Not Applicable
Headers show

Comments

phabricator - July 26, 2019, 4:05 p.m.
Closed by commit rHG22c4bd7d1cbf: fix: add a test case around the effect of cwd on pattern matching (authored by hooper).
This revision was automatically updated to reflect the committed changes.
This revision was not accepted when it landed; it landed in state "Needs Review".

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D6692?vs=16061&id=16080

CHANGES SINCE LAST ACTION
  https://phab.mercurial-scm.org/D6692/new/

REVISION DETAIL
  https://phab.mercurial-scm.org/D6692

AFFECTED FILES
  tests/test-fix.t

CHANGE DETAILS




To: hooper, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-fix.t b/tests/test-fix.t
--- a/tests/test-fix.t
+++ b/tests/test-fix.t
@@ -1242,3 +1242,28 @@ 
 
   $ cd ..
 
+Test that we can configure a fixer to affect all files regardless of the cwd.
+The way we invoke matching must not prohibit this.
+
+  $ hg init affectallfiles
+  $ cd affectallfiles
+
+  $ mkdir foo bar
+  $ printf "foo" > foo/file
+  $ printf "bar" > bar/file
+  $ printf "baz" > baz_file
+  $ hg add -q
+
+  $ cd bar
+  $ hg fix --working-dir --config "fix.cooltool:command=echo fixed" \
+  >                      --config "fix.cooltool:pattern=rootglob:**"
+  $ cd ..
+
+  $ cat foo/file
+  fixed
+  $ cat bar/file
+  fixed
+  $ cat baz_file
+  fixed
+
+  $ cd ..