##// END OF EJS Templates
run-tests: include quotes in the HGEDITOR value when storing sys.executable...
run-tests: include quotes in the HGEDITOR value when storing sys.executable This fixes test-install.t on Windows that broke in 2122b82b6987 when shlex.split() was added to the debuginstall command: @@ -7,8 +7,11 @@ checking installed modules (*mercurial)... (glob) checking templates (*mercurial?templates)... (glob) checking commit editor... + Can't find editor 'c:\Python27\python.exe -c "(omitted)"' in PATH + (specify a commit editor in your configuration file) checking username... - no problems detected + 1 problems detected, please check your install! + [1] What happens is that shlex.split() on Windows turns this: c:\Python27\python.exe -c "import sys; sys.exit(0)" into this: ['c:Python27python.exe', '-c', 'import sys; sys.exit(0)'] While technically a regression, most programs on Windows live in some flavor of 'Program Files', and therefore the environment variable needs to contain quotes anyway to handle the space. This wasn't handled prior to the shlex() change, because it tested the whole environment variable to see if it was an executable, or split on the first space and tested again.

File last commit:

r22591:9fe33afc default
r23347:49cdf51c default
Show More
test-locate.t
141 lines | 1.7 KiB | text/troff | Tads3Lexer
$ hg init repo
$ cd repo
$ echo 0 > a
$ echo 0 > b
$ echo 0 > t.h
$ mkdir t
$ echo 0 > t/x
$ echo 0 > t/b
$ echo 0 > t/e.h
$ mkdir dir.h
$ echo 0 > dir.h/foo
$ hg ci -A -m m
adding a
adding b
adding dir.h/foo
adding t.h
adding t/b
adding t/e.h
adding t/x
$ touch nottracked
$ hg locate a
a
$ hg locate NONEXISTENT
[1]
$ hg locate
a
b
dir.h/foo
t.h
t/b
t/e.h
t/x
$ hg rm a
$ hg ci -m m
$ hg locate a
[1]
$ hg locate NONEXISTENT
[1]
$ hg locate relpath:NONEXISTENT
[1]
$ hg locate
b
dir.h/foo
t.h
t/b
t/e.h
t/x
$ hg locate -r 0 a
a
$ hg locate -r 0 NONEXISTENT
[1]
$ hg locate -r 0 relpath:NONEXISTENT
[1]
$ hg locate -r 0
a
b
dir.h/foo
t.h
t/b
t/e.h
t/x
-I/-X with relative path should work:
$ cd t
$ hg locate
b
dir.h/foo
t.h
t/b
t/e.h
t/x
$ hg locate -I ../t
t/b
t/e.h
t/x
Issue294: hg remove --after dir fails when dir.* also exists
$ cd ..
$ rm -r t
$ hg rm t/b
$ hg locate 't/**'
t/b (glob)
t/e.h (glob)
t/x (glob)
$ hg files
b
dir.h/foo
t.h
t/e.h
t/x
$ hg files b
b
$ mkdir otherdir
$ cd otherdir
$ hg locate b
../b (glob)
../t/b (glob)
$ hg locate '*.h'
../t.h (glob)
../t/e.h (glob)
$ hg locate path:t/x
../t/x (glob)
$ hg locate 're:.*\.h$'
../t.h (glob)
../t/e.h (glob)
$ hg locate -r 0 b
../b (glob)
../t/b (glob)
$ hg locate -r 0 '*.h'
../t.h (glob)
../t/e.h (glob)
$ hg locate -r 0 path:t/x
../t/x (glob)
$ hg locate -r 0 're:.*\.h$'
../t.h (glob)
../t/e.h (glob)
$ hg files
../b
../dir.h/foo
../t.h
../t/e.h
../t/x
$ hg files .
[1]
$ cd ../..