mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +03:00
9bd3235f3f
Summary: The both options have basically the same value. This is my next step for resolving mismatches between CC dynamic config and the current configuration and generally improving CC configuration. Reviewed By: DurhamG Differential Revision: D25973556 fbshipit-source-id: aae21efcd5174ed58efcb9e5d8c85831d35777ea
138 lines
3.2 KiB
Perl
138 lines
3.2 KiB
Perl
#chg-compatible
|
|
|
|
$ disable treemanifest
|
|
$ . "$TESTDIR/library.sh"
|
|
$ . "$TESTDIR/infinitepush/library.sh"
|
|
$ setconfig extensions.commitcloud=
|
|
$ enable remotenames
|
|
|
|
$ mkcommit() {
|
|
> echo "$1" > "$1"
|
|
> hg commit -Aqm "$1"
|
|
> hg log -T"{node}\n" -r .
|
|
> }
|
|
|
|
$ setupcommon
|
|
|
|
$ hginit server
|
|
$ cd server
|
|
$ setupserver
|
|
$ cat >> .hg/hgrc <<EOF
|
|
> [remotefilelog]
|
|
> server=True
|
|
> EOF
|
|
|
|
$ mkcommit "base" > /dev/null
|
|
$ hg bookmark master
|
|
$ cd ..
|
|
|
|
$ hgcloneshallow ssh://user@dummy/server shallow -q
|
|
1 files fetched over 1 fetches - (1 misses, 0.00% hit ratio) over *.*s (glob) (?)
|
|
$ cd shallow
|
|
$ cat << EOF >> .hg/hgrc
|
|
> [extensions]
|
|
> amend=
|
|
> EOF
|
|
|
|
Test pushing of specific sets of commits
|
|
$ drawdag <<'EOS'
|
|
> B2 # B1/foo=commit b-2\n
|
|
> |
|
|
> B1 # B1/foo=commit b-1\n
|
|
> |
|
|
> | A3 # A3/foo=commit a-3\n
|
|
> | |
|
|
> | A2 # A2/foo=commit a-2\n
|
|
> | |
|
|
> | A1 # A1/foo=commit a-1\n
|
|
> |/
|
|
> .
|
|
> EOS
|
|
|
|
$ hg up $B2 -q
|
|
|
|
Check backing up top stack commit and mid commit
|
|
$ hg cloud check -r $A2+$B2
|
|
* not backed up (glob)
|
|
* not backed up (glob)
|
|
|
|
$ hg cloud backup $A1 $A2 $B2
|
|
backing up stack rooted at * (glob)
|
|
backing up stack rooted at * (glob)
|
|
commitcloud: backed up 4 commits
|
|
remote: pushing 2 commits:
|
|
remote: * A1 (glob)
|
|
remote: * A2 (glob)
|
|
remote: pushing 2 commits:
|
|
remote: * B1 (glob)
|
|
remote: * B2 (glob)
|
|
|
|
$ hg cloud check -r $A1+$A2+$A3+$B1+$B2
|
|
* backed up (glob)
|
|
* backed up (glob)
|
|
* not backed up (glob)
|
|
* backed up (glob)
|
|
* backed up (glob)
|
|
|
|
Check backing up new top commit
|
|
$ hg cloud backup $A3
|
|
backing up stack rooted at * (glob)
|
|
commitcloud: backed up 1 commit
|
|
remote: pushing 3 commits:
|
|
remote: * A1 (glob)
|
|
remote: * A2 (glob)
|
|
remote: * A3 (glob)
|
|
|
|
$ hg cloud backup $A2
|
|
nothing to back up
|
|
|
|
$ cd ..
|
|
|
|
Check that backup doesn't interfere with commit cloud
|
|
|
|
$ setconfig commitcloud.hostname=testhost
|
|
$ cat >> shared.rc << EOF
|
|
> [commitcloud]
|
|
> servicetype = local
|
|
> servicelocation = $TESTTMP
|
|
> token_enforced = False
|
|
> education_page = https://someurl.com/wiki/CommitCloud
|
|
> EOF
|
|
|
|
$ cd shallow
|
|
$ cat ../shared.rc >> .hg/hgrc
|
|
$ hg cloud join
|
|
commitcloud: this repository is now connected to the 'user/test/default' workspace for the 'master' repo
|
|
commitcloud: synchronizing 'master' with 'user/test/default'
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
|
|
$ hg up $B2
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
$ B3=$(mkcommit B3)
|
|
$ hg cloud backup $B3
|
|
backing up stack rooted at * (glob)
|
|
commitcloud: backed up 1 commit
|
|
remote: pushing 3 commits:
|
|
remote: * B1 (glob)
|
|
remote: * B2 (glob)
|
|
remote: * B3 (glob)
|
|
|
|
$ hg cloud sync
|
|
commitcloud: synchronizing 'master' with 'user/test/default'
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
|
|
$ mkcommit B4
|
|
7b520430ff426d7f4a6c305bef4a90507afe1b32
|
|
$ hg cloud sync
|
|
commitcloud: synchronizing 'master' with 'user/test/default'
|
|
backing up stack rooted at 458a3fc7650d
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
remote: pushing 4 commits:
|
|
remote: 458a3fc7650d B1
|
|
remote: ecd738f5fb6c B2
|
|
remote: 901656c16420 B3
|
|
remote: 7b520430ff42 B4
|