changeset 40460:d10b1dc13431 stable

tests: show bad path auditing in in-memory rebase Thanks to Yuya for providing this test case in https://bz.mercurial-scm.org/show_bug.cgi?id=5818. Differential Revision: https://phab.mercurial-scm.org/D5368
author Martin von Zweigbergk <martinvonz@google.com>
date Tue, 04 Dec 2018 08:56:43 -0800
parents 9b1d5eea07f9
children 1c8c54cf9725
files tests/test-rebase-inmemory.t
diffstat 1 files changed, 26 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-rebase-inmemory.t	Tue Dec 04 08:55:48 2018 -0800
+++ b/tests/test-rebase-inmemory.t	Tue Dec 04 08:56:43 2018 -0800
@@ -257,6 +257,32 @@
 
   $ cd ..
 
+Test path auditing (issue5818)
+
+  $ mkdir lib_
+  $ ln -s lib_ lib
+  $ hg init repo
+  $ cd repo
+  $ mkdir -p ".$TESTTMP/lib"
+  $ touch ".$TESTTMP/lib/a"
+  $ hg add ".$TESTTMP/lib/a"
+  $ hg ci -m 'a'
+
+  $ touch ".$TESTTMP/lib/b"
+  $ hg add ".$TESTTMP/lib/b"
+  $ hg ci -m 'b'
+
+  $ hg up -q '.^'
+  $ touch ".$TESTTMP/lib/c"
+  $ hg add ".$TESTTMP/lib/c"
+  $ hg ci -m 'c'
+  created new head
+  $ hg rebase -s 1 -d .
+  rebasing 1:* "b" (glob)
+  abort: path '*/lib/b' traverses symbolic link '*/lib' (glob)
+  [255]
+  $ cd ..
+
 Test dry-run rebasing
 
   $ hg init repo3