diff tests/test-nested-repo @ 5158:d316124ebbea

Make audit_path more stringent. The following properties of a path are now checked for: - under top-level .hg - starts at the root of a windows drive - contains ".." - traverses a symlink (e.g. a/symlink_here/b) - inside a nested repository If any of these is true, the path is rejected. The check for traversing a symlink is arguably stricter than necessary; perhaps we should be checking for symlinks that point outside the repository.
author Bryan O'Sullivan <bos@serpentine.com>
date Fri, 10 Aug 2007 10:46:03 -0700
parents 890e285c52a1
children c7e8fe11f34a
line wrap: on
line diff
--- a/tests/test-nested-repo	Thu Aug 09 20:16:00 2007 -0700
+++ b/tests/test-nested-repo	Fri Aug 10 10:46:03 2007 -0700
@@ -4,16 +4,21 @@
 cd a
 hg init b
 echo x > b/x
+
 echo '# should print nothing'
+hg add b
 hg st
-echo '# should print ? b/x'
+
+echo '# should fail'
 hg st b/x
-
 hg add b/x
 
-echo '# should print A b/x'
+echo '# should arguably print nothing'
+hg st b
+
+echo a > a
+hg ci -Ama a
+
+echo '# should fail'
+hg mv a b
 hg st
-echo '# should forget b/x'
-hg revert --all
-echo '# should print nothing'
-hg st b