mirror of
https://github.com/facebook/sapling.git
synced 2024-10-09 16:31:02 +03:00
b24461e881
Differential Revision: https://phabricator.fb.com/D2921878
34 lines
1.1 KiB
Perl
34 lines
1.1 KiB
Perl
$ extpath=`dirname $TESTDIR`
|
|
$ cp $extpath/tweakdefaults.py $TESTTMP # use $TESTTMP substitution in message
|
|
$ cat >> $HGRCPATH << EOF
|
|
> [extensions]
|
|
> tweakdefaults=$TESTTMP/tweakdefaults.py
|
|
> rebase=
|
|
> EOF
|
|
|
|
Test histgrep and check that it respects the specified file
|
|
$ hg init repo
|
|
$ cd repo
|
|
$ mkdir histgrepdir
|
|
$ cd histgrepdir
|
|
$ echo 'ababagalamaga' > histgrepfile1
|
|
$ echo 'ababagalamaga' > histgrepfile2
|
|
$ hg add histgrepfile1
|
|
$ hg add histgrepfile2
|
|
$ hg commit -m "Added some files"
|
|
$ hg histgrep ababagalamaga histgrepfile1
|
|
histgrepdir/histgrepfile1:0:ababagalamaga
|
|
$ hg histgrep ababagalamaga
|
|
abort: can't run histgrep on the whole repo, please provide filenames
|
|
(this is disabled to avoid very slow greps over the whole repo)
|
|
[255]
|
|
|
|
Check that histgrep can be explicitly allowed to search over the whole repo
|
|
$ echo "[tweakdefaults]" >> $HGRCPATH
|
|
$ echo "allowfullrepohistgrep=on" >> $HGRCPATH
|
|
$ hg histgrep ababagalamaga
|
|
histgrepdir/histgrepfile1:0:ababagalamaga
|
|
histgrepdir/histgrepfile2:0:ababagalamaga
|
|
$ cd ..
|
|
|