# HG changeset patch # User Matt Harbison # Date 1575682142 18000 # Node ID 9595b6a9f0d5a040ef451a36dff2a61b76fb0d64 # Parent ac627ed8a911573175f0fc2437559d46525e321e tests: show that fileset patterns don't work with `fix` when not in repo root Differential Revision: https://phab.mercurial-scm.org/D7569 diff -r ac627ed8a911 -r 9595b6a9f0d5 tests/test-fix.t --- a/tests/test-fix.t Fri Dec 20 17:19:25 2019 +0100 +++ b/tests/test-fix.t Fri Dec 06 20:29:02 2019 -0500 @@ -1303,10 +1303,13 @@ > [fix] > printcwd:command = "$PYTHON" -c "import os; print(os.getcwd())" > printcwd:pattern = relpath:foo/bar + > filesetpwd:command = "$PYTHON" -c "import os; print('fs: ' + os.getcwd())" + > filesetpwd:pattern = set:**quux > EOF $ mkdir foo $ printf "bar\n" > foo/bar + $ printf "quux\n" > quux $ hg commit -Aqm blah $ hg fix -w -r . foo/bar @@ -1318,15 +1321,39 @@ $ cd foo $ hg fix -w -r . bar - $ hg cat -r tip bar + $ hg cat -r tip bar ../quux $TESTTMP/subprocesscwd - $ cat bar + quux + $ cat bar ../quux $TESTTMP/subprocesscwd + quux $ echo modified > bar $ hg fix -w bar $ cat bar $TESTTMP/subprocesscwd +Apparently fixing p1() and its descendants doesn't include wdir() unless +explicitly stated. + +BROKEN: fileset matches aren't relative to repo.root for commits + + $ hg fix -r '.::' + $ hg cat -r . ../quux + quux + $ hg cat -r tip ../quux + quux + $ cat ../quux + quux + +Clean files are not fixed unless explicitly named + $ echo 'dirty' > ../quux + +BROKEN: fileset matches aren't relative to repo.root for wdir + + $ hg fix --working-dir + $ cat ../quux + dirty + $ cd ../.. Tools configured without a pattern are ignored. It would be too dangerous to