mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
b489f6b1c8
Summary: Remove packfile-specific parts of tests and modify them to test without depending on packfiles where possible. Currently debugindexedlogdatastore and debugindexedloghistorystore appear to be broken, and debugdumpindexedlog just dumps the raw indexedlog contents, without any semantic information, so for the time being I've simply removed most packfile inspection. Reviewed By: DurhamG Differential Revision: D29099241 fbshipit-source-id: 86c4f9c83520374560587b8bec5c569d9c5c6510
72 lines
2.0 KiB
Perl
72 lines
2.0 KiB
Perl
#chg-compatible
|
|
|
|
$ . "$TESTDIR/library.sh"
|
|
|
|
$ cat >> $HGRCPATH <<EOF
|
|
> [extensions]
|
|
> pushrebase=
|
|
> remotenames=
|
|
> [treemanifest]
|
|
> sendtrees=True
|
|
> EOF
|
|
|
|
Setup the server
|
|
|
|
$ hginit master
|
|
$ cd master
|
|
$ cat >> .hg/hgrc <<EOF
|
|
> [treemanifest]
|
|
> server=True
|
|
> [remotefilelog]
|
|
> server=True
|
|
> shallowtrees=True
|
|
> EOF
|
|
|
|
Make local commits on the server
|
|
$ mkdir subdir
|
|
$ echo x > subdir/x
|
|
$ hg commit -qAm 'add subdir/x'
|
|
$ hg book master
|
|
|
|
The following will turn on sendtrees mode for a hybrid client and verify it
|
|
sends them during a push and during bundle operations.
|
|
|
|
Create flat manifest clients
|
|
$ cd ..
|
|
$ hgcloneshallow ssh://user@dummy/master client1 -q
|
|
fetching tree '' 85b359fdb09e9b8d7ac4a74551612b277345e8fd, found via 2278cc8c6ce6
|
|
2 trees fetched over * (glob)
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over * (glob) (?)
|
|
$ hgcloneshallow ssh://user@dummy/master client2 -q
|
|
|
|
Transition to hybrid flat+tree client
|
|
$ cat >> client1/.hg/hgrc <<EOF
|
|
> [extensions]
|
|
> amend=
|
|
> [treemanifest]
|
|
> demanddownload=True
|
|
> EOF
|
|
$ cat >> client2/.hg/hgrc <<EOF
|
|
> [extensions]
|
|
> amend=
|
|
> [treemanifest]
|
|
> demanddownload=True
|
|
> EOF
|
|
|
|
Make a draft commit
|
|
$ cd client1
|
|
$ echo f >> subdir/x
|
|
$ hg commit -qm "hybrid commit"
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
|
Test bundling/unbundling
|
|
$ hg bundle -r . --base '.^' ../treebundle.hg --debug 2>&1 | grep treegroup
|
|
bundle2-output-part: "b2x:treegroup2" (params: 3 mandatory) streamed payload
|
|
|
|
$ cd ../client2
|
|
$ hg unbundle ../treebundle.hg --debug 2>&1 | grep treegroup
|
|
bundle2-input-part: "b2x:treegroup2" (params: 3 mandatory) supported
|
|
TODO(meyer): Fix debugindexedlogdatastore and debugindexedloghistorystore and add back output here.
|
|
Test pushing
|
|
$ hg push -r tip --to master --debug 2>&1 2>&1 | grep rebasepackpart
|
|
bundle2-output-part: "b2x:rebasepackpart" (params: 3 mandatory) streamed payload
|