mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
98d9269874
Summary: Create a fork of the Mercurial code that we can use to build server rpms. The hg servers will continue to exist for a few more months while we move the darkstorm and ediscovery use cases off them. In the mean time, we want to start making breaking changes to the client, so let's create a stable copy of the hg code to produce rpms for the hg servers. The fork is based off c7770c78d, the latest hg release. This copies the files as is, then adds some minor tweaks to get it to build: - Disables some lint checks that appear to be bypassed by path - sed replace eden/scm with eden/hg-server - Removed a dependency on scm/telemetry from the edenfs-client tests since scm/telemetry pulls in the original eden/scm/lib/configparser which conflicts with the hg-server conflict parser. allow-large-files Reviewed By: quark-zju Differential Revision: D27632557 fbshipit-source-id: b2f442f4ec000ea08e4d62de068750832198e1f4
57 lines
1.8 KiB
Perl
57 lines
1.8 KiB
Perl
#chg-compatible
|
|
|
|
$ enable share
|
|
$ . "$TESTDIR/library.sh"
|
|
$ . "$TESTDIR/infinitepush/library.sh"
|
|
$ 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
|
|
|
|
Write smth to backup state file in the shared working copy to check that
|
|
it's not read by infinitepush backup client
|
|
$ mkdir .hg/infinitepushbackups
|
|
$ echo 'rubbish' > .hg/infinitepushbackups/infinitepushbackupstate_f6bce706
|
|
$ hg cloud backup
|
|
backing up stack rooted at b75a450e74d5
|
|
commitcloud: backed up 1 commit
|
|
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
|
|
$ cat .hg/infinitepushbackups/infinitepushbackupstate_f6bce706
|
|
rubbish
|
|
$ [ -f ../client/.hg/infinitepushbackups/infinitepushbackupstate_f6bce706 ]
|
|
|
|
Make sure that cloud check references the main repo
|
|
$ hg cloud check -r :
|
|
b75a450e74d5a7708da8c3144fbeb4ac88694044 backed up
|
|
$ hg log -T '{node} "{desc}"\n' -r 'notbackedup()'
|
|
|
|
Make another commit that is not backed up and check that too
|
|
$ mkcommit second
|
|
$ hg cloud check -r :
|
|
b75a450e74d5a7708da8c3144fbeb4ac88694044 backed up
|
|
bc64f6a267a06b03e9e0f96a6deae37ae89a832e not backed up
|
|
$ hg log -T '{node} "{desc}"\n' -r 'notbackedup()'
|
|
bc64f6a267a06b03e9e0f96a6deae37ae89a832e "second"
|
|
|