mirror of
https://github.com/facebook/sapling.git
synced 2024-10-12 09:48:05 +03:00
65a9f2ac94
Summary: We want to migrate the tests to run using treemanifest. As part of that, we need remotefilelog reponame and cachepath to always be set. So let's set that for all tests now. Differential Revision: D15030250 fbshipit-source-id: 4147997ceebb1294deb322bdbef77b6caab18c44
57 lines
1.8 KiB
Perl
57 lines
1.8 KiB
Perl
$ . $TESTDIR/infinitepush/library.sh
|
|
$ enable amend directaccess commitcloud infinitepush infinitepushbackup share
|
|
$ setconfig ui.ssh="python \"$TESTDIR/dummyssh\""
|
|
$ setconfig commitcloud.hostname=testhost
|
|
$ setconfig remotefilelog.reponame=server
|
|
$ cat > $TESTTMP/.commitcloudrc <<EOF
|
|
> [commitcloud]
|
|
> user_token=xxxxx
|
|
> EOF
|
|
$ newrepo server
|
|
$ setconfig infinitepush.server=yes infinitepush.indextype=disk infinitepush.storetype=disk
|
|
$ setconfig infinitepush.reponame=testrepo
|
|
$ echo base > base
|
|
$ hg commit -Aqm base
|
|
$ cd $TESTTMP
|
|
$ hg clone ssh://user@dummy/server client1 -q
|
|
$ cd client1
|
|
$ setconfig commitcloud.servicetype=local commitcloud.servicelocation="$TESTTMP"
|
|
$ setconfig commitcloud.user_token_path="$TESTTMP"
|
|
|
|
Normally pushbackup doesn't connect to commit cloud sync
|
|
$ hg pushbackup --background
|
|
$ waitbgbackup
|
|
$ test -f .hg/store/commitcloudrc
|
|
[1]
|
|
|
|
Set autocloud join, now pushbackup does connect to commit cloud sync
|
|
$ setconfig commitcloud.autocloudjoin=true
|
|
$ hg pushbackup --background
|
|
$ waitbgbackup
|
|
$ cat .hg/store/commitcloudrc
|
|
[commitcloud]
|
|
current_workspace=user/test/default
|
|
|
|
Deliberately disconnect. Auto cloud join shouldn't make us reconect.
|
|
$ hg cloud leave
|
|
commitcloud: this repository is now disconnected from commit cloud
|
|
$ cat .hg/store/commitcloudrc
|
|
[commitcloud]
|
|
disconnected=true
|
|
$ hg pushbackup --background
|
|
$ waitbgbackup
|
|
$ cat .hg/store/commitcloudrc
|
|
[commitcloud]
|
|
disconnected=true
|
|
|
|
But we can manually reconnect
|
|
$ hg cloud join
|
|
commitcloud: this repository is now connected to the 'user/test/default' workspace for the 'server' repo
|
|
commitcloud: synchronizing 'server' with 'user/test/default'
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
$ cat .hg/store/commitcloudrc
|
|
[commitcloud]
|
|
current_workspace=user/test/default
|
|
|