Patchwork D7569: tests: show that fileset patterns don't work with `fix` when not in repo root

login
register
mail settings
Submitter phabricator
Date Dec. 7, 2019, 3:15 a.m.
Message ID <differential-rev-PHID-DREV-ker5xjgr5xubtncy3mqn-req@mercurial-scm.org>
Download mbox | patch
Permalink /patch/43617/
State Superseded
Headers show

Comments

phabricator - Dec. 7, 2019, 3:15 a.m.
mharbison72 created this revision.
Herald added a subscriber: mercurial-devel.
Herald added a reviewer: hg-reviewers.

REPOSITORY
  rHG Mercurial

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

AFFECTED FILES
  tests/test-fix.t

CHANGE DETAILS




To: mharbison72, #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
@@ -1301,10 +1301,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
@@ -1316,15 +1319,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