test-locate.t
121 lines
| 1.5 KiB
| text/troff
|
Tads3Lexer
/ tests / test-locate.t
Mads Kiilerich
|
r16912 | $ hg init repo | ||
$ cd repo | ||||
Adrian Buehlmann
|
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
|
r12365 | $ hg locate a | ||
Adrian Buehlmann
|
r12206 | a | ||
Matt Mackall
|
r12365 | $ hg locate NONEXISTENT | ||
[1] | ||||
Adrian Buehlmann
|
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
|
r12316 | [1] | ||
Adrian Buehlmann
|
r12206 | $ hg locate NONEXISTENT | ||
Matt Mackall
|
r12316 | [1] | ||
Adrian Buehlmann
|
r12206 | $ hg locate relpath:NONEXISTENT | ||
Matt Mackall
|
r12316 | [1] | ||
Adrian Buehlmann
|
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
|
r12316 | [1] | ||
Adrian Buehlmann
|
r12206 | $ hg locate -r 0 relpath:NONEXISTENT | ||
Matt Mackall
|
r12316 | [1] | ||
Adrian Buehlmann
|
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
|
r12399 | Issue294: hg remove --after dir fails when dir.* also exists | ||
Adrian Buehlmann
|
r12206 | |||
$ cd .. | ||||
$ rm -r t | ||||
$ hg locate 't/**' | ||||
Mads Kiilerich
|
r15447 | t/b (glob) | ||
t/e.h (glob) | ||||
t/x (glob) | ||||
Adrian Buehlmann
|
r12206 | |||
$ mkdir otherdir | ||||
$ cd otherdir | ||||
$ hg locate b | ||||
Mads Kiilerich
|
r15447 | ../b (glob) | ||
../t/b (glob) | ||||
Adrian Buehlmann
|
r12206 | $ hg locate '*.h' | ||
Mads Kiilerich
|
r15447 | ../t.h (glob) | ||
../t/e.h (glob) | ||||
Adrian Buehlmann
|
r12206 | $ hg locate path:t/x | ||
Mads Kiilerich
|
r15447 | ../t/x (glob) | ||
Adrian Buehlmann
|
r12206 | $ hg locate 're:.*\.h$' | ||
Mads Kiilerich
|
r15447 | ../t.h (glob) | ||
../t/e.h (glob) | ||||
Adrian Buehlmann
|
r12206 | $ hg locate -r 0 b | ||
Mads Kiilerich
|
r15447 | ../b (glob) | ||
../t/b (glob) | ||||
Adrian Buehlmann
|
r12206 | $ hg locate -r 0 '*.h' | ||
Mads Kiilerich
|
r15447 | ../t.h (glob) | ||
../t/e.h (glob) | ||||
Adrian Buehlmann
|
r12206 | $ hg locate -r 0 path:t/x | ||
Mads Kiilerich
|
r15447 | ../t/x (glob) | ||
Adrian Buehlmann
|
r12206 | $ hg locate -r 0 're:.*\.h$' | ||
Mads Kiilerich
|
r15447 | ../t.h (glob) | ||
../t/e.h (glob) | ||||
Adrian Buehlmann
|
r12206 | |||
Mads Kiilerich
|
r16912 | $ cd ../.. | ||