sapling/tests/test-fb-hgext-treemanifest-blame.t
Durham Goode ad813edcbd treemanifest: enable treemanifest by default in tests
Summary:
Now that all our repos are treemanifest, let's enable the extension by
default in tests. Once we're certain no one needs it in production we'll also
make it the default in core Mercurial.

This diff includes a minor fix in treemanifest to be aware of always-enabled
extensions. It won't matter until we actually add treemanifest to the list of
default enabled extensions, but I caught this while testing things.

Reviewed By: ikostia

Differential Revision: D15030253

fbshipit-source-id: d8361f915928b6ad90665e6ed330c1df5c8d8d86
2019-05-28 03:17:02 -07:00

70 lines
1.5 KiB
Raku

$ setconfig extensions.treemanifest=!
$ . "$TESTDIR/library.sh"
$ cat >> $HGRCPATH <<EOF
> [treemanifest]
> sendtrees=True
> [fastannotate]
> mainbranch=default
> modes=fctx
> EOF
$ setconfig treemanifest.treeonly=False
Setup the server
$ hginit master
$ cd master
$ cat >> .hg/hgrc <<EOF
> [extensions]
> fastannotate=
> treemanifest=
> [treemanifest]
> server=True
> [remotefilelog]
> server=True
> shallowtrees=True
> [fastannotate]
> server=True
> EOF
Make local commits on the server
$ mkdir subdir
$ echo x >> subdir/x
$ hg commit -qAm 'add subdir/x'
$ echo x >> subdir/x
$ hg commit -qAm 'modify subdir/x'
$ echo x >> subdir/x
$ hg commit -qAm 'modify subdir/x 2'
$ echo x >> subdir/x
$ hg commit -qAm 'modify subdir/x 3'
Run blame on client
$ cd ..
$ hgcloneshallow ssh://user@dummy/master client -q
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob)
$ cd client
$ cat >> .hg/hgrc <<EOF
> [extensions]
> fastannotate=
> fastmanifest=
> treemanifest=
> [fastmanifest]
> usecache=False
> usetree=True
> [treemanifest]
> demanddownload=True
> [fastannotate]
> clientfetchthreshold=2
> EOF
$ clearcache
$ hg prefetch -r 'tip^::tip'
4 trees fetched over * (glob)
2 files fetched over 1 fetches - (2 misses, 0.00% hit ratio) over * (glob)
- Verify no trees are downloaded
$ hg blame -r tip -u subdir/x --pager=off
test: x
test: x
test: x
test: x