mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 00:45:18 +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
169 lines
5.0 KiB
Perl
169 lines
5.0 KiB
Perl
#chg-compatible
|
|
|
|
$ enable amend commitcloud infinitepush rebase remotenames treemanifest pullcreatemarkers
|
|
$ configure dummyssh
|
|
$ setconfig commitcloud.hostname=testhost
|
|
$ setconfig remotefilelog.reponame=server
|
|
|
|
$ hg init server
|
|
$ cd server
|
|
$ setconfig infinitepush.server=yes infinitepush.reponame=testrepo
|
|
$ setconfig infinitepush.indextype=disk infinitepush.storetype=disk
|
|
$ setconfig treemanifest.server=True
|
|
$ touch base
|
|
$ hg commit -Aqm base
|
|
$ hg bookmark master
|
|
$ hg debugmakepublic .
|
|
$ cd ..
|
|
|
|
$ hg clone ssh://user@dummy/server client1 -q
|
|
$ cd client1
|
|
$ setconfig commitcloud.servicetype=local commitcloud.servicelocation=$TESTTMP commitcloud.token_enforced=False
|
|
$ hg cloud join
|
|
commitcloud: this repository is now connected to the 'user/test/default' workspace for the 'server' repo
|
|
commitcloud: synchronizing 'server' with 'user/test/default'
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
$ echo data > file
|
|
$ hg commit -Aqm "draft-commit
|
|
> Differential Revision: https://phabricator.fb.com/D1234"
|
|
$ hg book foo
|
|
$ hg prev -q
|
|
[df4f53] base
|
|
$ hg cloud sync -q
|
|
$ cd ..
|
|
|
|
$ hg clone ssh://user@dummy/server client2 -q
|
|
$ cd client2
|
|
$ setconfig commitcloud.servicetype=local commitcloud.servicelocation=$TESTTMP commitcloud.token_enforced=False
|
|
$ hg cloud join
|
|
commitcloud: this repository is now connected to the 'user/test/default' workspace for the 'server' repo
|
|
commitcloud: synchronizing 'server' with 'user/test/default'
|
|
pulling 00422fad0026 from ssh://user@dummy/server
|
|
searching for changes
|
|
adding changesets
|
|
adding manifests
|
|
adding file changes
|
|
added 1 changesets with 1 changes to 1 files
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
$ tglogp
|
|
o 00422fad0026 draft 'draft-commit
|
|
│ Differential Revision: https://phabricator.fb.com/D1234' foo
|
|
@ df4f53cec30a public 'base'
|
|
|
|
$ cd ..
|
|
|
|
Fake land the commit
|
|
$ cd server
|
|
$ echo 1 > serverfile
|
|
$ hg commit -Aqm public-commit-1
|
|
$ echo data > file
|
|
$ hg commit -Aqm "landed-commit
|
|
> Differential Revision: https://phabricator.fb.com/D1234"
|
|
$ echo 2 > serverfile
|
|
$ hg commit -Aqm public-commit-2
|
|
$ hg debugmakepublic .
|
|
$ cd ..
|
|
|
|
$ cd client1
|
|
$ hg pull
|
|
pulling from ssh://user@dummy/server
|
|
searching for changes
|
|
adding changesets
|
|
adding manifests
|
|
adding file changes
|
|
added 3 changesets with 2 changes to 2 files
|
|
$ tglogp
|
|
o 67d363c9001e public 'public-commit-2'
|
|
│
|
|
o 441f69264760 public 'landed-commit
|
|
│ Differential Revision: https://phabricator.fb.com/D1234'
|
|
o 031d760782fb public 'public-commit-1'
|
|
│
|
|
│ x 00422fad0026 draft 'draft-commit
|
|
├─╯ Differential Revision: https://phabricator.fb.com/D1234' foo
|
|
@ df4f53cec30a public 'base'
|
|
|
|
$ hg cloud sync -q
|
|
$ cd ../client2
|
|
$ hg cloud sync -q
|
|
$ tglogp
|
|
o 00422fad0026 draft 'draft-commit
|
|
│ Differential Revision: https://phabricator.fb.com/D1234' foo
|
|
@ df4f53cec30a public 'base'
|
|
|
|
|
|
Rebasing the bookmark will make the draft commit disappear.
|
|
|
|
$ cd ../client1
|
|
$ hg rebase -b foo -d 67d363c9001e1d7227625f0fa5004aca4572d214
|
|
note: not rebasing 00422fad0026 "draft-commit" (foo), already in destination as 441f69264760 "landed-commit"
|
|
$ tglogp
|
|
o 67d363c9001e public 'public-commit-2' foo
|
|
│
|
|
o 441f69264760 public 'landed-commit
|
|
│ Differential Revision: https://phabricator.fb.com/D1234'
|
|
o 031d760782fb public 'public-commit-1'
|
|
│
|
|
@ df4f53cec30a public 'base'
|
|
|
|
$ hg cloud sync
|
|
commitcloud: synchronizing 'server' with 'user/test/default'
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
$ tglogp
|
|
o 67d363c9001e public 'public-commit-2' foo
|
|
│
|
|
o 441f69264760 public 'landed-commit
|
|
│ Differential Revision: https://phabricator.fb.com/D1234'
|
|
o 031d760782fb public 'public-commit-1'
|
|
│
|
|
@ df4f53cec30a public 'base'
|
|
|
|
Sync in client2. This will omit the bookmark because we don't have the landed commit.
|
|
|
|
$ cd ../client2
|
|
$ hg cloud sync -q
|
|
67d363c9001e1d7227625f0fa5004aca4572d214 not found, omitting foo bookmark
|
|
$ tglogp
|
|
@ df4f53cec30a public 'base'
|
|
|
|
Pull so that we have the public commit and sync again.
|
|
|
|
$ hg pull
|
|
pulling from ssh://user@dummy/server
|
|
searching for changes
|
|
adding changesets
|
|
adding manifests
|
|
adding file changes
|
|
added 3 changesets with 2 changes to 2 files
|
|
$ hg cloud sync
|
|
commitcloud: synchronizing 'server' with 'user/test/default'
|
|
commitcloud: commits synchronized
|
|
finished in * (glob)
|
|
|
|
The draft commit is also gone from here, and the workspace is stable.
|
|
|
|
$ tglogp
|
|
o 67d363c9001e public 'public-commit-2' foo
|
|
│
|
|
o 441f69264760 public 'landed-commit
|
|
│ Differential Revision: https://phabricator.fb.com/D1234'
|
|
o 031d760782fb public 'public-commit-1'
|
|
│
|
|
@ df4f53cec30a public 'base'
|
|
|
|
|
|
$ cd ../client1
|
|
$ hg cloud sync -q
|
|
$ tglogp
|
|
o 67d363c9001e public 'public-commit-2' foo
|
|
│
|
|
o 441f69264760 public 'landed-commit
|
|
│ Differential Revision: https://phabricator.fb.com/D1234'
|
|
o 031d760782fb public 'public-commit-1'
|
|
│
|
|
@ df4f53cec30a public 'base'
|
|
|