##// END OF EJS Templates
branching: merge stable into default
Raphaël Gomès -
r49370:a3210c17 merge default
parent child Browse files
Show More
@@ -0,0 +1,94 b''
1 Mercurial can be augmented with Rust extensions for speeding up certain
2 operations.
3
4 Compatibility
5 =============
6
7 Though the Rust extensions are only tested by the project under Linux, users of
8 MacOS, FreeBSD and other UNIX-likes have been using the Rust extensions. Your
9 mileage may vary, but by all means do give us feedback or signal your interest
10 for better support.
11
12 No Rust extensions are available for Windows at this time.
13
14 Features
15 ========
16
17 The following operations are sped up when using Rust:
18 - discovery of differences between repositories (pull/push)
19 - nodemap (see :hg:`help config.format.use-persistent-nodemap`)
20 - all commands using the dirstate (status, commit, diff, add, update, etc.)
21 - dirstate-v2 (see :hg:`help config.format.exp-rc-dirstate-v2`)
22 - iteration over ancestors in a graph
23
24 More features are in the works, and improvements on the above listed are still
25 in progress. For more experimental work see the "rhg" section.
26
27 Checking for Rust
28 =================
29
30 You may already have the Rust extensions depending on how you install Mercurial.
31
32 $ hg debuginstall | grep -i rust
33 checking Rust extensions (installed)
34 checking module policy (rust+c-allow)
35
36 If those lines don't even exist, you're using an old version of `hg` which does
37 not have any Rust extensions yet.
38
39 Installing
40 ==========
41
42 You will need `cargo` to be in your `$PATH`. See the "MSRV" section for which
43 version to use.
44
45 Using pip
46 ---------
47
48 Users of `pip` can install the Rust extensions with the following command:
49
50 $ pip install mercurial --global-option --rust --no-use-pep517
51
52 `--no-use-pep517` is here to tell `pip` to preserve backwards compatibility with
53 the legacy `setup.py` system. Mercurial has not yet migrated its complex setup
54 to the new system, so we still need this to add compiled extensions.
55
56 This might take a couple of minutes because you're compiling everything.
57
58 See the "Checking for Rust" section to see if the install succeeded.
59
60 From your distribution
61 ----------------------
62
63 Some distributions are shipping Mercurial with Rust extensions enabled and
64 pre-compiled (meaning you won't have to install `cargo`), or allow you to
65 specify an install flag. Check with your specific distribution for how to do
66 that, or ask their team to add support for hg+Rust!
67
68 From source
69 -----------
70
71 Please refer to the `rust/README.rst` file in the Mercurial repository for
72 instructions on how to install from source.
73
74 MSRV
75 ====
76
77 The minimum supported Rust version is currently 1.48.0. The project's policy is
78 to follow the version from Debian stable, to make the distributions' job easier.
79
80 rhg
81 ===
82
83 There exists an experimental pure-Rust version of Mercurial called `rhg` with a
84 fallback mechanism for unsupported invocations. It allows for much faster
85 execution of certain commands while adding no discernable overhead for the rest.
86
87 The only way of trying it out is by building it from source. Please refer to
88 `rust/README.rst` in the Mercurial repository.
89
90 Contributing
91 ============
92
93 If you would like to help the Rust endeavor, please refer to `rust/README.rst`
94 in the Mercurial repository.
@@ -220,3 +220,4 b' 750920b18aaaddd654756be40dec59d90f2643be'
220 220 6ee0244fc1cf889ae543d2ce0ec45201ae0be6e1 0 iQJJBAABCgAzFiEEgY2HzRrBgMOUyG5jOjPeRg2ew58FAmF4AWgVHDc4OTVwdWxraXRAZ21haWwuY29tAAoJEDoz3kYNnsOfxu8P/R8FftAoLkFGHnrzXA9Wa+ch+wunUNixCSimuXjG5sUtDSDlNT+xGj0deTVRVDylFd5HShR6a8NV+2P9edgJYDOKE70j4DJxHdeDyZ3l09YEBymrluE4FygXwpG0B3Ew9pUD85yFxa6UfIFWvNTGYi7XCHBl85buCkMACafN97802jXuE3JV53FvW6Fp917hM0saG48Cnp33WZxdUrZdxXU0Q8bZ9OBYCuGq8Wt2ZIqfEM6YXmvOzlkZf6oJb65rYOw2KgfLs/5nEGiDUNK2akuEhAZLi7uL0dt4WzYAbLyRhIpMpFPitk9P+Ges7iYINwSyZKZcsNPm0NiJupSjKqIYuuLte9HR59RkDFGgM9hbFnskElgHXMqLxi+RqjDVrj2efbuyWzDCn6eVZyn7vmxy9/oLM9vnVsvvdziN2uNUPL4CVmnOZciCdkEZQtWynyyEGzNyq7kPH593ct3tYMxpzs3wa3o+sSdph3lf7caXskij0d0woRZneuZFwp26Ha9tKMMRmXzgFvipzL+o2ANWV6X2udO0pXmKhzYJSBcUPlmVz8hyJaV2D3nmXeFHKVrPa/CqnSGNPWNQC39im1NyPK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bqSVNG99qEqsIW3HznGe/OpG/1QS3MVVSyi87oHR1UcN91vKIiln92i+7Ct7GttjkgkkqfQEw1oAELCmiHacYEBbLvQGaXdHROeO6wqXUKvI4KeM3CPt2qsouPiKBzSF1eOPd967NNvgTgcabT2ob0YaXmWdZasJnZ74H/3FMMC98WhYe3ja+6cpl67PZlNUWlnIZBlyL63DWSJ09us=
@@ -233,3 +233,4 b' 750920b18aaaddd654756be40dec59d90f2643be'
233 233 6ee0244fc1cf889ae543d2ce0ec45201ae0be6e1 5.9.3
234 234 a44bb185f6bdbecc754996d8386722e2f0123b0a 6.0rc0
235 235 5d08b289e2e526259d7d5ea32b70fe76d5b327d7 6.0
236 799fdf4cca80cb9ae40537a90995e6bd163ebc0b 6.0.1
@@ -484,6 +484,15 b' helptable = sorted('
484 484 TOPIC_CATEGORY_IDS,
485 485 ),
486 486 (
487 [
488 b'rust',
489 b'rustext',
490 ],
491 _(b'Rust in Mercurial'),
492 loaddoc(b'rust'),
493 TOPIC_CATEGORY_CONFIG,
494 ),
495 (
487 496 [b'filesets', b'fileset'],
488 497 _(b"Specifying File Sets"),
489 498 loaddoc(b'filesets'),
@@ -915,29 +915,60 b' https://www.mercurial-scm.org/wiki/Missi'
915 915
916 916 Enabled by default.
917 917
918 ``exp-rc-dirstate-v2``
919 Enable or disable the experimental "dirstate-v2" feature. The dirstate
920 functionality is shared by all commands interacting with the working copy.
921 The new version is more robust, faster and stores more information.
922
923 The performance-improving version of this feature is currently only
924 implemented in Rust (see :hg:`help rust`), so people not using a version of
925 Mercurial compiled with the Rust parts might actually suffer some slowdown.
926 For this reason, such versions will by default refuse to access repositories
927 with "dirstate-v2" enabled.
928
929 This behavior can be adjusted via configuration: check
930 :hg:`help config.storage.dirstate-v2.slow-path` for details.
931
932 Repositories with this on-disk format require Mercurial 6.0 or above.
933
934 By default this format variant is disabled if the fast implementation is not
935 available, and enabled by default if the fast implementation is available.
936
937 To accomodate installations of Mercurial without the fast implementation,
938 you can downgrade your repository. To do so run the following command:
939
940 $ hg debugupgraderepo \
941 --run \
942 --config format.exp-rc-dirstate-v2=False \
943 --config storage.dirstate-v2.slow-path=allow
944
945 For a more comprehensive guide, see :hg:`help internals.dirstate-v2`.
946
918 947 ``use-persistent-nodemap``
919 948 Enable or disable the "persistent-nodemap" feature which improves
920 performance if the rust extensions are available.
921
922 The "persistence-nodemap" persist the "node -> rev" on disk removing the
949 performance if the Rust extensions are available.
950
951 The "persistent-nodemap" persist the "node -> rev" on disk removing the
923 952 need to dynamically build that mapping for each Mercurial invocation. This
924 significantly reduce the startup cost of various local and server-side
925 operation for larger repository.
926
927 The performance improving version of this feature is currently only
928 implemented in Rust, so people not using a version of Mercurial compiled
929 with the Rust part might actually suffer some slowdown. For this reason,
930 Such version will by default refuse to access such repositories. That
931 behavior can be controlled by configuration. Check
953 significantly reduces the startup cost of various local and server-side
954 operation for larger repositories.
955
956 The performance-improving version of this feature is currently only
957 implemented in Rust (see :hg:`help rust`), so people not using a version of
958 Mercurial compiled with the Rust parts might actually suffer some slowdown.
959 For this reason, such versions will by default refuse to access repositories
960 with "persistent-nodemap".
961
962 This behavior can be adjusted via configuration: check
932 963 :hg:`help config.storage.revlog.persistent-nodemap.slow-path` for details.
933 964
934 Repository with this on-disk format require Mercurial version 5.4 or above.
935
936 By default this format variant is disabled if fast implementation is not
937 available and enabled by default if the fast implementation is available.
938
939 To accomodate install of Mercurial without the fast implementation you can
940 downgrade your repository. To do so run the following command:
965 Repositories with this on-disk format require Mercurial 5.4 or above.
966
967 By default this format variant is disabled if the fast implementation is not
968 available, and enabled by default if the fast implementation is available.
969
970 To accomodate installations of Mercurial without the fast implementation,
971 you can downgrade your repository. To do so run the following command:
941 972
942 973 $ hg debugupgraderepo \
943 974 --run \
@@ -6,15 +6,18 b' This directory contains various Rust cod'
6 6 Rust is not required to use (or build) Mercurial, but using it
7 7 improves performance in some areas.
8 8
9 There are currently three independent rust projects:
10 - chg. An implementation of chg, in rust instead of C.
11 - hgcli. A project that provide a (mostly) self-contained "hg" binary,
9 There are currently four independent Rust projects:
10 - chg. An implementation of chg, in Rust instead of C.
11 - hgcli. A project that provides a (mostly) self-contained "hg" binary,
12 12 for ease of deployment and a bit of speed, using PyOxidizer. See
13 13 hgcli/README.md.
14 14 - hg-core (and hg-cpython): implementation of some
15 functionality of mercurial in rust, e.g. ancestry computations in
15 functionality of mercurial in Rust, e.g. ancestry computations in
16 16 revision graphs, status or pull discovery. The top-level ``Cargo.toml`` file
17 17 defines a workspace containing these crates.
18 - rhg: a pure Rust implementation of Mercurial, with a fallback mechanism for
19 unsupported invocations. It reuses the logic `hg-core` but completely forgoes
20 interaction with Python. See `rust/rhg/README.md` for more details.
18 21
19 22 Using Rust code
20 23 ===============
@@ -414,6 +414,7 b' Testing -h/--help:'
414 414 hgweb Configuring hgweb
415 415 merge-tools Merge Tools
416 416 pager Pager Support
417 rust Rust in Mercurial
417 418
418 419 Concepts:
419 420
@@ -548,6 +549,7 b' Testing -h/--help:'
548 549 hgweb Configuring hgweb
549 550 merge-tools Merge Tools
550 551 pager Pager Support
552 rust Rust in Mercurial
551 553
552 554 Concepts:
553 555
@@ -113,6 +113,7 b' Test hiding some commands (which also ha'
113 113 hgweb Configuring hgweb
114 114 merge-tools Merge Tools
115 115 pager Pager Support
116 rust Rust in Mercurial
116 117
117 118 Concepts:
118 119
@@ -251,6 +252,7 b' Test hiding some topics.'
251 252 hgweb Configuring hgweb
252 253 merge-tools Merge Tools
253 254 pager Pager Support
255 rust Rust in Mercurial
254 256
255 257 Concepts:
256 258
@@ -165,6 +165,7 b' the extension is unknown.'
165 165 hgweb Configuring hgweb
166 166 merge-tools Merge Tools
167 167 pager Pager Support
168 rust Rust in Mercurial
168 169
169 170 Concepts:
170 171
@@ -295,6 +296,7 b' the extension is unknown.'
295 296 hgweb Configuring hgweb
296 297 merge-tools Merge Tools
297 298 pager Pager Support
299 rust Rust in Mercurial
298 300
299 301 Concepts:
300 302
@@ -1595,6 +1597,8 b' Separate sections from subsections'
1595 1597
1596 1598 "usefncache"
1597 1599
1600 "exp-rc-dirstate-v2"
1601
1598 1602 "use-persistent-nodemap"
1599 1603
1600 1604 "use-share-safe"
@@ -2425,6 +2429,13 b' Dish up an empty repo; serve it cold.'
2425 2429 Specifying Revisions
2426 2430 </td></tr>
2427 2431 <tr><td>
2432 <a href="/help/rust">
2433 rust
2434 </a>
2435 </td><td>
2436 Rust in Mercurial
2437 </td></tr>
2438 <tr><td>
2428 2439 <a href="/help/scripting">
2429 2440 scripting
2430 2441 </a>
@@ -2324,6 +2324,10 b' help/ shows help topics'
2324 2324 "topic": "revisions"
2325 2325 },
2326 2326 {
2327 "summary": "Rust in Mercurial",
2328 "topic": "rust"
2329 },
2330 {
2327 2331 "summary": "Using Mercurial from scripts and automation",
2328 2332 "topic": "scripting"
2329 2333 },
General Comments 0
You need to be logged in to leave comments. Login now