Patchwork D5368: tests: show bad path auditing in in-memory rebase

login
register
mail settings
Submitter phabricator
Date Dec. 4, 2018, 10:20 p.m.
Message ID <8fa15a02e42fb4c4856b02b739dbaa44@localhost.localdomain>
Download mbox | patch
Permalink /patch/36966/
State Not Applicable
Headers show

Comments

phabricator - Dec. 4, 2018, 10:20 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHGd10b1dc13431: tests: show bad path auditing in in-memory rebase (authored by martinvonz, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5368?vs=12698&id=12703

REVISION DETAIL
  https://phab.mercurial-scm.org/D5368

AFFECTED FILES
  tests/test-rebase-inmemory.t

CHANGE DETAILS




To: martinvonz, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/tests/test-rebase-inmemory.t b/tests/test-rebase-inmemory.t
--- a/tests/test-rebase-inmemory.t
+++ b/tests/test-rebase-inmemory.t
@@ -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