sapling/eden/scm/tests/test-crdump-commitcloud.t
Adam Simpkins ab3a7cb21f Move fb-mercurial sources into an eden/scm subdirectory.
Summary:
In preparation for merging fb-mercurial sources to the Eden repository,
move everything from the top-level directory into an `eden/scm`
subdirectory.
2019-11-13 16:04:48 -08:00

39 lines
1.1 KiB
Perl

$ . "$TESTDIR/library.sh"
$ . "$TESTDIR/infinitepush/library.sh"
$ setupcommon
$ cat >> $HGRCPATH << EOF
> [extensions]
> crdump=
> remotenames=
> [crdump]
> commitcloud=True
> EOF
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
$ 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=false | grep commit_cloud
"commit_cloud": true,