sapling/tests/test-fb-hgext-tweakdefaults-histgrep.t
Kostia Balytskyi b27a46c987 fb-hgext: fix copied fb-hgext tests
Summary:
This is a big bulk of generally almost-obvious fixes to the moved tests. Mostly
these fixes have to do with correct importing of the actual extensions.

Depends on D6675329

Test Plan:
- ./run-tests.py fails less after this commit
- see further commits for more test fixes

Reviewers: #sourcecontrol

Differential Revision: https://phabricator.intern.facebook.com/D6675344
2018-01-09 03:06:09 -08:00

32 lines
942 B
Perl

$ cat >> $HGRCPATH << EOF
> [extensions]
> tweakdefaults=
> 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 ..