Mercurial > hg
view tests/test-locate.t @ 23003:62d19ce9d7b6
revset-_ancestor: use & instead of filter
The & operation is more likely optimised.
::10
before) wall 0.028189 comb 0.030000 user 0.030000 sys 0.000000 (best of 100)
after) wall 0.001050 comb 0.000000 user 0.000000 sys 0.000000 (best of 2326)
::tip
before) wall 0.081132 comb 0.080000 user 0.080000 sys 0.000000 (best of 100)
after) wall 0.055418 comb 0.050000 user 0.050000 sys 0.000000 (best of 100)
author | Pierre-Yves David <pierre-yves.david@fb.com> |
---|---|
date | Tue, 30 Sep 2014 15:03:54 -0500 |
parents | 9fe33afc00b4 |
children | bbe56e07e07a |
line wrap: on
line source
$ 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 ../..