mirror of
https://github.com/facebook/sapling.git
synced 2024-10-11 09:17:30 +03:00
8674a90bb5
Summary: This patch just bumps the histpack version number to 1 and adds a config flag to enable writing v1 pack files. The format hasn't actually changed in this patch, I'm just doing the verison bump so I can update all the hashes in the tests without working about functionality change. In the next patch I will modify the index format, which won't affect the hashes. Test Plan: Ran the tests. I also ran the tests with some debug code to manually force the sha to include 0 instead of 1 and verified that the hash didn't change (which confirms that all of these hash changes are just because of that one byte version change). Reviewers: #mercurial, quark Reviewed By: quark Subscribers: mjpieters Differential Revision: https://phabricator.intern.facebook.com/D4983675 Signature: t1:4983675:1493692444:5d88df4d46ce487f1b791417754ba000ecf10a1e
77 lines
1.9 KiB
Perl
77 lines
1.9 KiB
Perl
$ CACHEDIR=`pwd`/hgcache
|
|
$ PYTHONPATH=$TESTDIR/..:$PYTHONPATH
|
|
$ export PYTHONPATH
|
|
|
|
$ . "$TESTDIR/library.sh"
|
|
|
|
$ hg init client1
|
|
$ cd client1
|
|
$ cat >> .hg/hgrc <<EOF
|
|
> [extensions]
|
|
> fastmanifest=
|
|
> treemanifest=
|
|
>
|
|
> [remotefilelog]
|
|
> reponame=master
|
|
> cachepath=$CACHEDIR
|
|
> usefastdatapack=True
|
|
>
|
|
> [fastmanifest]
|
|
> usetree=True
|
|
> usecache=False
|
|
> EOF
|
|
|
|
$ echo a > a
|
|
$ mkdir dir
|
|
$ echo b > dir/b
|
|
$ hg commit -Aqm 'initial commit'
|
|
|
|
$ hg init ../client2
|
|
$ cat >> ../client2/.hg/hgrc <<EOF
|
|
> [extensions]
|
|
> fastmanifest=
|
|
> treemanifest=
|
|
>
|
|
> [remotefilelog]
|
|
> reponame=master
|
|
> cachepath=$CACHEDIR
|
|
> usefastdatapack=True
|
|
>
|
|
> [fastmanifest]
|
|
> usetree=True
|
|
> usecache=False
|
|
> EOF
|
|
|
|
$ ls .hg/store/packs/manifests
|
|
15f45e8ca8affec27464278498594f94a3624815.histidx
|
|
15f45e8ca8affec27464278498594f94a3624815.histpack
|
|
fb1ee78215bfece34ca8e233fcf5e9fd69ec52bd.dataidx
|
|
fb1ee78215bfece34ca8e233fcf5e9fd69ec52bd.datapack
|
|
|
|
Pushing with treemanifest disabled does nothing
|
|
(disable demand import so treemanifest.py is forced to load)
|
|
$ HGDEMANDIMPORT=disable hg push -q ../client2 --config extensions.treemanifest=! --config fastmanifest.usetree=False
|
|
$ ls ../client2/.hg/store/packs/manifests || true
|
|
* No such file or directory (glob)
|
|
|
|
$ hg -R ../client2 strip -q -r tip
|
|
|
|
Pushing p2p with sendtrees=False does nothing
|
|
$ hg push -q ../client2
|
|
$ ls ../client2/.hg/store/packs/manifests || true
|
|
* No such file or directory (glob)
|
|
|
|
$ hg -R ../client2 strip -q -r tip
|
|
|
|
Pushing p2p puts the received packs in the local pack store
|
|
$ cat >> .hg/hgrc <<EOF
|
|
> [treemanifest]
|
|
> sendtrees=True
|
|
> EOF
|
|
$ hg push -q ../client2
|
|
$ ls ../client2/.hg/store/packs/manifests
|
|
15f45e8ca8affec27464278498594f94a3624815.histidx
|
|
15f45e8ca8affec27464278498594f94a3624815.histpack
|
|
fb1ee78215bfece34ca8e233fcf5e9fd69ec52bd.dataidx
|
|
fb1ee78215bfece34ca8e233fcf5e9fd69ec52bd.datapack
|