##// END OF EJS Templates
hghave: allow adding customized features at runtime...
hghave: allow adding customized features at runtime Before this patch, there is no way to add customized features to `hghave` without changing `hghave` and `hghave.py` themselves. This decreases reusability of `run-tests.py` framework for third party tools, because they may want to examine custom features at runtime (e.g. existence of some external tools). To allow adding customized features at runtime, this patch makes `hghave` import `hghaveaddon` module, only when `hghaveaddon.py` file can be found in directories below: - `TESTDIR` for invocation via `run-tests.py` - `.` for invocation via command line The path to the directory where `hghaveaddon.py` should be placed is added to `sys.path` only while importing `hghaveaddon`, because: - `.` may not be added to `PYTHONPATH` - adding additional path to `sys.path` may change behavior of subsequent `import` for other features `hghave` is terminated with exit code '2' at failure of `import hghaveaddon`, because exit code '2' terminates `run-tests.py` immediately. This is a one of preparations for issue4677.

File last commit:

r25636:bfe9ed85 stable
r25732:b94df10c default
Show More
test-locate.t
154 lines | 1.9 KiB | text/troff | Tads3Lexer
Mads Kiilerich
tests: cleanup of tests that got lost in their own nested directories...
r16912 $ hg init repo
$ cd repo
Adrian Buehlmann
tests: unify test-locate
r12206 $ 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
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg locate a
Adrian Buehlmann
tests: unify test-locate
r12206 a
Matt Mackall
tests: cleanup exit code handling in unified tests
r12365 $ hg locate NONEXISTENT
[1]
Adrian Buehlmann
tests: unify test-locate
r12206
$ 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
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate NONEXISTENT
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate relpath:NONEXISTENT
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ 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
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 relpath:NONEXISTENT
Matt Mackall
tests: add exit codes to unified tests
r12316 [1]
Adrian Buehlmann
tests: unify test-locate
r12206 $ 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
Martin Geisler
tests: added a short description to issue numbers...
r12399 Issue294: hg remove --after dir fails when dir.* also exists
Adrian Buehlmann
tests: unify test-locate
r12206
$ cd ..
$ rm -r t
Siddharth Agarwal
files: actually filter out removed files...
r22591 $ hg rm t/b
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate 't/**'
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 t/b (glob)
t/e.h (glob)
t/x (glob)
Adrian Buehlmann
tests: unify test-locate
r12206
Matt Mackall
files: add new command unifying locate and manifest functionality
r22423 $ hg files
b
Matt Harbison
tests: fix globs for Windows...
r23348 dir.h/foo (glob)
Matt Mackall
files: add new command unifying locate and manifest functionality
r22423 t.h
Matt Harbison
tests: fix globs for Windows...
r23348 t/e.h (glob)
t/x (glob)
Matt Mackall
files: add new command unifying locate and manifest functionality
r22423 $ hg files b
b
Adrian Buehlmann
tests: unify test-locate
r12206 $ mkdir otherdir
$ cd otherdir
Matt Harbison
match: let 'path:.' and 'path:' match everything (issue4687)...
r25636 $ hg files path:
../b (glob)
../dir.h/foo (glob)
../t.h (glob)
../t/e.h (glob)
../t/x (glob)
$ hg files path:.
../b (glob)
../dir.h/foo (glob)
../t.h (glob)
../t/e.h (glob)
../t/x (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate b
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../b (glob)
../t/b (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate '*.h'
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../t.h (glob)
../t/e.h (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate path:t/x
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../t/x (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate 're:.*\.h$'
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../t.h (glob)
../t/e.h (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 b
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../b (glob)
../t/b (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 '*.h'
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../t.h (glob)
../t/e.h (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 path:t/x
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../t/x (glob)
Adrian Buehlmann
tests: unify test-locate
r12206 $ hg locate -r 0 're:.*\.h$'
Mads Kiilerich
tests: make (glob) on windows accept \ instead of /...
r15447 ../t.h (glob)
../t/e.h (glob)
Adrian Buehlmann
tests: unify test-locate
r12206
Matt Mackall
formatter: add pickle format...
r22430 $ hg files
Matt Harbison
tests: fix globs for Windows...
r23348 ../b (glob)
../dir.h/foo (glob)
../t.h (glob)
../t/e.h (glob)
../t/x (glob)
Matt Mackall
formatter: add pickle format...
r22430 $ hg files .
[1]
Mads Kiilerich
tests: cleanup of tests that got lost in their own nested directories...
r16912 $ cd ../..