diff tests/test-sparse.t @ 35742:7a1806e0daea

sparse: --include 'dir1/dir2' should not include 'dir1/*' In 2015 there was a workaround added (f39bace2d6cad32907c0d7961b3c0dbd64a1b7ad) to sparse in the hg-experimental repo. That workaround: a) no longer seems to be needed, since its testcase passes even with the code removed, and b) caused a new problem: --include 'dir1/dir2' ended up including dir1/* too. (--include 'glob:dir1/dir2' is a user-level workaround.) Remove the offending code, and add a testcase for situation B.
author Hollis Blanchard <hollis_blanchard@mentor.com>
date Thu, 18 Jan 2018 13:33:21 -0800
parents 41ef02ba329b
children 0aafeded7957
line wrap: on
line diff
--- a/tests/test-sparse.t	Sun Jan 14 13:29:15 2018 +0900
+++ b/tests/test-sparse.t	Thu Jan 18 13:33:21 2018 -0800
@@ -284,6 +284,27 @@
   $ hg status
   ? dir1/dir2/file
 
+Mix files and subdirectories, both "glob:" and unprefixed
+
+  $ hg debugsparse --reset
+  $ touch dir1/notshown
+  $ hg commit -A dir1/notshown -m "notshown"
+  $ hg debugsparse --include 'dir1/dir2'
+  $ $PYTHON $TESTDIR/list-tree.py . | grep -v ./.hg
+  ./
+  ./dir1/
+  ./dir1/dir2/
+  ./dir1/dir2/file
+  ./hide.orig
+  $ hg debugsparse --delete 'dir1/dir2'
+  $ hg debugsparse --include 'glob:dir1/dir2'
+  $ $PYTHON $TESTDIR/list-tree.py . | grep -v ./.hg
+  ./
+  ./dir1/
+  ./dir1/dir2/
+  ./dir1/dir2/file
+  ./hide.orig
+
 Test that add -s adds dirs to sparse profile
 
   $ hg debugsparse --reset