summaryrefslogtreecommitdiff
path: root/tests/test-nested-repo.t
diff options
context:
space:
mode:
Diffstat (limited to 'tests/test-nested-repo.t')
-rw-r--r--tests/test-nested-repo.t41
1 files changed, 41 insertions, 0 deletions
diff --git a/tests/test-nested-repo.t b/tests/test-nested-repo.t
new file mode 100644
index 0000000..ddea413
--- /dev/null
+++ b/tests/test-nested-repo.t
@@ -0,0 +1,41 @@
+ $ hg init a
+ $ cd a
+ $ hg init b
+ $ echo x > b/x
+
+Should print nothing:
+
+ $ hg add b
+ $ hg st
+
+Should fail:
+
+ $ hg st b/x
+ abort: path 'b/x' is inside nested repo 'b' (glob)
+ [255]
+ $ hg add b/x
+ abort: path 'b/x' is inside nested repo 'b' (glob)
+ [255]
+
+Should fail:
+
+ $ hg add b b/x
+ abort: path 'b/x' is inside nested repo 'b' (glob)
+ [255]
+ $ hg st
+
+Should arguably print nothing:
+
+ $ hg st b
+
+ $ echo a > a
+ $ hg ci -Ama a
+
+Should fail:
+
+ $ hg mv a b
+ abort: path 'b/a' is inside nested repo 'b' (glob)
+ [255]
+ $ hg st
+
+ $ cd ..