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
75 lines
3.0 KiB
Perl
75 lines
3.0 KiB
Perl
#chg-compatible
|
|
|
|
test sparse
|
|
|
|
$ enable sparse
|
|
$ hg init myrepo
|
|
$ cd myrepo
|
|
|
|
$ echo a > show
|
|
$ echo x > hide
|
|
$ hg ci -Aqm 'initial'
|
|
|
|
$ echo b > show
|
|
$ echo y > hide
|
|
$ echo aa > show2
|
|
$ echo xx > hide2
|
|
$ hg ci -Aqm 'two'
|
|
|
|
Verify basic include
|
|
|
|
$ hg up -q 'desc(initial)'
|
|
$ hg sparse exclude 'hide'
|
|
$ hg sparse exclude 'show'
|
|
$ hg sparse show
|
|
Additional Excluded Paths:
|
|
|
|
hide
|
|
show
|
|
|
|
Verify that reset and include fails because it tries to include bad file
|
|
$ hg sparse reset --config sparse.unsafe_sparse_profile_marker_files="hide" --config sparse.unsafe_sparse_profile_message="msg"
|
|
abort: 'hide' file is included in sparse profile, it might not be safe because it may introduce a large amount of data into your repository
|
|
msg
|
|
(If you are know what you are doing re-run with allow-unsafe-profile-changes, otherwise contact Source control @ fb)
|
|
[255]
|
|
$ hg sparse --config sparse.unsafe_sparse_profile_marker_files="hide, show" include hide
|
|
abort: 'hide' file is included in sparse profile, it might not be safe because it may introduce a large amount of data into your repository
|
|
(If you are know what you are doing re-run with allow-unsafe-profile-changes, otherwise contact Source control @ fb)
|
|
[255]
|
|
$ hg sparse --config sparse.unsafe_sparse_profile_marker_files="hide, show" include show
|
|
abort: 'show' file is included in sparse profile, it might not be safe because it may introduce a large amount of data into your repository
|
|
(If you are know what you are doing re-run with allow-unsafe-profile-changes, otherwise contact Source control @ fb)
|
|
[255]
|
|
|
|
Including another file is fine
|
|
$ hg sparse --config sparse.unsafe_sparse_profile_marker_files="hide" include show
|
|
$ hg sparse show
|
|
Additional Included Paths:
|
|
|
|
show
|
|
|
|
Additional Excluded Paths:
|
|
|
|
hide
|
|
|
|
Now allow reset to go through
|
|
$ hg sparse reset --allow-unsafe-profile-changes --config sparse.unsafe_sparse_profile_marker_files="hide"
|
|
hint[sparse-unsafe-profile]: Your sparse profile might be incorrect, and it can lead to downloading too much data and slower mercurial operations.
|
|
hint[hint-ack]: use 'hg hint --ack sparse-unsafe-profile' to silence these hints
|
|
$ hg sparse show
|
|
$ ls
|
|
hide
|
|
show
|
|
|
|
Make sure we don't get any errors if sparse profile already includes marker file
|
|
$ hg sparse --config sparse.unsafe_sparse_profile_marker_files="hide" exclude show
|
|
hint[sparse-unsafe-profile]: Your sparse profile might be incorrect, and it can lead to downloading too much data and slower mercurial operations.
|
|
hint[hint-ack]: use 'hg hint --ack sparse-unsafe-profile' to silence these hints
|
|
$ ls
|
|
hide
|
|
$ hg st --config sparse.unsafe_sparse_profile_marker_files="hide" --config sparse.unsafe_sparse_profile_message="run 'hg sparse enable profile'"
|
|
hint[sparse-unsafe-profile]: Your sparse profile might be incorrect, and it can lead to downloading too much data and slower mercurial operations.
|
|
run 'hg sparse enable profile'
|
|
hint[hint-ack]: use 'hg hint --ack sparse-unsafe-profile' to silence these hints
|