mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +03:00
treemanifest: test syncing of trees created during push
Summary: treemanifest interacts with pushrebase to create trees during push, even if the client sends a flat manifest. This patch adds a test to verify that those trees are sent to sql and replicated. Test Plan: Added a test Reviewers: #mercurial, simonfar Reviewed By: simonfar Differential Revision: https://phabricator.intern.facebook.com/D4801107 Signature: t1:4801107:1490883109:6818cbc96038ac6e63e4e6dd3d619775c6d8c26c
This commit is contained in:
parent
3f1b2f3117
commit
5d5a071511
@ -3,6 +3,11 @@
|
||||
$ CACHEDIR=$PWD/hgcache
|
||||
$ . "$TESTDIR/library.sh"
|
||||
|
||||
$ cat >> $HGRCPATH <<EOF
|
||||
> [extensions]
|
||||
> bundle2hooks=
|
||||
> pushrebase=
|
||||
> EOF
|
||||
|
||||
Test that treemanifest backfill populates the database
|
||||
|
||||
@ -19,6 +24,7 @@ Test that treemanifest backfill populates the database
|
||||
$ touch a && hg ci -Aqm a
|
||||
$ mkdir dir
|
||||
$ touch dir/b && hg ci -Aqm b
|
||||
$ hg book master
|
||||
|
||||
$ cd ../master-alreadysynced
|
||||
$ cat >> .hg/hgrc <<EOF
|
||||
@ -48,3 +54,30 @@ Test that an empty repo syncs the tree revlogs
|
||||
1
|
||||
$ ls .hg/store/meta/dir
|
||||
00manifest.i
|
||||
|
||||
Test that trees created during push are synced to the db
|
||||
|
||||
$ cd ..
|
||||
$ initclient client
|
||||
$ cd client
|
||||
$ hg pull -q ssh://user@dummy/master
|
||||
$ hg up -q tip
|
||||
$ touch dir/c && hg ci -Aqm c
|
||||
|
||||
$ hg push ssh://user@dummy/master --to master
|
||||
pushing to ssh://user@dummy/master
|
||||
searching for changes
|
||||
remote: pushing 1 changset:
|
||||
remote: c46827e4453c c
|
||||
|
||||
$ cd ../master-new
|
||||
$ hg log -G -T '{rev} {desc}' --forcesync
|
||||
o 2 c
|
||||
|
|
||||
o 1 b
|
||||
|
|
||||
o 0 a
|
||||
|
||||
$ hg debugdata .hg/store/meta/dir/00manifest.i 1
|
||||
b\x00b80de5d138758541c5f05265ad144ab9fa86d1db (esc)
|
||||
c\x00b80de5d138758541c5f05265ad144ab9fa86d1db (esc)
|
||||
|
Loading…
Reference in New Issue
Block a user