Skip to content
Snippets Groups Projects
Commit c739227b5eea authored by Adrian Buehlmann's avatar Adrian Buehlmann
Browse files

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.
parent 928ee57e3aae
No related branches found
No related tags found
No related merge requests found
$ "$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))'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment