comparison tests/test-revset.t @ 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 f3b8c82a559c
children ee2370d866fc
comparison
equal deleted inserted replaced
16849:928ee57e3aae 16851:c739227b5eea
1 $ "$TESTDIR/hghave" no-msys || exit 80 # MSYS will translate /a/b/c/ as if it was a real file path
2
3 $ HGENCODING=utf-8 1 $ HGENCODING=utf-8
4 $ export HGENCODING 2 $ export HGENCODING
5 3
6 $ try() { 4 $ try() {
7 > hg debugrevspec --debug "$@" 5 > hg debugrevspec --debug "$@"
57 (branches are permanent and global, did you want a bookmark?) 55 (branches are permanent and global, did you want a bookmark?)
58 $ hg ci -Aqm4 -d "May 12 2005" 56 $ hg ci -Aqm4 -d "May 12 2005"
59 57
60 $ hg co 3 58 $ hg co 3
61 2 files updated, 0 files merged, 0 files removed, 0 files unresolved 59 2 files updated, 0 files merged, 0 files removed, 0 files unresolved
62 $ hg branch /a/b/c/ 60 $ hg branch !a/b/c/
63 marked working directory as branch /a/b/c/ 61 marked working directory as branch !a/b/c/
64 (branches are permanent and global, did you want a bookmark?) 62 (branches are permanent and global, did you want a bookmark?)
65 $ hg ci -Aqm"5 bug" 63 $ hg ci -Aqm"5 bug"
66 64
67 $ hg merge 4 65 $ hg merge 4
68 1 files updated, 0 files merged, 1 files removed, 0 files unresolved 66 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
252 $ hg log -r 'branch("re:a")' --template '{rev} {branch}\n' 250 $ hg log -r 'branch("re:a")' --template '{rev} {branch}\n'
253 0 a 251 0 a
254 2 a-b-c- 252 2 a-b-c-
255 3 +a+b+c+ 253 3 +a+b+c+
256 4 -a-b-c- 254 4 -a-b-c-
257 5 /a/b/c/ 255 5 !a/b/c/
258 6 _a_b_c_ 256 6 _a_b_c_
259 7 .a.b.c. 257 7 .a.b.c.
260 $ log 'children(ancestor(4,5))' 258 $ log 'children(ancestor(4,5))'
261 2 259 2
262 3 260 3