changeset 16851:c739227b5eea

test-revset: enable for Windows In MSYS, the test fails like this if the hghave exit at the beginning is removed: --- C:\Users\adi\hgrepos\hg-main\tests\test-revset.t +++ C:\Users\adi\hgrepos\hg-main\tests\test-revset.t.err @@ -58,7 +58,7 @@ $ hg co 3 2 files updated, 0 files merged, 0 files removed, 0 files unresolved $ hg branch /a/b/c/ - marked working directory as branch /a/b/c/ + marked working directory as branch a:/b/c/ (branches are permanent and global, did you want a bookmark?) $ hg ci -Aqm"5 bug" @@ -252,7 +252,7 @@ 2 a-b-c- 3 +a+b+c+ 4 -a-b-c- - 5 /a/b/c/ + 5 a:/b/c/ 6 _a_b_c_ 7 .a.b.c. $ log 'children(ancestor(4,5))' due to the posix path conversion done by MSYS globally, as explained here http://www.mingw.org/wiki/Posix_path_conversion The solution is a bit lame, but it is simple and works: don't use strings that look like '/a/b', in order not to trigger the path magic done by MSYS. So, if we can agree not to insist on testing branch names starting with '/', then this relatively simple patch makes the test pass both on Windows with MSYS and Linux.
author Adrian Buehlmann <adrian@cadifra.com>
date Sun, 03 Jun 2012 09:06:15 +0200
parents 928ee57e3aae
children af69b2b64d6e
files tests/test-revset.t
diffstat 1 files changed, 3 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-revset.t	Mon Jun 04 18:40:31 2012 +0200
+++ b/tests/test-revset.t	Sun Jun 03 09:06:15 2012 +0200
@@ -1,5 +1,3 @@
-  $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate /a/b/c/ as if it was a real file path
-
   $ HGENCODING=utf-8
   $ export HGENCODING
 
@@ -59,8 +57,8 @@
 
   $ hg co 3
   2 files updated, 0 files merged, 0 files removed, 0 files unresolved
-  $ hg branch /a/b/c/
-  marked working directory as branch /a/b/c/
+  $ hg branch !a/b/c/
+  marked working directory as branch !a/b/c/
   (branches are permanent and global, did you want a bookmark?)
   $ hg ci -Aqm"5 bug"
 
@@ -254,7 +252,7 @@
   2 a-b-c-
   3 +a+b+c+
   4 -a-b-c-
-  5 /a/b/c/
+  5 !a/b/c/
   6 _a_b_c_
   7 .a.b.c.
   $ log 'children(ancestor(4,5))'