2019-12-10 02:24:31 +03:00
|
|
|
#chg-compatible
|
|
|
|
|
2019-05-20 16:11:59 +03:00
|
|
|
$ enable share
|
2017-04-13 14:58:11 +03:00
|
|
|
$ . "$TESTDIR/library.sh"
|
2018-01-10 21:44:15 +03:00
|
|
|
$ . "$TESTDIR/infinitepush/library.sh"
|
2017-04-13 14:58:11 +03:00
|
|
|
$ setupcommon
|
|
|
|
$ mkcommit() {
|
|
|
|
> echo "$1" > "$1"
|
|
|
|
> hg add "$1"
|
|
|
|
> hg ci -m "$1"
|
|
|
|
> }
|
|
|
|
$ hg init repo
|
|
|
|
$ cd repo
|
|
|
|
$ setupserver
|
|
|
|
$ cd ..
|
|
|
|
|
|
|
|
Clone client
|
|
|
|
$ hg clone ssh://user@dummy/repo client -q
|
|
|
|
$ hg share --bookmarks client client2
|
|
|
|
updating working directory
|
|
|
|
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
|
|
|
|
$ cd client2
|
|
|
|
$ mkcommit first
|
|
|
|
$ hg paths
|
|
|
|
default = ssh://user@dummy/repo
|
2017-04-24 11:07:20 +03:00
|
|
|
|
|
|
|
Write smth to backup state file in the shared working copy to check that
|
|
|
|
it's not read by infinitepush backup client
|
2019-02-21 02:20:11 +03:00
|
|
|
$ mkdir .hg/infinitepushbackups
|
|
|
|
$ echo 'rubbish' > .hg/infinitepushbackups/infinitepushbackupstate_f6bce706
|
2019-05-20 16:11:59 +03:00
|
|
|
$ hg cloud backup
|
2018-06-05 14:24:26 +03:00
|
|
|
backing up stack rooted at b75a450e74d5
|
2020-02-28 04:51:13 +03:00
|
|
|
commitcloud: backed up 1 commit
|
2017-04-13 14:58:11 +03:00
|
|
|
remote: pushing 1 commit:
|
|
|
|
remote: b75a450e74d5 first
|
|
|
|
$ scratchbookmarks
|
|
|
|
infinitepush/backups/test/*$TESTTMP/client/heads/b75a450e74d5a7708da8c3144fbeb4ac88694044 b75a450e74d5a7708da8c3144fbeb4ac88694044 (glob)
|
|
|
|
|
|
|
|
Make sure that backup state is saved only on the "main" repo
|
2019-02-21 02:20:11 +03:00
|
|
|
$ cat .hg/infinitepushbackups/infinitepushbackupstate_f6bce706
|
2017-04-24 11:07:20 +03:00
|
|
|
rubbish
|
2019-02-21 02:20:11 +03:00
|
|
|
$ [ -f ../client/.hg/infinitepushbackups/infinitepushbackupstate_f6bce706 ]
|
2017-10-13 16:59:27 +03:00
|
|
|
|
2019-05-20 16:11:59 +03:00
|
|
|
Make sure that cloud check references the main repo
|
|
|
|
$ hg cloud check -r :
|
2017-10-13 16:59:27 +03:00
|
|
|
b75a450e74d5a7708da8c3144fbeb4ac88694044 backed up
|
2020-10-08 06:58:22 +03:00
|
|
|
$ hg log -T '{node} "{desc}"\n' -r 'notbackedup()'
|
2017-10-13 16:59:27 +03:00
|
|
|
|
|
|
|
Make another commit that is not backed up and check that too
|
|
|
|
$ mkcommit second
|
2019-05-20 16:11:59 +03:00
|
|
|
$ hg cloud check -r :
|
2017-10-13 16:59:27 +03:00
|
|
|
b75a450e74d5a7708da8c3144fbeb4ac88694044 backed up
|
|
|
|
bc64f6a267a06b03e9e0f96a6deae37ae89a832e not backed up
|
2020-10-08 06:58:22 +03:00
|
|
|
$ hg log -T '{node} "{desc}"\n' -r 'notbackedup()'
|
|
|
|
bc64f6a267a06b03e9e0f96a6deae37ae89a832e "second"
|
2017-10-13 16:59:27 +03:00
|
|
|
|