mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 08:47:12 +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
124 lines
2.6 KiB
Perl
124 lines
2.6 KiB
Perl
#chg-compatible
|
|
|
|
$ configure modern
|
|
$ setconfig 'infinitepush.branchpattern=re:(^hack/.*)'
|
|
$ newserver server
|
|
|
|
$ clone server client1
|
|
$ clone server client2
|
|
$ clone server client3
|
|
$ clone server client4
|
|
$ clone server client5
|
|
|
|
Push 3 branches to the server.
|
|
|
|
$ cd client1
|
|
|
|
$ drawdag << 'EOS'
|
|
> B C D
|
|
> \|/
|
|
> A H
|
|
> |/
|
|
> Z
|
|
> EOS
|
|
|
|
$ hg push -r $Z --to release --create -q
|
|
$ hg push -r $B --to master --create -q
|
|
$ hg push -r $C --to other --create -q
|
|
$ hg push -r $D --to another --create -q
|
|
$ hg push -r $H --to hack/foo --create -q
|
|
|
|
Fetch all remote names:
|
|
|
|
$ cd $TESTTMP/client2
|
|
$ hg pull -B other -B master -B another -B release -B hack/foo -q
|
|
|
|
Commit (draft) on "another":
|
|
|
|
$ drawdag << 'EOS'
|
|
> E
|
|
> |
|
|
> desc(D)
|
|
> EOS
|
|
|
|
Cleanup: another is kept because of draft E, master is kept because it is
|
|
selectivepull default:
|
|
|
|
$ hg debugcleanremotenames
|
|
removed 3 non-essential remote bookmarks: remote/hack/foo, remote/other, remote/release
|
|
|
|
$ hg log -T '{desc} {remotenames} {phase}' -Gr 'all()'
|
|
o E draft
|
|
│
|
|
o D remote/another public
|
|
│
|
|
│ o B remote/master public
|
|
├─╯
|
|
o A public
|
|
│
|
|
o Z public
|
|
|
|
'hide --cleanup' does the same thing:
|
|
|
|
$ cd $TESTTMP/client3
|
|
$ hg pull -B other -B master -B another -B release -q
|
|
$ enable amend
|
|
$ hg hide --cleanup
|
|
removed 3 non-essential remote bookmarks: remote/another, remote/other, remote/release
|
|
|
|
$ hg log -T '{desc} {remotenames} {phase}' -Gr 'all()'
|
|
o B remote/master public
|
|
│
|
|
o A public
|
|
│
|
|
o Z public
|
|
|
|
Auto cleanup triggered by remotenames.autocleanupthreshold:
|
|
|
|
$ cd $TESTTMP/client4
|
|
$ hg pull -B other -B master -B another -B release -q
|
|
$ hg log -T '{desc} {remotenames} {phase}' -Gr 'all()' --config remotenames.autocleanupthreshold=1
|
|
attempt to clean up remote bookmarks since they exceed threshold 1
|
|
removed 3 non-essential remote bookmarks: remote/another, remote/other, remote/release
|
|
o B remote/master public
|
|
│
|
|
o A public
|
|
│
|
|
o Z public
|
|
|
|
Resethead command to reset all heads (including draft heads):
|
|
|
|
$ cd $TESTTMP
|
|
$ cd client5
|
|
$ hg pull -B other -B master -B another -B release -q
|
|
$ drawdag << 'EOS'
|
|
> E
|
|
> |
|
|
> desc(D)
|
|
> EOS
|
|
|
|
$ hg log -T '{desc} {remotenames} {phase}' -Gr 'all()'
|
|
o E draft
|
|
│
|
|
o D remote/another public
|
|
│
|
|
│ o C remote/other public
|
|
├─╯
|
|
│ o B remote/master public
|
|
├─╯
|
|
o A public
|
|
│
|
|
o Z remote/release public
|
|
|
|
$ hg debugresetheads
|
|
|
|
Notice that only the "master" head is left:
|
|
|
|
$ hg log -T '{desc} {remotenames} {phase}' -Gr 'all()'
|
|
o B remote/master public
|
|
│
|
|
o A public
|
|
│
|
|
o Z public
|
|
|