sapling/tests/test-remotefilelog-treemanifest.t
Durham Goode f17ea5b392 treemanifest: add config to not clone tree revlogs during remotefilelog clone
Summary:
Previously a streaming clone would pick up the 00manifesttree.i file. This patch
adds a config to prevent that file (and other meta/ manifests) from being
transfered. The config defaults to False since Google is currently depending on
the previous behavior.

Test Plan: Add a test

Reviewers: #mercurial, quark

Reviewed By: quark

Subscribers: mjpieters

Differential Revision: https://phabricator.intern.facebook.com/D4915481

Signature: t1:4915481:1492641427:6c8a91da4c8c6e00e23f96a93807d3c426b50532
2017-04-19 21:14:04 -07:00

56 lines
1.4 KiB
Perl

$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
$ export PYTHONPATH
$ . "$TESTDIR/library.sh"
$ hginit master
$ cat >> $HGRCPATH <<EOF
> [extensions]
> treemanifest=$TESTDIR/../treemanifest
> EOF
$ cd master
$ cat >> .hg/hgrc <<EOF
> [extensions]
> [remotefilelog]
> server=True
> [treemanifest]
> server=True
> EOF
$ mkdir dir
$ echo x > dir/x
$ hg commit -qAm x1
$ hg backfilltree
$ cd ..
Clone with shallowtrees not set (False)
$ hgcloneshallow ssh://user@dummy/master shallow --noupdate --config extensions.fastmanifest=$TESTDIR/../fastmanifest
streaming all changes
3 files to transfer, 347 bytes of data
transferred 347 bytes in * seconds (*/sec) (glob)
searching for changes
no changes found
$ ls shallow/.hg/store/00*.i
shallow/.hg/store/00changelog.i
shallow/.hg/store/00manifest.i
shallow/.hg/store/00manifesttree.i
$ rm -rf shallow
Clone with shallowtrees=True
$ cat >> master/.hg/hgrc <<EOF
> [remotefilelog]
> shallowtrees=True
> EOF
$ hgcloneshallow ssh://user@dummy/master shallow --noupdate --config extensions.fastmanifest=$TESTDIR/../fastmanifest
streaming all changes
2 files to transfer, 236 bytes of data
transferred 236 bytes in * seconds (*/sec) (glob)
searching for changes
no changes found
$ ls shallow/.hg/store/00*.i
shallow/.hg/store/00changelog.i
shallow/.hg/store/00manifest.i