tests/test-symlinks.t
changeset 51162 b0a6084f9cd6
parent 48681 e845537f6adb
child 51163 b8f9911c8dca
--- a/tests/test-symlinks.t	Tue Apr 11 21:56:16 2023 +0200
+++ b/tests/test-symlinks.t	Tue Nov 28 22:44:04 2023 -0800
@@ -188,6 +188,39 @@
 
   $ cd ..
 
+== symlinks and add with --include ==
+
+directory moved and symlinked
+
+  $ hg init add-include
+  $ cd add-include
+  $ mkdir foo
+  $ touch foo/a
+  $ hg ci -Ama
+  adding foo/a
+  $ hg mv foo bar
+  moving foo/a to bar/a
+  $ ln -s bar foo
+  $ hg status
+  A bar/a
+  R foo/a
+  ? foo
+
+can add with --include
+
+  $ hg add -I foo
+  adding foo
+  adding foo/a (known-bad-output !)
+  abort: file 'foo' in dirstate clashes with 'foo/a' (known-bad-output !)
+  [255]
+  $ hg status
+  A bar/a
+  A foo (missing-correct-output !)
+  R foo/a
+  ? foo (known-bad-output !)
+
+  $ cd ..
+
 == root of repository is symlinked ==
 
   $ hg init root