2016-01-08 05:30:24 +03:00
|
|
|
$ extpath=`dirname $TESTDIR`
|
2015-12-17 18:36:58 +03:00
|
|
|
$ 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
|
2015-12-18 16:59:43 +03:00
|
|
|
$ hg histgrep ababagalamaga
|
2016-01-08 05:30:24 +03:00
|
|
|
abort: can't run histgrep on the whole repo, please provide filenames
|
|
|
|
(this is disabled to avoid very slow greps over the whole repo)
|
2015-12-18 16:59:43 +03:00
|
|
|
[255]
|
2016-02-11 14:39:59 +03:00
|
|
|
|
|
|
|
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
|
2015-12-17 18:36:58 +03:00
|
|
|
$ cd ..
|
2016-02-11 14:39:59 +03:00
|
|
|
|