sapling/eden/scm/tests/test-crdump-commitcloud.t
Jun Wu ae81c8fd34 edenapi: force use edenapi if ui.ssh is false
Summary: If ui.ssh is "false", then ssh cannot be used at all. Force using edenapi.

Reviewed By: kulshrax

Differential Revision: D27957312

fbshipit-source-id: 9860344779e6a6bab557d3f953ee38e40fadb78b
2021-05-04 18:28:45 -07:00

37 lines
1.1 KiB
Perl

#chg-compatible
$ . "$TESTDIR/library.sh"
$ . "$TESTDIR/infinitepush/library.sh"
$ setupcommon
$ enable crdump remotenames
$ setconfig crdump.commitcloud=true
Setup server
$ hg init repo
$ cd repo
$ setupserver
$ cd ../
$ hg clone ssh://user@dummy/repo client -q
$ cd client
$ echo a >> a
$ hg commit -Aqm "added a" --config infinitepushbackup.autobackup=False
commit_cloud should be false when commitcloud is broken
$ setconfig treemanifest.http=0
$ hg debugcrdump -r . --config paths.default=xxxxx | grep commit_cloud
"commit_cloud": false,
debugcrdump should upload the commit and commit_cloud should be true when
commitcloud is working
$ hg debugcrdump -r . | grep commit_cloud
remote: pushing 1 commit:
remote: 9092f1db7931 added a
"commit_cloud": true,
debugcrdump should not attempt to access the network if the commit was
previously backed up (as shown by the lack of error when given a faulty path)
$ hg debugcrdump -r . --config ui.ssh=true | grep commit_cloud
"commit_cloud": true,