##// END OF EJS Templates
rhg: read [paths] for `--repository` value...
Pulkit Goyal -
r48196:ebdef628 default
parent child Browse files
Show More
@@ -1,1083 +1,1084 b''
1 # This file is automatically @generated by Cargo.
1 # This file is automatically @generated by Cargo.
2 # It is not intended for manual editing.
2 # It is not intended for manual editing.
3 [[package]]
3 [[package]]
4 name = "adler"
4 name = "adler"
5 version = "0.2.3"
5 version = "0.2.3"
6 source = "registry+https://github.com/rust-lang/crates.io-index"
6 source = "registry+https://github.com/rust-lang/crates.io-index"
7 checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
7 checksum = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
8
8
9 [[package]]
9 [[package]]
10 name = "aho-corasick"
10 name = "aho-corasick"
11 version = "0.7.15"
11 version = "0.7.15"
12 source = "registry+https://github.com/rust-lang/crates.io-index"
12 source = "registry+https://github.com/rust-lang/crates.io-index"
13 checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
13 checksum = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
14 dependencies = [
14 dependencies = [
15 "memchr",
15 "memchr",
16 ]
16 ]
17
17
18 [[package]]
18 [[package]]
19 name = "ansi_term"
19 name = "ansi_term"
20 version = "0.11.0"
20 version = "0.11.0"
21 source = "registry+https://github.com/rust-lang/crates.io-index"
21 source = "registry+https://github.com/rust-lang/crates.io-index"
22 checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
22 checksum = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
23 dependencies = [
23 dependencies = [
24 "winapi",
24 "winapi",
25 ]
25 ]
26
26
27 [[package]]
27 [[package]]
28 name = "atty"
28 name = "atty"
29 version = "0.2.14"
29 version = "0.2.14"
30 source = "registry+https://github.com/rust-lang/crates.io-index"
30 source = "registry+https://github.com/rust-lang/crates.io-index"
31 checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
31 checksum = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
32 dependencies = [
32 dependencies = [
33 "hermit-abi",
33 "hermit-abi",
34 "libc",
34 "libc",
35 "winapi",
35 "winapi",
36 ]
36 ]
37
37
38 [[package]]
38 [[package]]
39 name = "autocfg"
39 name = "autocfg"
40 version = "1.0.1"
40 version = "1.0.1"
41 source = "registry+https://github.com/rust-lang/crates.io-index"
41 source = "registry+https://github.com/rust-lang/crates.io-index"
42 checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
42 checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
43
43
44 [[package]]
44 [[package]]
45 name = "bitflags"
45 name = "bitflags"
46 version = "1.2.1"
46 version = "1.2.1"
47 source = "registry+https://github.com/rust-lang/crates.io-index"
47 source = "registry+https://github.com/rust-lang/crates.io-index"
48 checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
48 checksum = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
49
49
50 [[package]]
50 [[package]]
51 name = "bitmaps"
51 name = "bitmaps"
52 version = "2.1.0"
52 version = "2.1.0"
53 source = "registry+https://github.com/rust-lang/crates.io-index"
53 source = "registry+https://github.com/rust-lang/crates.io-index"
54 checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2"
54 checksum = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2"
55 dependencies = [
55 dependencies = [
56 "typenum",
56 "typenum",
57 ]
57 ]
58
58
59 [[package]]
59 [[package]]
60 name = "block-buffer"
60 name = "block-buffer"
61 version = "0.9.0"
61 version = "0.9.0"
62 source = "registry+https://github.com/rust-lang/crates.io-index"
62 source = "registry+https://github.com/rust-lang/crates.io-index"
63 checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
63 checksum = "4152116fd6e9dadb291ae18fc1ec3575ed6d84c29642d97890f4b4a3417297e4"
64 dependencies = [
64 dependencies = [
65 "generic-array",
65 "generic-array",
66 ]
66 ]
67
67
68 [[package]]
68 [[package]]
69 name = "byteorder"
69 name = "byteorder"
70 version = "1.3.4"
70 version = "1.3.4"
71 source = "registry+https://github.com/rust-lang/crates.io-index"
71 source = "registry+https://github.com/rust-lang/crates.io-index"
72 checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
72 checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
73
73
74 [[package]]
74 [[package]]
75 name = "bytes-cast"
75 name = "bytes-cast"
76 version = "0.2.0"
76 version = "0.2.0"
77 source = "registry+https://github.com/rust-lang/crates.io-index"
77 source = "registry+https://github.com/rust-lang/crates.io-index"
78 checksum = "0d434f9a4ecbe987e7ccfda7274b6f82ea52c9b63742565a65cb5e8ba0f2c452"
78 checksum = "0d434f9a4ecbe987e7ccfda7274b6f82ea52c9b63742565a65cb5e8ba0f2c452"
79 dependencies = [
79 dependencies = [
80 "bytes-cast-derive",
80 "bytes-cast-derive",
81 ]
81 ]
82
82
83 [[package]]
83 [[package]]
84 name = "bytes-cast-derive"
84 name = "bytes-cast-derive"
85 version = "0.1.0"
85 version = "0.1.0"
86 source = "registry+https://github.com/rust-lang/crates.io-index"
86 source = "registry+https://github.com/rust-lang/crates.io-index"
87 checksum = "cb936af9de38476664d6b58e529aff30d482e4ce1c5e150293d00730b0d81fdb"
87 checksum = "cb936af9de38476664d6b58e529aff30d482e4ce1c5e150293d00730b0d81fdb"
88 dependencies = [
88 dependencies = [
89 "proc-macro2",
89 "proc-macro2",
90 "quote",
90 "quote",
91 "syn",
91 "syn",
92 ]
92 ]
93
93
94 [[package]]
94 [[package]]
95 name = "cc"
95 name = "cc"
96 version = "1.0.66"
96 version = "1.0.66"
97 source = "registry+https://github.com/rust-lang/crates.io-index"
97 source = "registry+https://github.com/rust-lang/crates.io-index"
98 checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
98 checksum = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
99 dependencies = [
99 dependencies = [
100 "jobserver",
100 "jobserver",
101 ]
101 ]
102
102
103 [[package]]
103 [[package]]
104 name = "cfg-if"
104 name = "cfg-if"
105 version = "0.1.10"
105 version = "0.1.10"
106 source = "registry+https://github.com/rust-lang/crates.io-index"
106 source = "registry+https://github.com/rust-lang/crates.io-index"
107 checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
107 checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
108
108
109 [[package]]
109 [[package]]
110 name = "cfg-if"
110 name = "cfg-if"
111 version = "1.0.0"
111 version = "1.0.0"
112 source = "registry+https://github.com/rust-lang/crates.io-index"
112 source = "registry+https://github.com/rust-lang/crates.io-index"
113 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
113 checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
114
114
115 [[package]]
115 [[package]]
116 name = "chrono"
116 name = "chrono"
117 version = "0.4.19"
117 version = "0.4.19"
118 source = "registry+https://github.com/rust-lang/crates.io-index"
118 source = "registry+https://github.com/rust-lang/crates.io-index"
119 checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
119 checksum = "670ad68c9088c2a963aaa298cb369688cf3f9465ce5e2d4ca10e6e0098a1ce73"
120 dependencies = [
120 dependencies = [
121 "libc",
121 "libc",
122 "num-integer",
122 "num-integer",
123 "num-traits",
123 "num-traits",
124 "time",
124 "time",
125 "winapi",
125 "winapi",
126 ]
126 ]
127
127
128 [[package]]
128 [[package]]
129 name = "clap"
129 name = "clap"
130 version = "2.33.3"
130 version = "2.33.3"
131 source = "registry+https://github.com/rust-lang/crates.io-index"
131 source = "registry+https://github.com/rust-lang/crates.io-index"
132 checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
132 checksum = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
133 dependencies = [
133 dependencies = [
134 "ansi_term",
134 "ansi_term",
135 "atty",
135 "atty",
136 "bitflags",
136 "bitflags",
137 "strsim",
137 "strsim",
138 "textwrap",
138 "textwrap",
139 "unicode-width",
139 "unicode-width",
140 "vec_map",
140 "vec_map",
141 ]
141 ]
142
142
143 [[package]]
143 [[package]]
144 name = "const_fn"
144 name = "const_fn"
145 version = "0.4.4"
145 version = "0.4.4"
146 source = "registry+https://github.com/rust-lang/crates.io-index"
146 source = "registry+https://github.com/rust-lang/crates.io-index"
147 checksum = "cd51eab21ab4fd6a3bf889e2d0958c0a6e3a61ad04260325e919e652a2a62826"
147 checksum = "cd51eab21ab4fd6a3bf889e2d0958c0a6e3a61ad04260325e919e652a2a62826"
148
148
149 [[package]]
149 [[package]]
150 name = "cpufeatures"
150 name = "cpufeatures"
151 version = "0.1.4"
151 version = "0.1.4"
152 source = "registry+https://github.com/rust-lang/crates.io-index"
152 source = "registry+https://github.com/rust-lang/crates.io-index"
153 checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8"
153 checksum = "ed00c67cb5d0a7d64a44f6ad2668db7e7530311dd53ea79bcd4fb022c64911c8"
154 dependencies = [
154 dependencies = [
155 "libc",
155 "libc",
156 ]
156 ]
157
157
158 [[package]]
158 [[package]]
159 name = "cpython"
159 name = "cpython"
160 version = "0.5.2"
160 version = "0.5.2"
161 source = "registry+https://github.com/rust-lang/crates.io-index"
161 source = "registry+https://github.com/rust-lang/crates.io-index"
162 checksum = "0f11357af68648b6a227e7e2384d439cec8595de65970f45e3f7f4b2600be472"
162 checksum = "0f11357af68648b6a227e7e2384d439cec8595de65970f45e3f7f4b2600be472"
163 dependencies = [
163 dependencies = [
164 "libc",
164 "libc",
165 "num-traits",
165 "num-traits",
166 "paste",
166 "paste",
167 "python27-sys",
167 "python27-sys",
168 "python3-sys",
168 "python3-sys",
169 ]
169 ]
170
170
171 [[package]]
171 [[package]]
172 name = "crc32fast"
172 name = "crc32fast"
173 version = "1.2.1"
173 version = "1.2.1"
174 source = "registry+https://github.com/rust-lang/crates.io-index"
174 source = "registry+https://github.com/rust-lang/crates.io-index"
175 checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
175 checksum = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
176 dependencies = [
176 dependencies = [
177 "cfg-if 1.0.0",
177 "cfg-if 1.0.0",
178 ]
178 ]
179
179
180 [[package]]
180 [[package]]
181 name = "crossbeam-channel"
181 name = "crossbeam-channel"
182 version = "0.4.4"
182 version = "0.4.4"
183 source = "registry+https://github.com/rust-lang/crates.io-index"
183 source = "registry+https://github.com/rust-lang/crates.io-index"
184 checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87"
184 checksum = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87"
185 dependencies = [
185 dependencies = [
186 "crossbeam-utils 0.7.2",
186 "crossbeam-utils 0.7.2",
187 "maybe-uninit",
187 "maybe-uninit",
188 ]
188 ]
189
189
190 [[package]]
190 [[package]]
191 name = "crossbeam-channel"
191 name = "crossbeam-channel"
192 version = "0.5.0"
192 version = "0.5.0"
193 source = "registry+https://github.com/rust-lang/crates.io-index"
193 source = "registry+https://github.com/rust-lang/crates.io-index"
194 checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775"
194 checksum = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775"
195 dependencies = [
195 dependencies = [
196 "cfg-if 1.0.0",
196 "cfg-if 1.0.0",
197 "crossbeam-utils 0.8.1",
197 "crossbeam-utils 0.8.1",
198 ]
198 ]
199
199
200 [[package]]
200 [[package]]
201 name = "crossbeam-deque"
201 name = "crossbeam-deque"
202 version = "0.8.0"
202 version = "0.8.0"
203 source = "registry+https://github.com/rust-lang/crates.io-index"
203 source = "registry+https://github.com/rust-lang/crates.io-index"
204 checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
204 checksum = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
205 dependencies = [
205 dependencies = [
206 "cfg-if 1.0.0",
206 "cfg-if 1.0.0",
207 "crossbeam-epoch",
207 "crossbeam-epoch",
208 "crossbeam-utils 0.8.1",
208 "crossbeam-utils 0.8.1",
209 ]
209 ]
210
210
211 [[package]]
211 [[package]]
212 name = "crossbeam-epoch"
212 name = "crossbeam-epoch"
213 version = "0.9.1"
213 version = "0.9.1"
214 source = "registry+https://github.com/rust-lang/crates.io-index"
214 source = "registry+https://github.com/rust-lang/crates.io-index"
215 checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d"
215 checksum = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d"
216 dependencies = [
216 dependencies = [
217 "cfg-if 1.0.0",
217 "cfg-if 1.0.0",
218 "const_fn",
218 "const_fn",
219 "crossbeam-utils 0.8.1",
219 "crossbeam-utils 0.8.1",
220 "lazy_static",
220 "lazy_static",
221 "memoffset",
221 "memoffset",
222 "scopeguard",
222 "scopeguard",
223 ]
223 ]
224
224
225 [[package]]
225 [[package]]
226 name = "crossbeam-utils"
226 name = "crossbeam-utils"
227 version = "0.7.2"
227 version = "0.7.2"
228 source = "registry+https://github.com/rust-lang/crates.io-index"
228 source = "registry+https://github.com/rust-lang/crates.io-index"
229 checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
229 checksum = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
230 dependencies = [
230 dependencies = [
231 "autocfg",
231 "autocfg",
232 "cfg-if 0.1.10",
232 "cfg-if 0.1.10",
233 "lazy_static",
233 "lazy_static",
234 ]
234 ]
235
235
236 [[package]]
236 [[package]]
237 name = "crossbeam-utils"
237 name = "crossbeam-utils"
238 version = "0.8.1"
238 version = "0.8.1"
239 source = "registry+https://github.com/rust-lang/crates.io-index"
239 source = "registry+https://github.com/rust-lang/crates.io-index"
240 checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
240 checksum = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
241 dependencies = [
241 dependencies = [
242 "autocfg",
242 "autocfg",
243 "cfg-if 1.0.0",
243 "cfg-if 1.0.0",
244 "lazy_static",
244 "lazy_static",
245 ]
245 ]
246
246
247 [[package]]
247 [[package]]
248 name = "ctor"
248 name = "ctor"
249 version = "0.1.16"
249 version = "0.1.16"
250 source = "registry+https://github.com/rust-lang/crates.io-index"
250 source = "registry+https://github.com/rust-lang/crates.io-index"
251 checksum = "7fbaabec2c953050352311293be5c6aba8e141ba19d6811862b232d6fd020484"
251 checksum = "7fbaabec2c953050352311293be5c6aba8e141ba19d6811862b232d6fd020484"
252 dependencies = [
252 dependencies = [
253 "quote",
253 "quote",
254 "syn",
254 "syn",
255 ]
255 ]
256
256
257 [[package]]
257 [[package]]
258 name = "derive_more"
258 name = "derive_more"
259 version = "0.99.11"
259 version = "0.99.11"
260 source = "registry+https://github.com/rust-lang/crates.io-index"
260 source = "registry+https://github.com/rust-lang/crates.io-index"
261 checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
261 checksum = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
262 dependencies = [
262 dependencies = [
263 "proc-macro2",
263 "proc-macro2",
264 "quote",
264 "quote",
265 "syn",
265 "syn",
266 ]
266 ]
267
267
268 [[package]]
268 [[package]]
269 name = "difference"
269 name = "difference"
270 version = "2.0.0"
270 version = "2.0.0"
271 source = "registry+https://github.com/rust-lang/crates.io-index"
271 source = "registry+https://github.com/rust-lang/crates.io-index"
272 checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
272 checksum = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
273
273
274 [[package]]
274 [[package]]
275 name = "digest"
275 name = "digest"
276 version = "0.9.0"
276 version = "0.9.0"
277 source = "registry+https://github.com/rust-lang/crates.io-index"
277 source = "registry+https://github.com/rust-lang/crates.io-index"
278 checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
278 checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066"
279 dependencies = [
279 dependencies = [
280 "generic-array",
280 "generic-array",
281 ]
281 ]
282
282
283 [[package]]
283 [[package]]
284 name = "either"
284 name = "either"
285 version = "1.6.1"
285 version = "1.6.1"
286 source = "registry+https://github.com/rust-lang/crates.io-index"
286 source = "registry+https://github.com/rust-lang/crates.io-index"
287 checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
287 checksum = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
288
288
289 [[package]]
289 [[package]]
290 name = "env_logger"
290 name = "env_logger"
291 version = "0.7.1"
291 version = "0.7.1"
292 source = "registry+https://github.com/rust-lang/crates.io-index"
292 source = "registry+https://github.com/rust-lang/crates.io-index"
293 checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
293 checksum = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
294 dependencies = [
294 dependencies = [
295 "atty",
295 "atty",
296 "humantime",
296 "humantime",
297 "log",
297 "log",
298 "regex",
298 "regex",
299 "termcolor",
299 "termcolor",
300 ]
300 ]
301
301
302 [[package]]
302 [[package]]
303 name = "flate2"
303 name = "flate2"
304 version = "1.0.19"
304 version = "1.0.19"
305 source = "registry+https://github.com/rust-lang/crates.io-index"
305 source = "registry+https://github.com/rust-lang/crates.io-index"
306 checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129"
306 checksum = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129"
307 dependencies = [
307 dependencies = [
308 "cfg-if 1.0.0",
308 "cfg-if 1.0.0",
309 "crc32fast",
309 "crc32fast",
310 "libc",
310 "libc",
311 "libz-sys",
311 "libz-sys",
312 "miniz_oxide",
312 "miniz_oxide",
313 ]
313 ]
314
314
315 [[package]]
315 [[package]]
316 name = "format-bytes"
316 name = "format-bytes"
317 version = "0.2.2"
317 version = "0.2.2"
318 source = "registry+https://github.com/rust-lang/crates.io-index"
318 source = "registry+https://github.com/rust-lang/crates.io-index"
319 checksum = "1c4e89040c7fd7b4e6ba2820ac705a45def8a0c098ec78d170ae88f1ef1d5762"
319 checksum = "1c4e89040c7fd7b4e6ba2820ac705a45def8a0c098ec78d170ae88f1ef1d5762"
320 dependencies = [
320 dependencies = [
321 "format-bytes-macros",
321 "format-bytes-macros",
322 "proc-macro-hack",
322 "proc-macro-hack",
323 ]
323 ]
324
324
325 [[package]]
325 [[package]]
326 name = "format-bytes-macros"
326 name = "format-bytes-macros"
327 version = "0.3.0"
327 version = "0.3.0"
328 source = "registry+https://github.com/rust-lang/crates.io-index"
328 source = "registry+https://github.com/rust-lang/crates.io-index"
329 checksum = "b05089e341a0460449e2210c3bf7b61597860b07f0deae58da38dbed0a4c6b6d"
329 checksum = "b05089e341a0460449e2210c3bf7b61597860b07f0deae58da38dbed0a4c6b6d"
330 dependencies = [
330 dependencies = [
331 "proc-macro-hack",
331 "proc-macro-hack",
332 "proc-macro2",
332 "proc-macro2",
333 "quote",
333 "quote",
334 "syn",
334 "syn",
335 ]
335 ]
336
336
337 [[package]]
337 [[package]]
338 name = "generic-array"
338 name = "generic-array"
339 version = "0.14.4"
339 version = "0.14.4"
340 source = "registry+https://github.com/rust-lang/crates.io-index"
340 source = "registry+https://github.com/rust-lang/crates.io-index"
341 checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
341 checksum = "501466ecc8a30d1d3b7fc9229b122b2ce8ed6e9d9223f1138d4babb253e51817"
342 dependencies = [
342 dependencies = [
343 "typenum",
343 "typenum",
344 "version_check",
344 "version_check",
345 ]
345 ]
346
346
347 [[package]]
347 [[package]]
348 name = "getrandom"
348 name = "getrandom"
349 version = "0.1.15"
349 version = "0.1.15"
350 source = "registry+https://github.com/rust-lang/crates.io-index"
350 source = "registry+https://github.com/rust-lang/crates.io-index"
351 checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
351 checksum = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
352 dependencies = [
352 dependencies = [
353 "cfg-if 0.1.10",
353 "cfg-if 0.1.10",
354 "libc",
354 "libc",
355 "wasi 0.9.0+wasi-snapshot-preview1",
355 "wasi 0.9.0+wasi-snapshot-preview1",
356 ]
356 ]
357
357
358 [[package]]
358 [[package]]
359 name = "glob"
359 name = "glob"
360 version = "0.3.0"
360 version = "0.3.0"
361 source = "registry+https://github.com/rust-lang/crates.io-index"
361 source = "registry+https://github.com/rust-lang/crates.io-index"
362 checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
362 checksum = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
363
363
364 [[package]]
364 [[package]]
365 name = "hermit-abi"
365 name = "hermit-abi"
366 version = "0.1.17"
366 version = "0.1.17"
367 source = "registry+https://github.com/rust-lang/crates.io-index"
367 source = "registry+https://github.com/rust-lang/crates.io-index"
368 checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
368 checksum = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
369 dependencies = [
369 dependencies = [
370 "libc",
370 "libc",
371 ]
371 ]
372
372
373 [[package]]
373 [[package]]
374 name = "hg-core"
374 name = "hg-core"
375 version = "0.1.0"
375 version = "0.1.0"
376 dependencies = [
376 dependencies = [
377 "byteorder",
377 "byteorder",
378 "bytes-cast",
378 "bytes-cast",
379 "clap",
379 "clap",
380 "crossbeam-channel 0.4.4",
380 "crossbeam-channel 0.4.4",
381 "derive_more",
381 "derive_more",
382 "flate2",
382 "flate2",
383 "format-bytes",
383 "format-bytes",
384 "home",
384 "home",
385 "im-rc",
385 "im-rc",
386 "itertools",
386 "itertools",
387 "lazy_static",
387 "lazy_static",
388 "log",
388 "log",
389 "memmap",
389 "memmap",
390 "micro-timer",
390 "micro-timer",
391 "pretty_assertions",
391 "pretty_assertions",
392 "rand",
392 "rand",
393 "rand_distr",
393 "rand_distr",
394 "rand_pcg",
394 "rand_pcg",
395 "rayon",
395 "rayon",
396 "regex",
396 "regex",
397 "same-file",
397 "same-file",
398 "sha-1",
398 "sha-1",
399 "tempfile",
399 "tempfile",
400 "twox-hash",
400 "twox-hash",
401 "zstd",
401 "zstd",
402 ]
402 ]
403
403
404 [[package]]
404 [[package]]
405 name = "hg-cpython"
405 name = "hg-cpython"
406 version = "0.1.0"
406 version = "0.1.0"
407 dependencies = [
407 dependencies = [
408 "cpython",
408 "cpython",
409 "crossbeam-channel 0.4.4",
409 "crossbeam-channel 0.4.4",
410 "env_logger",
410 "env_logger",
411 "hg-core",
411 "hg-core",
412 "libc",
412 "libc",
413 "log",
413 "log",
414 ]
414 ]
415
415
416 [[package]]
416 [[package]]
417 name = "home"
417 name = "home"
418 version = "0.5.3"
418 version = "0.5.3"
419 source = "registry+https://github.com/rust-lang/crates.io-index"
419 source = "registry+https://github.com/rust-lang/crates.io-index"
420 checksum = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654"
420 checksum = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654"
421 dependencies = [
421 dependencies = [
422 "winapi",
422 "winapi",
423 ]
423 ]
424
424
425 [[package]]
425 [[package]]
426 name = "humantime"
426 name = "humantime"
427 version = "1.3.0"
427 version = "1.3.0"
428 source = "registry+https://github.com/rust-lang/crates.io-index"
428 source = "registry+https://github.com/rust-lang/crates.io-index"
429 checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
429 checksum = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
430 dependencies = [
430 dependencies = [
431 "quick-error",
431 "quick-error",
432 ]
432 ]
433
433
434 [[package]]
434 [[package]]
435 name = "im-rc"
435 name = "im-rc"
436 version = "15.0.0"
436 version = "15.0.0"
437 source = "registry+https://github.com/rust-lang/crates.io-index"
437 source = "registry+https://github.com/rust-lang/crates.io-index"
438 checksum = "3ca8957e71f04a205cb162508f9326aea04676c8dfd0711220190d6b83664f3f"
438 checksum = "3ca8957e71f04a205cb162508f9326aea04676c8dfd0711220190d6b83664f3f"
439 dependencies = [
439 dependencies = [
440 "bitmaps",
440 "bitmaps",
441 "rand_core",
441 "rand_core",
442 "rand_xoshiro",
442 "rand_xoshiro",
443 "sized-chunks",
443 "sized-chunks",
444 "typenum",
444 "typenum",
445 "version_check",
445 "version_check",
446 ]
446 ]
447
447
448 [[package]]
448 [[package]]
449 name = "itertools"
449 name = "itertools"
450 version = "0.9.0"
450 version = "0.9.0"
451 source = "registry+https://github.com/rust-lang/crates.io-index"
451 source = "registry+https://github.com/rust-lang/crates.io-index"
452 checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
452 checksum = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
453 dependencies = [
453 dependencies = [
454 "either",
454 "either",
455 ]
455 ]
456
456
457 [[package]]
457 [[package]]
458 name = "jobserver"
458 name = "jobserver"
459 version = "0.1.21"
459 version = "0.1.21"
460 source = "registry+https://github.com/rust-lang/crates.io-index"
460 source = "registry+https://github.com/rust-lang/crates.io-index"
461 checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
461 checksum = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
462 dependencies = [
462 dependencies = [
463 "libc",
463 "libc",
464 ]
464 ]
465
465
466 [[package]]
466 [[package]]
467 name = "lazy_static"
467 name = "lazy_static"
468 version = "1.4.0"
468 version = "1.4.0"
469 source = "registry+https://github.com/rust-lang/crates.io-index"
469 source = "registry+https://github.com/rust-lang/crates.io-index"
470 checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
470 checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
471
471
472 [[package]]
472 [[package]]
473 name = "libc"
473 name = "libc"
474 version = "0.2.81"
474 version = "0.2.81"
475 source = "registry+https://github.com/rust-lang/crates.io-index"
475 source = "registry+https://github.com/rust-lang/crates.io-index"
476 checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
476 checksum = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
477
477
478 [[package]]
478 [[package]]
479 name = "libz-sys"
479 name = "libz-sys"
480 version = "1.1.2"
480 version = "1.1.2"
481 source = "registry+https://github.com/rust-lang/crates.io-index"
481 source = "registry+https://github.com/rust-lang/crates.io-index"
482 checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
482 checksum = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
483 dependencies = [
483 dependencies = [
484 "cc",
484 "cc",
485 "pkg-config",
485 "pkg-config",
486 "vcpkg",
486 "vcpkg",
487 ]
487 ]
488
488
489 [[package]]
489 [[package]]
490 name = "log"
490 name = "log"
491 version = "0.4.11"
491 version = "0.4.11"
492 source = "registry+https://github.com/rust-lang/crates.io-index"
492 source = "registry+https://github.com/rust-lang/crates.io-index"
493 checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
493 checksum = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
494 dependencies = [
494 dependencies = [
495 "cfg-if 0.1.10",
495 "cfg-if 0.1.10",
496 ]
496 ]
497
497
498 [[package]]
498 [[package]]
499 name = "maybe-uninit"
499 name = "maybe-uninit"
500 version = "2.0.0"
500 version = "2.0.0"
501 source = "registry+https://github.com/rust-lang/crates.io-index"
501 source = "registry+https://github.com/rust-lang/crates.io-index"
502 checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
502 checksum = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
503
503
504 [[package]]
504 [[package]]
505 name = "memchr"
505 name = "memchr"
506 version = "2.3.4"
506 version = "2.3.4"
507 source = "registry+https://github.com/rust-lang/crates.io-index"
507 source = "registry+https://github.com/rust-lang/crates.io-index"
508 checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
508 checksum = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
509
509
510 [[package]]
510 [[package]]
511 name = "memmap"
511 name = "memmap"
512 version = "0.7.0"
512 version = "0.7.0"
513 source = "registry+https://github.com/rust-lang/crates.io-index"
513 source = "registry+https://github.com/rust-lang/crates.io-index"
514 checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
514 checksum = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
515 dependencies = [
515 dependencies = [
516 "libc",
516 "libc",
517 "winapi",
517 "winapi",
518 ]
518 ]
519
519
520 [[package]]
520 [[package]]
521 name = "memoffset"
521 name = "memoffset"
522 version = "0.6.1"
522 version = "0.6.1"
523 source = "registry+https://github.com/rust-lang/crates.io-index"
523 source = "registry+https://github.com/rust-lang/crates.io-index"
524 checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87"
524 checksum = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87"
525 dependencies = [
525 dependencies = [
526 "autocfg",
526 "autocfg",
527 ]
527 ]
528
528
529 [[package]]
529 [[package]]
530 name = "micro-timer"
530 name = "micro-timer"
531 version = "0.3.1"
531 version = "0.3.1"
532 source = "registry+https://github.com/rust-lang/crates.io-index"
532 source = "registry+https://github.com/rust-lang/crates.io-index"
533 checksum = "2620153e1d903d26b72b89f0e9c48d8c4756cba941c185461dddc234980c298c"
533 checksum = "2620153e1d903d26b72b89f0e9c48d8c4756cba941c185461dddc234980c298c"
534 dependencies = [
534 dependencies = [
535 "micro-timer-macros",
535 "micro-timer-macros",
536 "scopeguard",
536 "scopeguard",
537 ]
537 ]
538
538
539 [[package]]
539 [[package]]
540 name = "micro-timer-macros"
540 name = "micro-timer-macros"
541 version = "0.3.1"
541 version = "0.3.1"
542 source = "registry+https://github.com/rust-lang/crates.io-index"
542 source = "registry+https://github.com/rust-lang/crates.io-index"
543 checksum = "e28a3473e6abd6e9aab36aaeef32ad22ae0bd34e79f376643594c2b152ec1c5d"
543 checksum = "e28a3473e6abd6e9aab36aaeef32ad22ae0bd34e79f376643594c2b152ec1c5d"
544 dependencies = [
544 dependencies = [
545 "proc-macro2",
545 "proc-macro2",
546 "quote",
546 "quote",
547 "scopeguard",
547 "scopeguard",
548 "syn",
548 "syn",
549 ]
549 ]
550
550
551 [[package]]
551 [[package]]
552 name = "miniz_oxide"
552 name = "miniz_oxide"
553 version = "0.4.3"
553 version = "0.4.3"
554 source = "registry+https://github.com/rust-lang/crates.io-index"
554 source = "registry+https://github.com/rust-lang/crates.io-index"
555 checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d"
555 checksum = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d"
556 dependencies = [
556 dependencies = [
557 "adler",
557 "adler",
558 "autocfg",
558 "autocfg",
559 ]
559 ]
560
560
561 [[package]]
561 [[package]]
562 name = "num-integer"
562 name = "num-integer"
563 version = "0.1.44"
563 version = "0.1.44"
564 source = "registry+https://github.com/rust-lang/crates.io-index"
564 source = "registry+https://github.com/rust-lang/crates.io-index"
565 checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
565 checksum = "d2cc698a63b549a70bc047073d2949cce27cd1c7b0a4a862d08a8031bc2801db"
566 dependencies = [
566 dependencies = [
567 "autocfg",
567 "autocfg",
568 "num-traits",
568 "num-traits",
569 ]
569 ]
570
570
571 [[package]]
571 [[package]]
572 name = "num-traits"
572 name = "num-traits"
573 version = "0.2.14"
573 version = "0.2.14"
574 source = "registry+https://github.com/rust-lang/crates.io-index"
574 source = "registry+https://github.com/rust-lang/crates.io-index"
575 checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
575 checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
576 dependencies = [
576 dependencies = [
577 "autocfg",
577 "autocfg",
578 ]
578 ]
579
579
580 [[package]]
580 [[package]]
581 name = "num_cpus"
581 name = "num_cpus"
582 version = "1.13.0"
582 version = "1.13.0"
583 source = "registry+https://github.com/rust-lang/crates.io-index"
583 source = "registry+https://github.com/rust-lang/crates.io-index"
584 checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
584 checksum = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
585 dependencies = [
585 dependencies = [
586 "hermit-abi",
586 "hermit-abi",
587 "libc",
587 "libc",
588 ]
588 ]
589
589
590 [[package]]
590 [[package]]
591 name = "opaque-debug"
591 name = "opaque-debug"
592 version = "0.3.0"
592 version = "0.3.0"
593 source = "registry+https://github.com/rust-lang/crates.io-index"
593 source = "registry+https://github.com/rust-lang/crates.io-index"
594 checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
594 checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5"
595
595
596 [[package]]
596 [[package]]
597 name = "output_vt100"
597 name = "output_vt100"
598 version = "0.1.2"
598 version = "0.1.2"
599 source = "registry+https://github.com/rust-lang/crates.io-index"
599 source = "registry+https://github.com/rust-lang/crates.io-index"
600 checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9"
600 checksum = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9"
601 dependencies = [
601 dependencies = [
602 "winapi",
602 "winapi",
603 ]
603 ]
604
604
605 [[package]]
605 [[package]]
606 name = "paste"
606 name = "paste"
607 version = "0.1.18"
607 version = "0.1.18"
608 source = "registry+https://github.com/rust-lang/crates.io-index"
608 source = "registry+https://github.com/rust-lang/crates.io-index"
609 checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880"
609 checksum = "45ca20c77d80be666aef2b45486da86238fabe33e38306bd3118fe4af33fa880"
610 dependencies = [
610 dependencies = [
611 "paste-impl",
611 "paste-impl",
612 "proc-macro-hack",
612 "proc-macro-hack",
613 ]
613 ]
614
614
615 [[package]]
615 [[package]]
616 name = "paste-impl"
616 name = "paste-impl"
617 version = "0.1.18"
617 version = "0.1.18"
618 source = "registry+https://github.com/rust-lang/crates.io-index"
618 source = "registry+https://github.com/rust-lang/crates.io-index"
619 checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6"
619 checksum = "d95a7db200b97ef370c8e6de0088252f7e0dfff7d047a28528e47456c0fc98b6"
620 dependencies = [
620 dependencies = [
621 "proc-macro-hack",
621 "proc-macro-hack",
622 ]
622 ]
623
623
624 [[package]]
624 [[package]]
625 name = "pkg-config"
625 name = "pkg-config"
626 version = "0.3.19"
626 version = "0.3.19"
627 source = "registry+https://github.com/rust-lang/crates.io-index"
627 source = "registry+https://github.com/rust-lang/crates.io-index"
628 checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
628 checksum = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
629
629
630 [[package]]
630 [[package]]
631 name = "ppv-lite86"
631 name = "ppv-lite86"
632 version = "0.2.10"
632 version = "0.2.10"
633 source = "registry+https://github.com/rust-lang/crates.io-index"
633 source = "registry+https://github.com/rust-lang/crates.io-index"
634 checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
634 checksum = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
635
635
636 [[package]]
636 [[package]]
637 name = "pretty_assertions"
637 name = "pretty_assertions"
638 version = "0.6.1"
638 version = "0.6.1"
639 source = "registry+https://github.com/rust-lang/crates.io-index"
639 source = "registry+https://github.com/rust-lang/crates.io-index"
640 checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427"
640 checksum = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427"
641 dependencies = [
641 dependencies = [
642 "ansi_term",
642 "ansi_term",
643 "ctor",
643 "ctor",
644 "difference",
644 "difference",
645 "output_vt100",
645 "output_vt100",
646 ]
646 ]
647
647
648 [[package]]
648 [[package]]
649 name = "proc-macro-hack"
649 name = "proc-macro-hack"
650 version = "0.5.19"
650 version = "0.5.19"
651 source = "registry+https://github.com/rust-lang/crates.io-index"
651 source = "registry+https://github.com/rust-lang/crates.io-index"
652 checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
652 checksum = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
653
653
654 [[package]]
654 [[package]]
655 name = "proc-macro2"
655 name = "proc-macro2"
656 version = "1.0.24"
656 version = "1.0.24"
657 source = "registry+https://github.com/rust-lang/crates.io-index"
657 source = "registry+https://github.com/rust-lang/crates.io-index"
658 checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
658 checksum = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
659 dependencies = [
659 dependencies = [
660 "unicode-xid",
660 "unicode-xid",
661 ]
661 ]
662
662
663 [[package]]
663 [[package]]
664 name = "python27-sys"
664 name = "python27-sys"
665 version = "0.5.2"
665 version = "0.5.2"
666 source = "registry+https://github.com/rust-lang/crates.io-index"
666 source = "registry+https://github.com/rust-lang/crates.io-index"
667 checksum = "f485897ed7048f5032317c4e427800ef9f2053355516524d73952b8b07032054"
667 checksum = "f485897ed7048f5032317c4e427800ef9f2053355516524d73952b8b07032054"
668 dependencies = [
668 dependencies = [
669 "libc",
669 "libc",
670 "regex",
670 "regex",
671 ]
671 ]
672
672
673 [[package]]
673 [[package]]
674 name = "python3-sys"
674 name = "python3-sys"
675 version = "0.5.2"
675 version = "0.5.2"
676 source = "registry+https://github.com/rust-lang/crates.io-index"
676 source = "registry+https://github.com/rust-lang/crates.io-index"
677 checksum = "5b29b99c6868eb02beb3bf6ed025c8bcdf02efc149b8e80347d3e5d059a806db"
677 checksum = "5b29b99c6868eb02beb3bf6ed025c8bcdf02efc149b8e80347d3e5d059a806db"
678 dependencies = [
678 dependencies = [
679 "libc",
679 "libc",
680 "regex",
680 "regex",
681 ]
681 ]
682
682
683 [[package]]
683 [[package]]
684 name = "quick-error"
684 name = "quick-error"
685 version = "1.2.3"
685 version = "1.2.3"
686 source = "registry+https://github.com/rust-lang/crates.io-index"
686 source = "registry+https://github.com/rust-lang/crates.io-index"
687 checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
687 checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
688
688
689 [[package]]
689 [[package]]
690 name = "quote"
690 name = "quote"
691 version = "1.0.7"
691 version = "1.0.7"
692 source = "registry+https://github.com/rust-lang/crates.io-index"
692 source = "registry+https://github.com/rust-lang/crates.io-index"
693 checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
693 checksum = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
694 dependencies = [
694 dependencies = [
695 "proc-macro2",
695 "proc-macro2",
696 ]
696 ]
697
697
698 [[package]]
698 [[package]]
699 name = "rand"
699 name = "rand"
700 version = "0.7.3"
700 version = "0.7.3"
701 source = "registry+https://github.com/rust-lang/crates.io-index"
701 source = "registry+https://github.com/rust-lang/crates.io-index"
702 checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
702 checksum = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
703 dependencies = [
703 dependencies = [
704 "getrandom",
704 "getrandom",
705 "libc",
705 "libc",
706 "rand_chacha",
706 "rand_chacha",
707 "rand_core",
707 "rand_core",
708 "rand_hc",
708 "rand_hc",
709 ]
709 ]
710
710
711 [[package]]
711 [[package]]
712 name = "rand_chacha"
712 name = "rand_chacha"
713 version = "0.2.2"
713 version = "0.2.2"
714 source = "registry+https://github.com/rust-lang/crates.io-index"
714 source = "registry+https://github.com/rust-lang/crates.io-index"
715 checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
715 checksum = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
716 dependencies = [
716 dependencies = [
717 "ppv-lite86",
717 "ppv-lite86",
718 "rand_core",
718 "rand_core",
719 ]
719 ]
720
720
721 [[package]]
721 [[package]]
722 name = "rand_core"
722 name = "rand_core"
723 version = "0.5.1"
723 version = "0.5.1"
724 source = "registry+https://github.com/rust-lang/crates.io-index"
724 source = "registry+https://github.com/rust-lang/crates.io-index"
725 checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
725 checksum = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
726 dependencies = [
726 dependencies = [
727 "getrandom",
727 "getrandom",
728 ]
728 ]
729
729
730 [[package]]
730 [[package]]
731 name = "rand_distr"
731 name = "rand_distr"
732 version = "0.2.2"
732 version = "0.2.2"
733 source = "registry+https://github.com/rust-lang/crates.io-index"
733 source = "registry+https://github.com/rust-lang/crates.io-index"
734 checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2"
734 checksum = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2"
735 dependencies = [
735 dependencies = [
736 "rand",
736 "rand",
737 ]
737 ]
738
738
739 [[package]]
739 [[package]]
740 name = "rand_hc"
740 name = "rand_hc"
741 version = "0.2.0"
741 version = "0.2.0"
742 source = "registry+https://github.com/rust-lang/crates.io-index"
742 source = "registry+https://github.com/rust-lang/crates.io-index"
743 checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
743 checksum = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
744 dependencies = [
744 dependencies = [
745 "rand_core",
745 "rand_core",
746 ]
746 ]
747
747
748 [[package]]
748 [[package]]
749 name = "rand_pcg"
749 name = "rand_pcg"
750 version = "0.2.1"
750 version = "0.2.1"
751 source = "registry+https://github.com/rust-lang/crates.io-index"
751 source = "registry+https://github.com/rust-lang/crates.io-index"
752 checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
752 checksum = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
753 dependencies = [
753 dependencies = [
754 "rand_core",
754 "rand_core",
755 ]
755 ]
756
756
757 [[package]]
757 [[package]]
758 name = "rand_xoshiro"
758 name = "rand_xoshiro"
759 version = "0.4.0"
759 version = "0.4.0"
760 source = "registry+https://github.com/rust-lang/crates.io-index"
760 source = "registry+https://github.com/rust-lang/crates.io-index"
761 checksum = "a9fcdd2e881d02f1d9390ae47ad8e5696a9e4be7b547a1da2afbc61973217004"
761 checksum = "a9fcdd2e881d02f1d9390ae47ad8e5696a9e4be7b547a1da2afbc61973217004"
762 dependencies = [
762 dependencies = [
763 "rand_core",
763 "rand_core",
764 ]
764 ]
765
765
766 [[package]]
766 [[package]]
767 name = "rayon"
767 name = "rayon"
768 version = "1.5.0"
768 version = "1.5.0"
769 source = "registry+https://github.com/rust-lang/crates.io-index"
769 source = "registry+https://github.com/rust-lang/crates.io-index"
770 checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
770 checksum = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
771 dependencies = [
771 dependencies = [
772 "autocfg",
772 "autocfg",
773 "crossbeam-deque",
773 "crossbeam-deque",
774 "either",
774 "either",
775 "rayon-core",
775 "rayon-core",
776 ]
776 ]
777
777
778 [[package]]
778 [[package]]
779 name = "rayon-core"
779 name = "rayon-core"
780 version = "1.9.0"
780 version = "1.9.0"
781 source = "registry+https://github.com/rust-lang/crates.io-index"
781 source = "registry+https://github.com/rust-lang/crates.io-index"
782 checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
782 checksum = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
783 dependencies = [
783 dependencies = [
784 "crossbeam-channel 0.5.0",
784 "crossbeam-channel 0.5.0",
785 "crossbeam-deque",
785 "crossbeam-deque",
786 "crossbeam-utils 0.8.1",
786 "crossbeam-utils 0.8.1",
787 "lazy_static",
787 "lazy_static",
788 "num_cpus",
788 "num_cpus",
789 ]
789 ]
790
790
791 [[package]]
791 [[package]]
792 name = "redox_syscall"
792 name = "redox_syscall"
793 version = "0.1.57"
793 version = "0.1.57"
794 source = "registry+https://github.com/rust-lang/crates.io-index"
794 source = "registry+https://github.com/rust-lang/crates.io-index"
795 checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
795 checksum = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
796
796
797 [[package]]
797 [[package]]
798 name = "regex"
798 name = "regex"
799 version = "1.4.2"
799 version = "1.4.2"
800 source = "registry+https://github.com/rust-lang/crates.io-index"
800 source = "registry+https://github.com/rust-lang/crates.io-index"
801 checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c"
801 checksum = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c"
802 dependencies = [
802 dependencies = [
803 "aho-corasick",
803 "aho-corasick",
804 "memchr",
804 "memchr",
805 "regex-syntax",
805 "regex-syntax",
806 "thread_local",
806 "thread_local",
807 ]
807 ]
808
808
809 [[package]]
809 [[package]]
810 name = "regex-syntax"
810 name = "regex-syntax"
811 version = "0.6.21"
811 version = "0.6.21"
812 source = "registry+https://github.com/rust-lang/crates.io-index"
812 source = "registry+https://github.com/rust-lang/crates.io-index"
813 checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
813 checksum = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
814
814
815 [[package]]
815 [[package]]
816 name = "remove_dir_all"
816 name = "remove_dir_all"
817 version = "0.5.3"
817 version = "0.5.3"
818 source = "registry+https://github.com/rust-lang/crates.io-index"
818 source = "registry+https://github.com/rust-lang/crates.io-index"
819 checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
819 checksum = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
820 dependencies = [
820 dependencies = [
821 "winapi",
821 "winapi",
822 ]
822 ]
823
823
824 [[package]]
824 [[package]]
825 name = "rhg"
825 name = "rhg"
826 version = "0.1.0"
826 version = "0.1.0"
827 dependencies = [
827 dependencies = [
828 "chrono",
828 "chrono",
829 "clap",
829 "clap",
830 "derive_more",
830 "derive_more",
831 "env_logger",
831 "env_logger",
832 "format-bytes",
832 "format-bytes",
833 "hg-core",
833 "hg-core",
834 "home",
834 "lazy_static",
835 "lazy_static",
835 "log",
836 "log",
836 "micro-timer",
837 "micro-timer",
837 "regex",
838 "regex",
838 "users",
839 "users",
839 ]
840 ]
840
841
841 [[package]]
842 [[package]]
842 name = "same-file"
843 name = "same-file"
843 version = "1.0.6"
844 version = "1.0.6"
844 source = "registry+https://github.com/rust-lang/crates.io-index"
845 source = "registry+https://github.com/rust-lang/crates.io-index"
845 checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
846 checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
846 dependencies = [
847 dependencies = [
847 "winapi-util",
848 "winapi-util",
848 ]
849 ]
849
850
850 [[package]]
851 [[package]]
851 name = "scopeguard"
852 name = "scopeguard"
852 version = "1.1.0"
853 version = "1.1.0"
853 source = "registry+https://github.com/rust-lang/crates.io-index"
854 source = "registry+https://github.com/rust-lang/crates.io-index"
854 checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
855 checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
855
856
856 [[package]]
857 [[package]]
857 name = "sha-1"
858 name = "sha-1"
858 version = "0.9.6"
859 version = "0.9.6"
859 source = "registry+https://github.com/rust-lang/crates.io-index"
860 source = "registry+https://github.com/rust-lang/crates.io-index"
860 checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16"
861 checksum = "8c4cfa741c5832d0ef7fab46cabed29c2aae926db0b11bb2069edd8db5e64e16"
861 dependencies = [
862 dependencies = [
862 "block-buffer",
863 "block-buffer",
863 "cfg-if 1.0.0",
864 "cfg-if 1.0.0",
864 "cpufeatures",
865 "cpufeatures",
865 "digest",
866 "digest",
866 "opaque-debug",
867 "opaque-debug",
867 ]
868 ]
868
869
869 [[package]]
870 [[package]]
870 name = "sized-chunks"
871 name = "sized-chunks"
871 version = "0.6.2"
872 version = "0.6.2"
872 source = "registry+https://github.com/rust-lang/crates.io-index"
873 source = "registry+https://github.com/rust-lang/crates.io-index"
873 checksum = "1ec31ceca5644fa6d444cc77548b88b67f46db6f7c71683b0f9336e671830d2f"
874 checksum = "1ec31ceca5644fa6d444cc77548b88b67f46db6f7c71683b0f9336e671830d2f"
874 dependencies = [
875 dependencies = [
875 "bitmaps",
876 "bitmaps",
876 "typenum",
877 "typenum",
877 ]
878 ]
878
879
879 [[package]]
880 [[package]]
880 name = "static_assertions"
881 name = "static_assertions"
881 version = "1.1.0"
882 version = "1.1.0"
882 source = "registry+https://github.com/rust-lang/crates.io-index"
883 source = "registry+https://github.com/rust-lang/crates.io-index"
883 checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
884 checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
884
885
885 [[package]]
886 [[package]]
886 name = "strsim"
887 name = "strsim"
887 version = "0.8.0"
888 version = "0.8.0"
888 source = "registry+https://github.com/rust-lang/crates.io-index"
889 source = "registry+https://github.com/rust-lang/crates.io-index"
889 checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
890 checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
890
891
891 [[package]]
892 [[package]]
892 name = "syn"
893 name = "syn"
893 version = "1.0.54"
894 version = "1.0.54"
894 source = "registry+https://github.com/rust-lang/crates.io-index"
895 source = "registry+https://github.com/rust-lang/crates.io-index"
895 checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44"
896 checksum = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44"
896 dependencies = [
897 dependencies = [
897 "proc-macro2",
898 "proc-macro2",
898 "quote",
899 "quote",
899 "unicode-xid",
900 "unicode-xid",
900 ]
901 ]
901
902
902 [[package]]
903 [[package]]
903 name = "tempfile"
904 name = "tempfile"
904 version = "3.1.0"
905 version = "3.1.0"
905 source = "registry+https://github.com/rust-lang/crates.io-index"
906 source = "registry+https://github.com/rust-lang/crates.io-index"
906 checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
907 checksum = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
907 dependencies = [
908 dependencies = [
908 "cfg-if 0.1.10",
909 "cfg-if 0.1.10",
909 "libc",
910 "libc",
910 "rand",
911 "rand",
911 "redox_syscall",
912 "redox_syscall",
912 "remove_dir_all",
913 "remove_dir_all",
913 "winapi",
914 "winapi",
914 ]
915 ]
915
916
916 [[package]]
917 [[package]]
917 name = "termcolor"
918 name = "termcolor"
918 version = "1.1.2"
919 version = "1.1.2"
919 source = "registry+https://github.com/rust-lang/crates.io-index"
920 source = "registry+https://github.com/rust-lang/crates.io-index"
920 checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
921 checksum = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
921 dependencies = [
922 dependencies = [
922 "winapi-util",
923 "winapi-util",
923 ]
924 ]
924
925
925 [[package]]
926 [[package]]
926 name = "textwrap"
927 name = "textwrap"
927 version = "0.11.0"
928 version = "0.11.0"
928 source = "registry+https://github.com/rust-lang/crates.io-index"
929 source = "registry+https://github.com/rust-lang/crates.io-index"
929 checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
930 checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
930 dependencies = [
931 dependencies = [
931 "unicode-width",
932 "unicode-width",
932 ]
933 ]
933
934
934 [[package]]
935 [[package]]
935 name = "thread_local"
936 name = "thread_local"
936 version = "1.0.1"
937 version = "1.0.1"
937 source = "registry+https://github.com/rust-lang/crates.io-index"
938 source = "registry+https://github.com/rust-lang/crates.io-index"
938 checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
939 checksum = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
939 dependencies = [
940 dependencies = [
940 "lazy_static",
941 "lazy_static",
941 ]
942 ]
942
943
943 [[package]]
944 [[package]]
944 name = "time"
945 name = "time"
945 version = "0.1.44"
946 version = "0.1.44"
946 source = "registry+https://github.com/rust-lang/crates.io-index"
947 source = "registry+https://github.com/rust-lang/crates.io-index"
947 checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
948 checksum = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
948 dependencies = [
949 dependencies = [
949 "libc",
950 "libc",
950 "wasi 0.10.0+wasi-snapshot-preview1",
951 "wasi 0.10.0+wasi-snapshot-preview1",
951 "winapi",
952 "winapi",
952 ]
953 ]
953
954
954 [[package]]
955 [[package]]
955 name = "twox-hash"
956 name = "twox-hash"
956 version = "1.6.0"
957 version = "1.6.0"
957 source = "registry+https://github.com/rust-lang/crates.io-index"
958 source = "registry+https://github.com/rust-lang/crates.io-index"
958 checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
959 checksum = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
959 dependencies = [
960 dependencies = [
960 "cfg-if 0.1.10",
961 "cfg-if 0.1.10",
961 "rand",
962 "rand",
962 "static_assertions",
963 "static_assertions",
963 ]
964 ]
964
965
965 [[package]]
966 [[package]]
966 name = "typenum"
967 name = "typenum"
967 version = "1.12.0"
968 version = "1.12.0"
968 source = "registry+https://github.com/rust-lang/crates.io-index"
969 source = "registry+https://github.com/rust-lang/crates.io-index"
969 checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
970 checksum = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
970
971
971 [[package]]
972 [[package]]
972 name = "unicode-width"
973 name = "unicode-width"
973 version = "0.1.8"
974 version = "0.1.8"
974 source = "registry+https://github.com/rust-lang/crates.io-index"
975 source = "registry+https://github.com/rust-lang/crates.io-index"
975 checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
976 checksum = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
976
977
977 [[package]]
978 [[package]]
978 name = "unicode-xid"
979 name = "unicode-xid"
979 version = "0.2.1"
980 version = "0.2.1"
980 source = "registry+https://github.com/rust-lang/crates.io-index"
981 source = "registry+https://github.com/rust-lang/crates.io-index"
981 checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
982 checksum = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
982
983
983 [[package]]
984 [[package]]
984 name = "users"
985 name = "users"
985 version = "0.11.0"
986 version = "0.11.0"
986 source = "registry+https://github.com/rust-lang/crates.io-index"
987 source = "registry+https://github.com/rust-lang/crates.io-index"
987 checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032"
988 checksum = "24cc0f6d6f267b73e5a2cadf007ba8f9bc39c6a6f9666f8cf25ea809a153b032"
988 dependencies = [
989 dependencies = [
989 "libc",
990 "libc",
990 "log",
991 "log",
991 ]
992 ]
992
993
993 [[package]]
994 [[package]]
994 name = "vcpkg"
995 name = "vcpkg"
995 version = "0.2.11"
996 version = "0.2.11"
996 source = "registry+https://github.com/rust-lang/crates.io-index"
997 source = "registry+https://github.com/rust-lang/crates.io-index"
997 checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
998 checksum = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
998
999
999 [[package]]
1000 [[package]]
1000 name = "vec_map"
1001 name = "vec_map"
1001 version = "0.8.2"
1002 version = "0.8.2"
1002 source = "registry+https://github.com/rust-lang/crates.io-index"
1003 source = "registry+https://github.com/rust-lang/crates.io-index"
1003 checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
1004 checksum = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
1004
1005
1005 [[package]]
1006 [[package]]
1006 name = "version_check"
1007 name = "version_check"
1007 version = "0.9.2"
1008 version = "0.9.2"
1008 source = "registry+https://github.com/rust-lang/crates.io-index"
1009 source = "registry+https://github.com/rust-lang/crates.io-index"
1009 checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
1010 checksum = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
1010
1011
1011 [[package]]
1012 [[package]]
1012 name = "wasi"
1013 name = "wasi"
1013 version = "0.9.0+wasi-snapshot-preview1"
1014 version = "0.9.0+wasi-snapshot-preview1"
1014 source = "registry+https://github.com/rust-lang/crates.io-index"
1015 source = "registry+https://github.com/rust-lang/crates.io-index"
1015 checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
1016 checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
1016
1017
1017 [[package]]
1018 [[package]]
1018 name = "wasi"
1019 name = "wasi"
1019 version = "0.10.0+wasi-snapshot-preview1"
1020 version = "0.10.0+wasi-snapshot-preview1"
1020 source = "registry+https://github.com/rust-lang/crates.io-index"
1021 source = "registry+https://github.com/rust-lang/crates.io-index"
1021 checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
1022 checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
1022
1023
1023 [[package]]
1024 [[package]]
1024 name = "winapi"
1025 name = "winapi"
1025 version = "0.3.9"
1026 version = "0.3.9"
1026 source = "registry+https://github.com/rust-lang/crates.io-index"
1027 source = "registry+https://github.com/rust-lang/crates.io-index"
1027 checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
1028 checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
1028 dependencies = [
1029 dependencies = [
1029 "winapi-i686-pc-windows-gnu",
1030 "winapi-i686-pc-windows-gnu",
1030 "winapi-x86_64-pc-windows-gnu",
1031 "winapi-x86_64-pc-windows-gnu",
1031 ]
1032 ]
1032
1033
1033 [[package]]
1034 [[package]]
1034 name = "winapi-i686-pc-windows-gnu"
1035 name = "winapi-i686-pc-windows-gnu"
1035 version = "0.4.0"
1036 version = "0.4.0"
1036 source = "registry+https://github.com/rust-lang/crates.io-index"
1037 source = "registry+https://github.com/rust-lang/crates.io-index"
1037 checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1038 checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1038
1039
1039 [[package]]
1040 [[package]]
1040 name = "winapi-util"
1041 name = "winapi-util"
1041 version = "0.1.5"
1042 version = "0.1.5"
1042 source = "registry+https://github.com/rust-lang/crates.io-index"
1043 source = "registry+https://github.com/rust-lang/crates.io-index"
1043 checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
1044 checksum = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
1044 dependencies = [
1045 dependencies = [
1045 "winapi",
1046 "winapi",
1046 ]
1047 ]
1047
1048
1048 [[package]]
1049 [[package]]
1049 name = "winapi-x86_64-pc-windows-gnu"
1050 name = "winapi-x86_64-pc-windows-gnu"
1050 version = "0.4.0"
1051 version = "0.4.0"
1051 source = "registry+https://github.com/rust-lang/crates.io-index"
1052 source = "registry+https://github.com/rust-lang/crates.io-index"
1052 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1053 checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1053
1054
1054 [[package]]
1055 [[package]]
1055 name = "zstd"
1056 name = "zstd"
1056 version = "0.5.3+zstd.1.4.5"
1057 version = "0.5.3+zstd.1.4.5"
1057 source = "registry+https://github.com/rust-lang/crates.io-index"
1058 source = "registry+https://github.com/rust-lang/crates.io-index"
1058 checksum = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8"
1059 checksum = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8"
1059 dependencies = [
1060 dependencies = [
1060 "zstd-safe",
1061 "zstd-safe",
1061 ]
1062 ]
1062
1063
1063 [[package]]
1064 [[package]]
1064 name = "zstd-safe"
1065 name = "zstd-safe"
1065 version = "2.0.5+zstd.1.4.5"
1066 version = "2.0.5+zstd.1.4.5"
1066 source = "registry+https://github.com/rust-lang/crates.io-index"
1067 source = "registry+https://github.com/rust-lang/crates.io-index"
1067 checksum = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055"
1068 checksum = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055"
1068 dependencies = [
1069 dependencies = [
1069 "libc",
1070 "libc",
1070 "zstd-sys",
1071 "zstd-sys",
1071 ]
1072 ]
1072
1073
1073 [[package]]
1074 [[package]]
1074 name = "zstd-sys"
1075 name = "zstd-sys"
1075 version = "1.4.17+zstd.1.4.5"
1076 version = "1.4.17+zstd.1.4.5"
1076 source = "registry+https://github.com/rust-lang/crates.io-index"
1077 source = "registry+https://github.com/rust-lang/crates.io-index"
1077 checksum = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b"
1078 checksum = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b"
1078 dependencies = [
1079 dependencies = [
1079 "cc",
1080 "cc",
1080 "glob",
1081 "glob",
1081 "itertools",
1082 "itertools",
1082 "libc",
1083 "libc",
1083 ]
1084 ]
@@ -1,16 +1,16 b''
1 // config.rs
1 // config.rs
2 //
2 //
3 // Copyright 2020
3 // Copyright 2020
4 // Valentin Gatien-Baron,
4 // Valentin Gatien-Baron,
5 // Raphaël Gomès <rgomes@octobus.net>
5 // Raphaël Gomès <rgomes@octobus.net>
6 //
6 //
7 // This software may be used and distributed according to the terms of the
7 // This software may be used and distributed according to the terms of the
8 // GNU General Public License version 2 or any later version.
8 // GNU General Public License version 2 or any later version.
9
9
10 //! Mercurial config parsing and interfaces.
10 //! Mercurial config parsing and interfaces.
11
11
12 mod config;
12 mod config;
13 mod layer;
13 mod layer;
14 mod values;
14 mod values;
15 pub use config::{Config, ConfigValueParseError};
15 pub use config::{Config, ConfigSource, ConfigValueParseError};
16 pub use layer::{ConfigError, ConfigParseError};
16 pub use layer::{ConfigError, ConfigParseError};
@@ -1,277 +1,277 b''
1 use crate::config::{Config, ConfigError, ConfigParseError};
1 use crate::config::{Config, ConfigError, ConfigParseError};
2 use crate::errors::{HgError, IoErrorContext, IoResultExt};
2 use crate::errors::{HgError, IoErrorContext, IoResultExt};
3 use crate::requirements;
3 use crate::requirements;
4 use crate::utils::files::get_path_from_bytes;
4 use crate::utils::files::get_path_from_bytes;
5 use crate::utils::SliceExt;
5 use crate::utils::SliceExt;
6 use memmap::{Mmap, MmapOptions};
6 use memmap::{Mmap, MmapOptions};
7 use std::collections::HashSet;
7 use std::collections::HashSet;
8 use std::path::{Path, PathBuf};
8 use std::path::{Path, PathBuf};
9
9
10 /// A repository on disk
10 /// A repository on disk
11 pub struct Repo {
11 pub struct Repo {
12 working_directory: PathBuf,
12 working_directory: PathBuf,
13 dot_hg: PathBuf,
13 dot_hg: PathBuf,
14 store: PathBuf,
14 store: PathBuf,
15 requirements: HashSet<String>,
15 requirements: HashSet<String>,
16 config: Config,
16 config: Config,
17 }
17 }
18
18
19 #[derive(Debug, derive_more::From)]
19 #[derive(Debug, derive_more::From)]
20 pub enum RepoError {
20 pub enum RepoError {
21 NotFound {
21 NotFound {
22 at: PathBuf,
22 at: PathBuf,
23 },
23 },
24 #[from]
24 #[from]
25 ConfigParseError(ConfigParseError),
25 ConfigParseError(ConfigParseError),
26 #[from]
26 #[from]
27 Other(HgError),
27 Other(HgError),
28 }
28 }
29
29
30 impl From<ConfigError> for RepoError {
30 impl From<ConfigError> for RepoError {
31 fn from(error: ConfigError) -> Self {
31 fn from(error: ConfigError) -> Self {
32 match error {
32 match error {
33 ConfigError::Parse(error) => error.into(),
33 ConfigError::Parse(error) => error.into(),
34 ConfigError::Other(error) => error.into(),
34 ConfigError::Other(error) => error.into(),
35 }
35 }
36 }
36 }
37 }
37 }
38
38
39 /// Filesystem access abstraction for the contents of a given "base" diretory
39 /// Filesystem access abstraction for the contents of a given "base" diretory
40 #[derive(Clone, Copy)]
40 #[derive(Clone, Copy)]
41 pub struct Vfs<'a> {
41 pub struct Vfs<'a> {
42 pub(crate) base: &'a Path,
42 pub(crate) base: &'a Path,
43 }
43 }
44
44
45 impl Repo {
45 impl Repo {
46 /// Find a repository, either at the given path (which must contain a `.hg`
46 /// Find a repository, either at the given path (which must contain a `.hg`
47 /// sub-directory) or by searching the current directory and its
47 /// sub-directory) or by searching the current directory and its
48 /// ancestors.
48 /// ancestors.
49 ///
49 ///
50 /// A method with two very different "modes" like this usually a code smell
50 /// A method with two very different "modes" like this usually a code smell
51 /// to make two methods instead, but in this case an `Option` is what rhg
51 /// to make two methods instead, but in this case an `Option` is what rhg
52 /// sub-commands get from Clap for the `-R` / `--repository` CLI argument.
52 /// sub-commands get from Clap for the `-R` / `--repository` CLI argument.
53 /// Having two methods would just move that `if` to almost all callers.
53 /// Having two methods would just move that `if` to almost all callers.
54 pub fn find(
54 pub fn find(
55 config: &Config,
55 config: &Config,
56 explicit_path: Option<&Path>,
56 explicit_path: Option<PathBuf>,
57 ) -> Result<Self, RepoError> {
57 ) -> Result<Self, RepoError> {
58 if let Some(root) = explicit_path {
58 if let Some(root) = explicit_path {
59 if root.join(".hg").is_dir() {
59 if root.join(".hg").is_dir() {
60 Self::new_at_path(root.to_owned(), config)
60 Self::new_at_path(root.to_owned(), config)
61 } else if root.is_file() {
61 } else if root.is_file() {
62 Err(HgError::unsupported("bundle repository").into())
62 Err(HgError::unsupported("bundle repository").into())
63 } else {
63 } else {
64 Err(RepoError::NotFound {
64 Err(RepoError::NotFound {
65 at: root.to_owned(),
65 at: root.to_owned(),
66 })
66 })
67 }
67 }
68 } else {
68 } else {
69 let current_directory = crate::utils::current_dir()?;
69 let current_directory = crate::utils::current_dir()?;
70 // ancestors() is inclusive: it first yields `current_directory`
70 // ancestors() is inclusive: it first yields `current_directory`
71 // as-is.
71 // as-is.
72 for ancestor in current_directory.ancestors() {
72 for ancestor in current_directory.ancestors() {
73 if ancestor.join(".hg").is_dir() {
73 if ancestor.join(".hg").is_dir() {
74 return Self::new_at_path(ancestor.to_owned(), config);
74 return Self::new_at_path(ancestor.to_owned(), config);
75 }
75 }
76 }
76 }
77 Err(RepoError::NotFound {
77 Err(RepoError::NotFound {
78 at: current_directory,
78 at: current_directory,
79 })
79 })
80 }
80 }
81 }
81 }
82
82
83 /// To be called after checking that `.hg` is a sub-directory
83 /// To be called after checking that `.hg` is a sub-directory
84 fn new_at_path(
84 fn new_at_path(
85 working_directory: PathBuf,
85 working_directory: PathBuf,
86 config: &Config,
86 config: &Config,
87 ) -> Result<Self, RepoError> {
87 ) -> Result<Self, RepoError> {
88 let dot_hg = working_directory.join(".hg");
88 let dot_hg = working_directory.join(".hg");
89
89
90 let mut repo_config_files = Vec::new();
90 let mut repo_config_files = Vec::new();
91 repo_config_files.push(dot_hg.join("hgrc"));
91 repo_config_files.push(dot_hg.join("hgrc"));
92 repo_config_files.push(dot_hg.join("hgrc-not-shared"));
92 repo_config_files.push(dot_hg.join("hgrc-not-shared"));
93
93
94 let hg_vfs = Vfs { base: &dot_hg };
94 let hg_vfs = Vfs { base: &dot_hg };
95 let mut reqs = requirements::load_if_exists(hg_vfs)?;
95 let mut reqs = requirements::load_if_exists(hg_vfs)?;
96 let relative =
96 let relative =
97 reqs.contains(requirements::RELATIVE_SHARED_REQUIREMENT);
97 reqs.contains(requirements::RELATIVE_SHARED_REQUIREMENT);
98 let shared =
98 let shared =
99 reqs.contains(requirements::SHARED_REQUIREMENT) || relative;
99 reqs.contains(requirements::SHARED_REQUIREMENT) || relative;
100
100
101 // From `mercurial/localrepo.py`:
101 // From `mercurial/localrepo.py`:
102 //
102 //
103 // if .hg/requires contains the sharesafe requirement, it means
103 // if .hg/requires contains the sharesafe requirement, it means
104 // there exists a `.hg/store/requires` too and we should read it
104 // there exists a `.hg/store/requires` too and we should read it
105 // NOTE: presence of SHARESAFE_REQUIREMENT imply that store requirement
105 // NOTE: presence of SHARESAFE_REQUIREMENT imply that store requirement
106 // is present. We never write SHARESAFE_REQUIREMENT for a repo if store
106 // is present. We never write SHARESAFE_REQUIREMENT for a repo if store
107 // is not present, refer checkrequirementscompat() for that
107 // is not present, refer checkrequirementscompat() for that
108 //
108 //
109 // However, if SHARESAFE_REQUIREMENT is not present, it means that the
109 // However, if SHARESAFE_REQUIREMENT is not present, it means that the
110 // repository was shared the old way. We check the share source
110 // repository was shared the old way. We check the share source
111 // .hg/requires for SHARESAFE_REQUIREMENT to detect whether the
111 // .hg/requires for SHARESAFE_REQUIREMENT to detect whether the
112 // current repository needs to be reshared
112 // current repository needs to be reshared
113 let share_safe = reqs.contains(requirements::SHARESAFE_REQUIREMENT);
113 let share_safe = reqs.contains(requirements::SHARESAFE_REQUIREMENT);
114
114
115 let store_path;
115 let store_path;
116 if !shared {
116 if !shared {
117 store_path = dot_hg.join("store");
117 store_path = dot_hg.join("store");
118 } else {
118 } else {
119 let bytes = hg_vfs.read("sharedpath")?;
119 let bytes = hg_vfs.read("sharedpath")?;
120 let mut shared_path =
120 let mut shared_path =
121 get_path_from_bytes(bytes.trim_end_newlines()).to_owned();
121 get_path_from_bytes(bytes.trim_end_newlines()).to_owned();
122 if relative {
122 if relative {
123 shared_path = dot_hg.join(shared_path)
123 shared_path = dot_hg.join(shared_path)
124 }
124 }
125 if !shared_path.is_dir() {
125 if !shared_path.is_dir() {
126 return Err(HgError::corrupted(format!(
126 return Err(HgError::corrupted(format!(
127 ".hg/sharedpath points to nonexistent directory {}",
127 ".hg/sharedpath points to nonexistent directory {}",
128 shared_path.display()
128 shared_path.display()
129 ))
129 ))
130 .into());
130 .into());
131 }
131 }
132
132
133 store_path = shared_path.join("store");
133 store_path = shared_path.join("store");
134
134
135 let source_is_share_safe =
135 let source_is_share_safe =
136 requirements::load(Vfs { base: &shared_path })?
136 requirements::load(Vfs { base: &shared_path })?
137 .contains(requirements::SHARESAFE_REQUIREMENT);
137 .contains(requirements::SHARESAFE_REQUIREMENT);
138
138
139 if share_safe && !source_is_share_safe {
139 if share_safe && !source_is_share_safe {
140 return Err(match config
140 return Err(match config
141 .get(b"share", b"safe-mismatch.source-not-safe")
141 .get(b"share", b"safe-mismatch.source-not-safe")
142 {
142 {
143 Some(b"abort") | None => HgError::abort(
143 Some(b"abort") | None => HgError::abort(
144 "abort: share source does not support share-safe requirement\n\
144 "abort: share source does not support share-safe requirement\n\
145 (see `hg help config.format.use-share-safe` for more information)",
145 (see `hg help config.format.use-share-safe` for more information)",
146 ),
146 ),
147 _ => HgError::unsupported("share-safe downgrade"),
147 _ => HgError::unsupported("share-safe downgrade"),
148 }
148 }
149 .into());
149 .into());
150 } else if source_is_share_safe && !share_safe {
150 } else if source_is_share_safe && !share_safe {
151 return Err(
151 return Err(
152 match config.get(b"share", b"safe-mismatch.source-safe") {
152 match config.get(b"share", b"safe-mismatch.source-safe") {
153 Some(b"abort") | None => HgError::abort(
153 Some(b"abort") | None => HgError::abort(
154 "abort: version mismatch: source uses share-safe \
154 "abort: version mismatch: source uses share-safe \
155 functionality while the current share does not\n\
155 functionality while the current share does not\n\
156 (see `hg help config.format.use-share-safe` for more information)",
156 (see `hg help config.format.use-share-safe` for more information)",
157 ),
157 ),
158 _ => HgError::unsupported("share-safe upgrade"),
158 _ => HgError::unsupported("share-safe upgrade"),
159 }
159 }
160 .into(),
160 .into(),
161 );
161 );
162 }
162 }
163
163
164 if share_safe {
164 if share_safe {
165 repo_config_files.insert(0, shared_path.join("hgrc"))
165 repo_config_files.insert(0, shared_path.join("hgrc"))
166 }
166 }
167 }
167 }
168 if share_safe {
168 if share_safe {
169 reqs.extend(requirements::load(Vfs { base: &store_path })?);
169 reqs.extend(requirements::load(Vfs { base: &store_path })?);
170 }
170 }
171
171
172 let repo_config = if std::env::var_os("HGRCSKIPREPO").is_none() {
172 let repo_config = if std::env::var_os("HGRCSKIPREPO").is_none() {
173 config.combine_with_repo(&repo_config_files)?
173 config.combine_with_repo(&repo_config_files)?
174 } else {
174 } else {
175 config.clone()
175 config.clone()
176 };
176 };
177
177
178 let repo = Self {
178 let repo = Self {
179 requirements: reqs,
179 requirements: reqs,
180 working_directory,
180 working_directory,
181 store: store_path,
181 store: store_path,
182 dot_hg,
182 dot_hg,
183 config: repo_config,
183 config: repo_config,
184 };
184 };
185
185
186 requirements::check(&repo)?;
186 requirements::check(&repo)?;
187
187
188 Ok(repo)
188 Ok(repo)
189 }
189 }
190
190
191 pub fn working_directory_path(&self) -> &Path {
191 pub fn working_directory_path(&self) -> &Path {
192 &self.working_directory
192 &self.working_directory
193 }
193 }
194
194
195 pub fn requirements(&self) -> &HashSet<String> {
195 pub fn requirements(&self) -> &HashSet<String> {
196 &self.requirements
196 &self.requirements
197 }
197 }
198
198
199 pub fn config(&self) -> &Config {
199 pub fn config(&self) -> &Config {
200 &self.config
200 &self.config
201 }
201 }
202
202
203 /// For accessing repository files (in `.hg`), except for the store
203 /// For accessing repository files (in `.hg`), except for the store
204 /// (`.hg/store`).
204 /// (`.hg/store`).
205 pub fn hg_vfs(&self) -> Vfs<'_> {
205 pub fn hg_vfs(&self) -> Vfs<'_> {
206 Vfs { base: &self.dot_hg }
206 Vfs { base: &self.dot_hg }
207 }
207 }
208
208
209 /// For accessing repository store files (in `.hg/store`)
209 /// For accessing repository store files (in `.hg/store`)
210 pub fn store_vfs(&self) -> Vfs<'_> {
210 pub fn store_vfs(&self) -> Vfs<'_> {
211 Vfs { base: &self.store }
211 Vfs { base: &self.store }
212 }
212 }
213
213
214 /// For accessing the working copy
214 /// For accessing the working copy
215 pub fn working_directory_vfs(&self) -> Vfs<'_> {
215 pub fn working_directory_vfs(&self) -> Vfs<'_> {
216 Vfs {
216 Vfs {
217 base: &self.working_directory,
217 base: &self.working_directory,
218 }
218 }
219 }
219 }
220
220
221 pub fn has_dirstate_v2(&self) -> bool {
221 pub fn has_dirstate_v2(&self) -> bool {
222 self.requirements
222 self.requirements
223 .contains(requirements::DIRSTATE_V2_REQUIREMENT)
223 .contains(requirements::DIRSTATE_V2_REQUIREMENT)
224 }
224 }
225
225
226 pub fn dirstate_parents(
226 pub fn dirstate_parents(
227 &self,
227 &self,
228 ) -> Result<crate::dirstate::DirstateParents, HgError> {
228 ) -> Result<crate::dirstate::DirstateParents, HgError> {
229 let dirstate = self.hg_vfs().mmap_open("dirstate")?;
229 let dirstate = self.hg_vfs().mmap_open("dirstate")?;
230 if dirstate.is_empty() {
230 if dirstate.is_empty() {
231 return Ok(crate::dirstate::DirstateParents::NULL);
231 return Ok(crate::dirstate::DirstateParents::NULL);
232 }
232 }
233 let parents = if self.has_dirstate_v2() {
233 let parents = if self.has_dirstate_v2() {
234 crate::dirstate_tree::on_disk::parse_dirstate_parents(&dirstate)?
234 crate::dirstate_tree::on_disk::parse_dirstate_parents(&dirstate)?
235 } else {
235 } else {
236 crate::dirstate::parsers::parse_dirstate_parents(&dirstate)?
236 crate::dirstate::parsers::parse_dirstate_parents(&dirstate)?
237 };
237 };
238 Ok(parents.clone())
238 Ok(parents.clone())
239 }
239 }
240 }
240 }
241
241
242 impl Vfs<'_> {
242 impl Vfs<'_> {
243 pub fn join(&self, relative_path: impl AsRef<Path>) -> PathBuf {
243 pub fn join(&self, relative_path: impl AsRef<Path>) -> PathBuf {
244 self.base.join(relative_path)
244 self.base.join(relative_path)
245 }
245 }
246
246
247 pub fn read(
247 pub fn read(
248 &self,
248 &self,
249 relative_path: impl AsRef<Path>,
249 relative_path: impl AsRef<Path>,
250 ) -> Result<Vec<u8>, HgError> {
250 ) -> Result<Vec<u8>, HgError> {
251 let path = self.join(relative_path);
251 let path = self.join(relative_path);
252 std::fs::read(&path).when_reading_file(&path)
252 std::fs::read(&path).when_reading_file(&path)
253 }
253 }
254
254
255 pub fn mmap_open(
255 pub fn mmap_open(
256 &self,
256 &self,
257 relative_path: impl AsRef<Path>,
257 relative_path: impl AsRef<Path>,
258 ) -> Result<Mmap, HgError> {
258 ) -> Result<Mmap, HgError> {
259 let path = self.base.join(relative_path);
259 let path = self.base.join(relative_path);
260 let file = std::fs::File::open(&path).when_reading_file(&path)?;
260 let file = std::fs::File::open(&path).when_reading_file(&path)?;
261 // TODO: what are the safety requirements here?
261 // TODO: what are the safety requirements here?
262 let mmap = unsafe { MmapOptions::new().map(&file) }
262 let mmap = unsafe { MmapOptions::new().map(&file) }
263 .when_reading_file(&path)?;
263 .when_reading_file(&path)?;
264 Ok(mmap)
264 Ok(mmap)
265 }
265 }
266
266
267 pub fn rename(
267 pub fn rename(
268 &self,
268 &self,
269 relative_from: impl AsRef<Path>,
269 relative_from: impl AsRef<Path>,
270 relative_to: impl AsRef<Path>,
270 relative_to: impl AsRef<Path>,
271 ) -> Result<(), HgError> {
271 ) -> Result<(), HgError> {
272 let from = self.join(relative_from);
272 let from = self.join(relative_from);
273 let to = self.join(relative_to);
273 let to = self.join(relative_to);
274 std::fs::rename(&from, &to)
274 std::fs::rename(&from, &to)
275 .with_context(|| IoErrorContext::RenamingFile { from, to })
275 .with_context(|| IoErrorContext::RenamingFile { from, to })
276 }
276 }
277 }
277 }
@@ -1,21 +1,22 b''
1 [package]
1 [package]
2 name = "rhg"
2 name = "rhg"
3 version = "0.1.0"
3 version = "0.1.0"
4 authors = [
4 authors = [
5 "Antoine Cezar <antoine.cezar@octobus.net>",
5 "Antoine Cezar <antoine.cezar@octobus.net>",
6 "Raphaël Gomès <raphael.gomes@octobus.net>",
6 "Raphaël Gomès <raphael.gomes@octobus.net>",
7 ]
7 ]
8 edition = "2018"
8 edition = "2018"
9
9
10 [dependencies]
10 [dependencies]
11 hg-core = { path = "../hg-core"}
11 hg-core = { path = "../hg-core"}
12 chrono = "0.4.19"
12 chrono = "0.4.19"
13 clap = "2.33.1"
13 clap = "2.33.1"
14 derive_more = "0.99"
14 derive_more = "0.99"
15 home = "0.5.3"
15 lazy_static = "1.4.0"
16 lazy_static = "1.4.0"
16 log = "0.4.11"
17 log = "0.4.11"
17 micro-timer = "0.3.1"
18 micro-timer = "0.3.1"
18 regex = "1.3.9"
19 regex = "1.3.9"
19 env_logger = "0.7.1"
20 env_logger = "0.7.1"
20 format-bytes = "0.2.1"
21 format-bytes = "0.2.1"
21 users = "0.11.0"
22 users = "0.11.0"
@@ -1,509 +1,575 b''
1 extern crate log;
1 extern crate log;
2 use crate::ui::Ui;
2 use crate::ui::Ui;
3 use clap::App;
3 use clap::App;
4 use clap::AppSettings;
4 use clap::AppSettings;
5 use clap::Arg;
5 use clap::Arg;
6 use clap::ArgMatches;
6 use clap::ArgMatches;
7 use format_bytes::{format_bytes, join};
7 use format_bytes::{format_bytes, join};
8 use hg::config::Config;
8 use hg::config::{Config, ConfigSource};
9 use hg::repo::{Repo, RepoError};
9 use hg::repo::{Repo, RepoError};
10 use hg::utils::files::{get_bytes_from_os_str, get_path_from_bytes};
10 use hg::utils::files::{get_bytes_from_os_str, get_path_from_bytes};
11 use hg::utils::SliceExt;
11 use hg::utils::SliceExt;
12 use std::ffi::OsString;
12 use std::ffi::OsString;
13 use std::path::PathBuf;
13 use std::path::PathBuf;
14 use std::process::Command;
14 use std::process::Command;
15
15
16 mod blackbox;
16 mod blackbox;
17 mod error;
17 mod error;
18 mod exitcode;
18 mod exitcode;
19 mod ui;
19 mod ui;
20 use error::CommandError;
20 use error::CommandError;
21
21
22 fn main_with_result(
22 fn main_with_result(
23 process_start_time: &blackbox::ProcessStartTime,
23 process_start_time: &blackbox::ProcessStartTime,
24 ui: &ui::Ui,
24 ui: &ui::Ui,
25 repo: Result<&Repo, &NoRepoInCwdError>,
25 repo: Result<&Repo, &NoRepoInCwdError>,
26 config: &Config,
26 config: &Config,
27 ) -> Result<(), CommandError> {
27 ) -> Result<(), CommandError> {
28 check_extensions(config)?;
28 check_extensions(config)?;
29
29
30 let app = App::new("rhg")
30 let app = App::new("rhg")
31 .global_setting(AppSettings::AllowInvalidUtf8)
31 .global_setting(AppSettings::AllowInvalidUtf8)
32 .global_setting(AppSettings::DisableVersion)
32 .global_setting(AppSettings::DisableVersion)
33 .setting(AppSettings::SubcommandRequired)
33 .setting(AppSettings::SubcommandRequired)
34 .setting(AppSettings::VersionlessSubcommands)
34 .setting(AppSettings::VersionlessSubcommands)
35 .arg(
35 .arg(
36 Arg::with_name("repository")
36 Arg::with_name("repository")
37 .help("repository root directory")
37 .help("repository root directory")
38 .short("-R")
38 .short("-R")
39 .long("--repository")
39 .long("--repository")
40 .value_name("REPO")
40 .value_name("REPO")
41 .takes_value(true)
41 .takes_value(true)
42 // Both ok: `hg -R ./foo log` or `hg log -R ./foo`
42 // Both ok: `hg -R ./foo log` or `hg log -R ./foo`
43 .global(true),
43 .global(true),
44 )
44 )
45 .arg(
45 .arg(
46 Arg::with_name("config")
46 Arg::with_name("config")
47 .help("set/override config option (use 'section.name=value')")
47 .help("set/override config option (use 'section.name=value')")
48 .long("--config")
48 .long("--config")
49 .value_name("CONFIG")
49 .value_name("CONFIG")
50 .takes_value(true)
50 .takes_value(true)
51 .global(true)
51 .global(true)
52 // Ok: `--config section.key1=val --config section.key2=val2`
52 // Ok: `--config section.key1=val --config section.key2=val2`
53 .multiple(true)
53 .multiple(true)
54 // Not ok: `--config section.key1=val section.key2=val2`
54 // Not ok: `--config section.key1=val section.key2=val2`
55 .number_of_values(1),
55 .number_of_values(1),
56 )
56 )
57 .arg(
57 .arg(
58 Arg::with_name("cwd")
58 Arg::with_name("cwd")
59 .help("change working directory")
59 .help("change working directory")
60 .long("--cwd")
60 .long("--cwd")
61 .value_name("DIR")
61 .value_name("DIR")
62 .takes_value(true)
62 .takes_value(true)
63 .global(true),
63 .global(true),
64 )
64 )
65 .version("0.0.1");
65 .version("0.0.1");
66 let app = add_subcommand_args(app);
66 let app = add_subcommand_args(app);
67
67
68 let matches = app.clone().get_matches_safe()?;
68 let matches = app.clone().get_matches_safe()?;
69
69
70 let (subcommand_name, subcommand_matches) = matches.subcommand();
70 let (subcommand_name, subcommand_matches) = matches.subcommand();
71 let run = subcommand_run_fn(subcommand_name)
71 let run = subcommand_run_fn(subcommand_name)
72 .expect("unknown subcommand name from clap despite AppSettings::SubcommandRequired");
72 .expect("unknown subcommand name from clap despite AppSettings::SubcommandRequired");
73 let subcommand_args = subcommand_matches
73 let subcommand_args = subcommand_matches
74 .expect("no subcommand arguments from clap despite AppSettings::SubcommandRequired");
74 .expect("no subcommand arguments from clap despite AppSettings::SubcommandRequired");
75
75
76 let invocation = CliInvocation {
76 let invocation = CliInvocation {
77 ui,
77 ui,
78 subcommand_args,
78 subcommand_args,
79 config,
79 config,
80 repo,
80 repo,
81 };
81 };
82 let blackbox = blackbox::Blackbox::new(&invocation, process_start_time)?;
82 let blackbox = blackbox::Blackbox::new(&invocation, process_start_time)?;
83 blackbox.log_command_start();
83 blackbox.log_command_start();
84 let result = run(&invocation);
84 let result = run(&invocation);
85 blackbox.log_command_end(exit_code(
85 blackbox.log_command_end(exit_code(
86 &result,
86 &result,
87 // TODO: show a warning or combine with original error if `get_bool`
87 // TODO: show a warning or combine with original error if `get_bool`
88 // returns an error
88 // returns an error
89 config
89 config
90 .get_bool(b"ui", b"detailed-exit-code")
90 .get_bool(b"ui", b"detailed-exit-code")
91 .unwrap_or(false),
91 .unwrap_or(false),
92 ));
92 ));
93 result
93 result
94 }
94 }
95
95
96 fn main() {
96 fn main() {
97 // Run this first, before we find out if the blackbox extension is even
97 // Run this first, before we find out if the blackbox extension is even
98 // enabled, in order to include everything in-between in the duration
98 // enabled, in order to include everything in-between in the duration
99 // measurements. Reading config files can be slow if they’re on NFS.
99 // measurements. Reading config files can be slow if they’re on NFS.
100 let process_start_time = blackbox::ProcessStartTime::now();
100 let process_start_time = blackbox::ProcessStartTime::now();
101
101
102 env_logger::init();
102 env_logger::init();
103 let ui = ui::Ui::new();
103 let ui = ui::Ui::new();
104
104
105 let early_args = EarlyArgs::parse(std::env::args_os());
105 let early_args = EarlyArgs::parse(std::env::args_os());
106
106
107 let initial_current_dir = early_args.cwd.map(|cwd| {
107 let initial_current_dir = early_args.cwd.map(|cwd| {
108 let cwd = get_path_from_bytes(&cwd);
108 let cwd = get_path_from_bytes(&cwd);
109 std::env::current_dir()
109 std::env::current_dir()
110 .and_then(|initial| {
110 .and_then(|initial| {
111 std::env::set_current_dir(cwd)?;
111 std::env::set_current_dir(cwd)?;
112 Ok(initial)
112 Ok(initial)
113 })
113 })
114 .unwrap_or_else(|error| {
114 .unwrap_or_else(|error| {
115 exit(
115 exit(
116 &None,
116 &None,
117 &ui,
117 &ui,
118 OnUnsupported::Abort,
118 OnUnsupported::Abort,
119 Err(CommandError::abort(format!(
119 Err(CommandError::abort(format!(
120 "abort: {}: '{}'",
120 "abort: {}: '{}'",
121 error,
121 error,
122 cwd.display()
122 cwd.display()
123 ))),
123 ))),
124 false,
124 false,
125 )
125 )
126 })
126 })
127 });
127 });
128
128
129 let non_repo_config =
129 let non_repo_config =
130 Config::load(early_args.config).unwrap_or_else(|error| {
130 Config::load(early_args.config).unwrap_or_else(|error| {
131 // Normally this is decided based on config, but we don’t have that
131 // Normally this is decided based on config, but we don’t have that
132 // available. As of this writing config loading never returns an
132 // available. As of this writing config loading never returns an
133 // "unsupported" error but that is not enforced by the type system.
133 // "unsupported" error but that is not enforced by the type system.
134 let on_unsupported = OnUnsupported::Abort;
134 let on_unsupported = OnUnsupported::Abort;
135
135
136 exit(
136 exit(
137 &initial_current_dir,
137 &initial_current_dir,
138 &ui,
138 &ui,
139 on_unsupported,
139 on_unsupported,
140 Err(error.into()),
140 Err(error.into()),
141 false,
141 false,
142 )
142 )
143 });
143 });
144
144
145 if let Some(repo_path_bytes) = &early_args.repo {
145 if let Some(repo_path_bytes) = &early_args.repo {
146 lazy_static::lazy_static! {
146 lazy_static::lazy_static! {
147 static ref SCHEME_RE: regex::bytes::Regex =
147 static ref SCHEME_RE: regex::bytes::Regex =
148 // Same as `_matchscheme` in `mercurial/util.py`
148 // Same as `_matchscheme` in `mercurial/util.py`
149 regex::bytes::Regex::new("^[a-zA-Z0-9+.\\-]+:").unwrap();
149 regex::bytes::Regex::new("^[a-zA-Z0-9+.\\-]+:").unwrap();
150 }
150 }
151 if SCHEME_RE.is_match(&repo_path_bytes) {
151 if SCHEME_RE.is_match(&repo_path_bytes) {
152 exit(
152 exit(
153 &initial_current_dir,
153 &initial_current_dir,
154 &ui,
154 &ui,
155 OnUnsupported::from_config(&ui, &non_repo_config),
155 OnUnsupported::from_config(&ui, &non_repo_config),
156 Err(CommandError::UnsupportedFeature {
156 Err(CommandError::UnsupportedFeature {
157 message: format_bytes!(
157 message: format_bytes!(
158 b"URL-like --repository {}",
158 b"URL-like --repository {}",
159 repo_path_bytes
159 repo_path_bytes
160 ),
160 ),
161 }),
161 }),
162 // TODO: show a warning or combine with original error if
162 // TODO: show a warning or combine with original error if
163 // `get_bool` returns an error
163 // `get_bool` returns an error
164 non_repo_config
164 non_repo_config
165 .get_bool(b"ui", b"detailed-exit-code")
165 .get_bool(b"ui", b"detailed-exit-code")
166 .unwrap_or(false),
166 .unwrap_or(false),
167 )
167 )
168 }
168 }
169 }
169 }
170 let repo_path = early_args.repo.as_deref().map(get_path_from_bytes);
170 let repo_arg = early_args.repo.unwrap_or(Vec::new());
171 let repo_result = match Repo::find(&non_repo_config, repo_path) {
171 let repo_path: Option<PathBuf> = {
172 if repo_arg.is_empty() {
173 None
174 } else {
175 let local_config = {
176 if std::env::var_os("HGRCSKIPREPO").is_none() {
177 let current_dir = hg::utils::current_dir();
178 // TODO: handle errors from current_dir
179 if let Ok(current_dir_path) = current_dir {
180 let config_files = vec![
181 ConfigSource::AbsPath(
182 current_dir_path.join(".hg/hgrc"),
183 ),
184 ConfigSource::AbsPath(
185 current_dir_path.join(".hg/hgrc-not-shared"),
186 ),
187 ];
188 // TODO: handle errors from
189 // `load_from_explicit_sources`
190 Config::load_from_explicit_sources(config_files).ok()
191 } else {
192 None
193 }
194 } else {
195 None
196 }
197 };
198
199 let non_repo_config_val = {
200 let non_repo_val = non_repo_config.get(b"paths", &repo_arg);
201 match &non_repo_val {
202 Some(val) if val.len() > 0 => home::home_dir()
203 .unwrap_or_else(|| PathBuf::from("~"))
204 .join(get_path_from_bytes(val))
205 .canonicalize()
206 // TODO: handle error and make it similar to python
207 // implementation maybe?
208 .ok(),
209 _ => None,
210 }
211 };
212
213 let config_val = match &local_config {
214 None => non_repo_config_val,
215 Some(val) => {
216 let local_config_val = val.get(b"paths", &repo_arg);
217 match &local_config_val {
218 Some(val) if val.len() > 0 => {
219 // presence of a local_config assures that
220 // current_dir
221 // wont result in an Error
222 let canpath = hg::utils::current_dir()
223 .unwrap()
224 .join(get_path_from_bytes(val))
225 .canonicalize();
226 canpath.ok().or(non_repo_config_val)
227 }
228 _ => non_repo_config_val,
229 }
230 }
231 };
232 config_val.or(Some(get_path_from_bytes(&repo_arg).to_path_buf()))
233 }
234 };
235
236 let repo_result = match Repo::find(&non_repo_config, repo_path.to_owned())
237 {
172 Ok(repo) => Ok(repo),
238 Ok(repo) => Ok(repo),
173 Err(RepoError::NotFound { at }) if repo_path.is_none() => {
239 Err(RepoError::NotFound { at }) if repo_path.is_none() => {
174 // Not finding a repo is not fatal yet, if `-R` was not given
240 // Not finding a repo is not fatal yet, if `-R` was not given
175 Err(NoRepoInCwdError { cwd: at })
241 Err(NoRepoInCwdError { cwd: at })
176 }
242 }
177 Err(error) => exit(
243 Err(error) => exit(
178 &initial_current_dir,
244 &initial_current_dir,
179 &ui,
245 &ui,
180 OnUnsupported::from_config(&ui, &non_repo_config),
246 OnUnsupported::from_config(&ui, &non_repo_config),
181 Err(error.into()),
247 Err(error.into()),
182 // TODO: show a warning or combine with original error if
248 // TODO: show a warning or combine with original error if
183 // `get_bool` returns an error
249 // `get_bool` returns an error
184 non_repo_config
250 non_repo_config
185 .get_bool(b"ui", b"detailed-exit-code")
251 .get_bool(b"ui", b"detailed-exit-code")
186 .unwrap_or(false),
252 .unwrap_or(false),
187 ),
253 ),
188 };
254 };
189
255
190 let config = if let Ok(repo) = &repo_result {
256 let config = if let Ok(repo) = &repo_result {
191 repo.config()
257 repo.config()
192 } else {
258 } else {
193 &non_repo_config
259 &non_repo_config
194 };
260 };
195 let on_unsupported = OnUnsupported::from_config(&ui, config);
261 let on_unsupported = OnUnsupported::from_config(&ui, config);
196
262
197 let result = main_with_result(
263 let result = main_with_result(
198 &process_start_time,
264 &process_start_time,
199 &ui,
265 &ui,
200 repo_result.as_ref(),
266 repo_result.as_ref(),
201 config,
267 config,
202 );
268 );
203 exit(
269 exit(
204 &initial_current_dir,
270 &initial_current_dir,
205 &ui,
271 &ui,
206 on_unsupported,
272 on_unsupported,
207 result,
273 result,
208 // TODO: show a warning or combine with original error if `get_bool`
274 // TODO: show a warning or combine with original error if `get_bool`
209 // returns an error
275 // returns an error
210 config
276 config
211 .get_bool(b"ui", b"detailed-exit-code")
277 .get_bool(b"ui", b"detailed-exit-code")
212 .unwrap_or(false),
278 .unwrap_or(false),
213 )
279 )
214 }
280 }
215
281
216 fn exit_code(
282 fn exit_code(
217 result: &Result<(), CommandError>,
283 result: &Result<(), CommandError>,
218 use_detailed_exit_code: bool,
284 use_detailed_exit_code: bool,
219 ) -> i32 {
285 ) -> i32 {
220 match result {
286 match result {
221 Ok(()) => exitcode::OK,
287 Ok(()) => exitcode::OK,
222 Err(CommandError::Abort {
288 Err(CommandError::Abort {
223 message: _,
289 message: _,
224 detailed_exit_code,
290 detailed_exit_code,
225 }) => {
291 }) => {
226 if use_detailed_exit_code {
292 if use_detailed_exit_code {
227 *detailed_exit_code
293 *detailed_exit_code
228 } else {
294 } else {
229 exitcode::ABORT
295 exitcode::ABORT
230 }
296 }
231 }
297 }
232 Err(CommandError::Unsuccessful) => exitcode::UNSUCCESSFUL,
298 Err(CommandError::Unsuccessful) => exitcode::UNSUCCESSFUL,
233
299
234 // Exit with a specific code and no error message to let a potential
300 // Exit with a specific code and no error message to let a potential
235 // wrapper script fallback to Python-based Mercurial.
301 // wrapper script fallback to Python-based Mercurial.
236 Err(CommandError::UnsupportedFeature { .. }) => {
302 Err(CommandError::UnsupportedFeature { .. }) => {
237 exitcode::UNIMPLEMENTED
303 exitcode::UNIMPLEMENTED
238 }
304 }
239 }
305 }
240 }
306 }
241
307
242 fn exit(
308 fn exit(
243 initial_current_dir: &Option<PathBuf>,
309 initial_current_dir: &Option<PathBuf>,
244 ui: &Ui,
310 ui: &Ui,
245 mut on_unsupported: OnUnsupported,
311 mut on_unsupported: OnUnsupported,
246 result: Result<(), CommandError>,
312 result: Result<(), CommandError>,
247 use_detailed_exit_code: bool,
313 use_detailed_exit_code: bool,
248 ) -> ! {
314 ) -> ! {
249 if let (
315 if let (
250 OnUnsupported::Fallback { executable },
316 OnUnsupported::Fallback { executable },
251 Err(CommandError::UnsupportedFeature { .. }),
317 Err(CommandError::UnsupportedFeature { .. }),
252 ) = (&on_unsupported, &result)
318 ) = (&on_unsupported, &result)
253 {
319 {
254 let mut args = std::env::args_os();
320 let mut args = std::env::args_os();
255 let executable_path = get_path_from_bytes(&executable);
321 let executable_path = get_path_from_bytes(&executable);
256 let this_executable = args.next().expect("exepcted argv[0] to exist");
322 let this_executable = args.next().expect("exepcted argv[0] to exist");
257 if executable_path == &PathBuf::from(this_executable) {
323 if executable_path == &PathBuf::from(this_executable) {
258 // Avoid spawning infinitely many processes until resource
324 // Avoid spawning infinitely many processes until resource
259 // exhaustion.
325 // exhaustion.
260 let _ = ui.write_stderr(&format_bytes!(
326 let _ = ui.write_stderr(&format_bytes!(
261 b"Blocking recursive fallback. The 'rhg.fallback-executable = {}' config \
327 b"Blocking recursive fallback. The 'rhg.fallback-executable = {}' config \
262 points to `rhg` itself.\n",
328 points to `rhg` itself.\n",
263 executable
329 executable
264 ));
330 ));
265 on_unsupported = OnUnsupported::Abort
331 on_unsupported = OnUnsupported::Abort
266 } else {
332 } else {
267 // `args` is now `argv[1..]` since we’ve already consumed `argv[0]`
333 // `args` is now `argv[1..]` since we’ve already consumed `argv[0]`
268 let mut command = Command::new(executable_path);
334 let mut command = Command::new(executable_path);
269 command.args(args);
335 command.args(args);
270 if let Some(initial) = initial_current_dir {
336 if let Some(initial) = initial_current_dir {
271 command.current_dir(initial);
337 command.current_dir(initial);
272 }
338 }
273 let result = command.status();
339 let result = command.status();
274 match result {
340 match result {
275 Ok(status) => std::process::exit(
341 Ok(status) => std::process::exit(
276 status.code().unwrap_or(exitcode::ABORT),
342 status.code().unwrap_or(exitcode::ABORT),
277 ),
343 ),
278 Err(error) => {
344 Err(error) => {
279 let _ = ui.write_stderr(&format_bytes!(
345 let _ = ui.write_stderr(&format_bytes!(
280 b"tried to fall back to a '{}' sub-process but got error {}\n",
346 b"tried to fall back to a '{}' sub-process but got error {}\n",
281 executable, format_bytes::Utf8(error)
347 executable, format_bytes::Utf8(error)
282 ));
348 ));
283 on_unsupported = OnUnsupported::Abort
349 on_unsupported = OnUnsupported::Abort
284 }
350 }
285 }
351 }
286 }
352 }
287 }
353 }
288 exit_no_fallback(ui, on_unsupported, result, use_detailed_exit_code)
354 exit_no_fallback(ui, on_unsupported, result, use_detailed_exit_code)
289 }
355 }
290
356
291 fn exit_no_fallback(
357 fn exit_no_fallback(
292 ui: &Ui,
358 ui: &Ui,
293 on_unsupported: OnUnsupported,
359 on_unsupported: OnUnsupported,
294 result: Result<(), CommandError>,
360 result: Result<(), CommandError>,
295 use_detailed_exit_code: bool,
361 use_detailed_exit_code: bool,
296 ) -> ! {
362 ) -> ! {
297 match &result {
363 match &result {
298 Ok(_) => {}
364 Ok(_) => {}
299 Err(CommandError::Unsuccessful) => {}
365 Err(CommandError::Unsuccessful) => {}
300 Err(CommandError::Abort {
366 Err(CommandError::Abort {
301 message,
367 message,
302 detailed_exit_code: _,
368 detailed_exit_code: _,
303 }) => {
369 }) => {
304 if !message.is_empty() {
370 if !message.is_empty() {
305 // Ignore errors when writing to stderr, we’re already exiting
371 // Ignore errors when writing to stderr, we’re already exiting
306 // with failure code so there’s not much more we can do.
372 // with failure code so there’s not much more we can do.
307 let _ = ui.write_stderr(&format_bytes!(b"{}\n", message));
373 let _ = ui.write_stderr(&format_bytes!(b"{}\n", message));
308 }
374 }
309 }
375 }
310 Err(CommandError::UnsupportedFeature { message }) => {
376 Err(CommandError::UnsupportedFeature { message }) => {
311 match on_unsupported {
377 match on_unsupported {
312 OnUnsupported::Abort => {
378 OnUnsupported::Abort => {
313 let _ = ui.write_stderr(&format_bytes!(
379 let _ = ui.write_stderr(&format_bytes!(
314 b"unsupported feature: {}\n",
380 b"unsupported feature: {}\n",
315 message
381 message
316 ));
382 ));
317 }
383 }
318 OnUnsupported::AbortSilent => {}
384 OnUnsupported::AbortSilent => {}
319 OnUnsupported::Fallback { .. } => unreachable!(),
385 OnUnsupported::Fallback { .. } => unreachable!(),
320 }
386 }
321 }
387 }
322 }
388 }
323 std::process::exit(exit_code(&result, use_detailed_exit_code))
389 std::process::exit(exit_code(&result, use_detailed_exit_code))
324 }
390 }
325
391
326 macro_rules! subcommands {
392 macro_rules! subcommands {
327 ($( $command: ident )+) => {
393 ($( $command: ident )+) => {
328 mod commands {
394 mod commands {
329 $(
395 $(
330 pub mod $command;
396 pub mod $command;
331 )+
397 )+
332 }
398 }
333
399
334 fn add_subcommand_args<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> {
400 fn add_subcommand_args<'a, 'b>(app: App<'a, 'b>) -> App<'a, 'b> {
335 app
401 app
336 $(
402 $(
337 .subcommand(commands::$command::args())
403 .subcommand(commands::$command::args())
338 )+
404 )+
339 }
405 }
340
406
341 pub type RunFn = fn(&CliInvocation) -> Result<(), CommandError>;
407 pub type RunFn = fn(&CliInvocation) -> Result<(), CommandError>;
342
408
343 fn subcommand_run_fn(name: &str) -> Option<RunFn> {
409 fn subcommand_run_fn(name: &str) -> Option<RunFn> {
344 match name {
410 match name {
345 $(
411 $(
346 stringify!($command) => Some(commands::$command::run),
412 stringify!($command) => Some(commands::$command::run),
347 )+
413 )+
348 _ => None,
414 _ => None,
349 }
415 }
350 }
416 }
351 };
417 };
352 }
418 }
353
419
354 subcommands! {
420 subcommands! {
355 cat
421 cat
356 debugdata
422 debugdata
357 debugrequirements
423 debugrequirements
358 files
424 files
359 root
425 root
360 config
426 config
361 status
427 status
362 }
428 }
363
429
364 pub struct CliInvocation<'a> {
430 pub struct CliInvocation<'a> {
365 ui: &'a Ui,
431 ui: &'a Ui,
366 subcommand_args: &'a ArgMatches<'a>,
432 subcommand_args: &'a ArgMatches<'a>,
367 config: &'a Config,
433 config: &'a Config,
368 /// References inside `Result` is a bit peculiar but allow
434 /// References inside `Result` is a bit peculiar but allow
369 /// `invocation.repo?` to work out with `&CliInvocation` since this
435 /// `invocation.repo?` to work out with `&CliInvocation` since this
370 /// `Result` type is `Copy`.
436 /// `Result` type is `Copy`.
371 repo: Result<&'a Repo, &'a NoRepoInCwdError>,
437 repo: Result<&'a Repo, &'a NoRepoInCwdError>,
372 }
438 }
373
439
374 struct NoRepoInCwdError {
440 struct NoRepoInCwdError {
375 cwd: PathBuf,
441 cwd: PathBuf,
376 }
442 }
377
443
378 /// CLI arguments to be parsed "early" in order to be able to read
444 /// CLI arguments to be parsed "early" in order to be able to read
379 /// configuration before using Clap. Ideally we would also use Clap for this,
445 /// configuration before using Clap. Ideally we would also use Clap for this,
380 /// see <https://github.com/clap-rs/clap/discussions/2366>.
446 /// see <https://github.com/clap-rs/clap/discussions/2366>.
381 ///
447 ///
382 /// These arguments are still declared when we do use Clap later, so that Clap
448 /// These arguments are still declared when we do use Clap later, so that Clap
383 /// does not return an error for their presence.
449 /// does not return an error for their presence.
384 struct EarlyArgs {
450 struct EarlyArgs {
385 /// Values of all `--config` arguments. (Possibly none)
451 /// Values of all `--config` arguments. (Possibly none)
386 config: Vec<Vec<u8>>,
452 config: Vec<Vec<u8>>,
387 /// Value of the `-R` or `--repository` argument, if any.
453 /// Value of the `-R` or `--repository` argument, if any.
388 repo: Option<Vec<u8>>,
454 repo: Option<Vec<u8>>,
389 /// Value of the `--cwd` argument, if any.
455 /// Value of the `--cwd` argument, if any.
390 cwd: Option<Vec<u8>>,
456 cwd: Option<Vec<u8>>,
391 }
457 }
392
458
393 impl EarlyArgs {
459 impl EarlyArgs {
394 fn parse(args: impl IntoIterator<Item = OsString>) -> Self {
460 fn parse(args: impl IntoIterator<Item = OsString>) -> Self {
395 let mut args = args.into_iter().map(get_bytes_from_os_str);
461 let mut args = args.into_iter().map(get_bytes_from_os_str);
396 let mut config = Vec::new();
462 let mut config = Vec::new();
397 let mut repo = None;
463 let mut repo = None;
398 let mut cwd = None;
464 let mut cwd = None;
399 // Use `while let` instead of `for` so that we can also call
465 // Use `while let` instead of `for` so that we can also call
400 // `args.next()` inside the loop.
466 // `args.next()` inside the loop.
401 while let Some(arg) = args.next() {
467 while let Some(arg) = args.next() {
402 if arg == b"--config" {
468 if arg == b"--config" {
403 if let Some(value) = args.next() {
469 if let Some(value) = args.next() {
404 config.push(value)
470 config.push(value)
405 }
471 }
406 } else if let Some(value) = arg.drop_prefix(b"--config=") {
472 } else if let Some(value) = arg.drop_prefix(b"--config=") {
407 config.push(value.to_owned())
473 config.push(value.to_owned())
408 }
474 }
409
475
410 if arg == b"--cwd" {
476 if arg == b"--cwd" {
411 if let Some(value) = args.next() {
477 if let Some(value) = args.next() {
412 cwd = Some(value)
478 cwd = Some(value)
413 }
479 }
414 } else if let Some(value) = arg.drop_prefix(b"--cwd=") {
480 } else if let Some(value) = arg.drop_prefix(b"--cwd=") {
415 cwd = Some(value.to_owned())
481 cwd = Some(value.to_owned())
416 }
482 }
417
483
418 if arg == b"--repository" || arg == b"-R" {
484 if arg == b"--repository" || arg == b"-R" {
419 if let Some(value) = args.next() {
485 if let Some(value) = args.next() {
420 repo = Some(value)
486 repo = Some(value)
421 }
487 }
422 } else if let Some(value) = arg.drop_prefix(b"--repository=") {
488 } else if let Some(value) = arg.drop_prefix(b"--repository=") {
423 repo = Some(value.to_owned())
489 repo = Some(value.to_owned())
424 } else if let Some(value) = arg.drop_prefix(b"-R") {
490 } else if let Some(value) = arg.drop_prefix(b"-R") {
425 repo = Some(value.to_owned())
491 repo = Some(value.to_owned())
426 }
492 }
427 }
493 }
428 Self { config, repo, cwd }
494 Self { config, repo, cwd }
429 }
495 }
430 }
496 }
431
497
432 /// What to do when encountering some unsupported feature.
498 /// What to do when encountering some unsupported feature.
433 ///
499 ///
434 /// See `HgError::UnsupportedFeature` and `CommandError::UnsupportedFeature`.
500 /// See `HgError::UnsupportedFeature` and `CommandError::UnsupportedFeature`.
435 enum OnUnsupported {
501 enum OnUnsupported {
436 /// Print an error message describing what feature is not supported,
502 /// Print an error message describing what feature is not supported,
437 /// and exit with code 252.
503 /// and exit with code 252.
438 Abort,
504 Abort,
439 /// Silently exit with code 252.
505 /// Silently exit with code 252.
440 AbortSilent,
506 AbortSilent,
441 /// Try running a Python implementation
507 /// Try running a Python implementation
442 Fallback { executable: Vec<u8> },
508 Fallback { executable: Vec<u8> },
443 }
509 }
444
510
445 impl OnUnsupported {
511 impl OnUnsupported {
446 const DEFAULT: Self = OnUnsupported::Abort;
512 const DEFAULT: Self = OnUnsupported::Abort;
447
513
448 fn from_config(ui: &Ui, config: &Config) -> Self {
514 fn from_config(ui: &Ui, config: &Config) -> Self {
449 match config
515 match config
450 .get(b"rhg", b"on-unsupported")
516 .get(b"rhg", b"on-unsupported")
451 .map(|value| value.to_ascii_lowercase())
517 .map(|value| value.to_ascii_lowercase())
452 .as_deref()
518 .as_deref()
453 {
519 {
454 Some(b"abort") => OnUnsupported::Abort,
520 Some(b"abort") => OnUnsupported::Abort,
455 Some(b"abort-silent") => OnUnsupported::AbortSilent,
521 Some(b"abort-silent") => OnUnsupported::AbortSilent,
456 Some(b"fallback") => OnUnsupported::Fallback {
522 Some(b"fallback") => OnUnsupported::Fallback {
457 executable: config
523 executable: config
458 .get(b"rhg", b"fallback-executable")
524 .get(b"rhg", b"fallback-executable")
459 .unwrap_or_else(|| {
525 .unwrap_or_else(|| {
460 exit_no_fallback(
526 exit_no_fallback(
461 ui,
527 ui,
462 Self::Abort,
528 Self::Abort,
463 Err(CommandError::abort(
529 Err(CommandError::abort(
464 "abort: 'rhg.on-unsupported=fallback' without \
530 "abort: 'rhg.on-unsupported=fallback' without \
465 'rhg.fallback-executable' set."
531 'rhg.fallback-executable' set."
466 )),
532 )),
467 false,
533 false,
468 )
534 )
469 })
535 })
470 .to_owned(),
536 .to_owned(),
471 },
537 },
472 None => Self::DEFAULT,
538 None => Self::DEFAULT,
473 Some(_) => {
539 Some(_) => {
474 // TODO: warn about unknown config value
540 // TODO: warn about unknown config value
475 Self::DEFAULT
541 Self::DEFAULT
476 }
542 }
477 }
543 }
478 }
544 }
479 }
545 }
480
546
481 const SUPPORTED_EXTENSIONS: &[&[u8]] = &[b"blackbox", b"share"];
547 const SUPPORTED_EXTENSIONS: &[&[u8]] = &[b"blackbox", b"share"];
482
548
483 fn check_extensions(config: &Config) -> Result<(), CommandError> {
549 fn check_extensions(config: &Config) -> Result<(), CommandError> {
484 let enabled = config.get_section_keys(b"extensions");
550 let enabled = config.get_section_keys(b"extensions");
485
551
486 let mut unsupported = enabled;
552 let mut unsupported = enabled;
487 for supported in SUPPORTED_EXTENSIONS {
553 for supported in SUPPORTED_EXTENSIONS {
488 unsupported.remove(supported);
554 unsupported.remove(supported);
489 }
555 }
490
556
491 if let Some(ignored_list) =
557 if let Some(ignored_list) =
492 config.get_simple_list(b"rhg", b"ignored-extensions")
558 config.get_simple_list(b"rhg", b"ignored-extensions")
493 {
559 {
494 for ignored in ignored_list {
560 for ignored in ignored_list {
495 unsupported.remove(ignored);
561 unsupported.remove(ignored);
496 }
562 }
497 }
563 }
498
564
499 if unsupported.is_empty() {
565 if unsupported.is_empty() {
500 Ok(())
566 Ok(())
501 } else {
567 } else {
502 Err(CommandError::UnsupportedFeature {
568 Err(CommandError::UnsupportedFeature {
503 message: format_bytes!(
569 message: format_bytes!(
504 b"extensions: {} (consider adding them to 'rhg.ignored-extensions' config)",
570 b"extensions: {} (consider adding them to 'rhg.ignored-extensions' config)",
505 join(unsupported, b", ")
571 join(unsupported, b", ")
506 ),
572 ),
507 })
573 })
508 }
574 }
509 }
575 }
@@ -1,576 +1,573 b''
1 $ hg init a
1 $ hg init a
2 $ cd a
2 $ cd a
3 $ echo a > a
3 $ echo a > a
4 $ hg ci -A -d'1 0' -m a
4 $ hg ci -A -d'1 0' -m a
5 adding a
5 adding a
6
6
7 $ cd ..
7 $ cd ..
8
8
9 $ hg init b
9 $ hg init b
10 $ cd b
10 $ cd b
11 $ echo b > b
11 $ echo b > b
12 $ hg ci -A -d'1 0' -m b
12 $ hg ci -A -d'1 0' -m b
13 adding b
13 adding b
14
14
15 $ cd ..
15 $ cd ..
16
16
17 $ hg clone a c
17 $ hg clone a c
18 updating to branch default
18 updating to branch default
19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
19 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
20 $ cd c
20 $ cd c
21 $ cat >> .hg/hgrc <<EOF
21 $ cat >> .hg/hgrc <<EOF
22 > [paths]
22 > [paths]
23 > relative = ../a
23 > relative = ../a
24 > EOF
24 > EOF
25 $ hg pull -f ../b
25 $ hg pull -f ../b
26 pulling from ../b
26 pulling from ../b
27 searching for changes
27 searching for changes
28 warning: repository is unrelated
28 warning: repository is unrelated
29 requesting all changes
29 requesting all changes
30 adding changesets
30 adding changesets
31 adding manifests
31 adding manifests
32 adding file changes
32 adding file changes
33 added 1 changesets with 1 changes to 1 files (+1 heads)
33 added 1 changesets with 1 changes to 1 files (+1 heads)
34 new changesets b6c483daf290
34 new changesets b6c483daf290
35 (run 'hg heads' to see heads, 'hg merge' to merge)
35 (run 'hg heads' to see heads, 'hg merge' to merge)
36 $ hg merge
36 $ hg merge
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
37 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
38 (branch merge, don't forget to commit)
38 (branch merge, don't forget to commit)
39
39
40 $ cd ..
40 $ cd ..
41
41
42 Testing -R/--repository:
42 Testing -R/--repository:
43
43
44 $ hg -R a tip
44 $ hg -R a tip
45 changeset: 0:8580ff50825a
45 changeset: 0:8580ff50825a
46 tag: tip
46 tag: tip
47 user: test
47 user: test
48 date: Thu Jan 01 00:00:01 1970 +0000
48 date: Thu Jan 01 00:00:01 1970 +0000
49 summary: a
49 summary: a
50
50
51 $ hg --repository b tip
51 $ hg --repository b tip
52 changeset: 0:b6c483daf290
52 changeset: 0:b6c483daf290
53 tag: tip
53 tag: tip
54 user: test
54 user: test
55 date: Thu Jan 01 00:00:01 1970 +0000
55 date: Thu Jan 01 00:00:01 1970 +0000
56 summary: b
56 summary: b
57
57
58
58
59 -R with a URL:
59 -R with a URL:
60
60
61 $ hg -R file:a identify
61 $ hg -R file:a identify
62 8580ff50825a tip
62 8580ff50825a tip
63 $ hg -R file://localhost/`pwd`/a/ identify
63 $ hg -R file://localhost/`pwd`/a/ identify
64 8580ff50825a tip
64 8580ff50825a tip
65
65
66 -R with path aliases:
66 -R with path aliases:
67
67
68 TODO: add rhg support for path aliases
69 #if no-rhg
70 $ cd c
68 $ cd c
71 $ hg -R default identify
69 $ hg -R default identify
72 8580ff50825a tip
70 8580ff50825a tip
73 $ hg -R relative identify
71 $ hg -R relative identify
74 8580ff50825a tip
72 8580ff50825a tip
75 $ echo '[paths]' >> $HGRCPATH
73 $ echo '[paths]' >> $HGRCPATH
76 $ echo 'relativetohome = a' >> $HGRCPATH
74 $ echo 'relativetohome = a' >> $HGRCPATH
77 $ hg path | grep relativetohome
75 $ hg path | grep relativetohome
78 relativetohome = $TESTTMP/a
76 relativetohome = $TESTTMP/a
79 $ HOME=`pwd`/../ hg path | grep relativetohome
77 $ HOME=`pwd`/../ hg path | grep relativetohome
80 relativetohome = $TESTTMP/a
78 relativetohome = $TESTTMP/a
81 $ HOME=`pwd`/../ hg -R relativetohome identify
79 $ HOME=`pwd`/../ hg -R relativetohome identify
82 8580ff50825a tip
80 8580ff50825a tip
83 $ cd ..
81 $ cd ..
84 #endif
85
82
86 #if no-outer-repo
83 #if no-outer-repo
87
84
88 Implicit -R:
85 Implicit -R:
89
86
90 $ hg ann a/a
87 $ hg ann a/a
91 0: a
88 0: a
92 $ hg ann a/a a/a
89 $ hg ann a/a a/a
93 0: a
90 0: a
94 $ hg ann a/a b/b
91 $ hg ann a/a b/b
95 abort: no repository found in '$TESTTMP' (.hg not found)
92 abort: no repository found in '$TESTTMP' (.hg not found)
96 [10]
93 [10]
97 $ hg -R b ann a/a
94 $ hg -R b ann a/a
98 abort: a/a not under root '$TESTTMP/b'
95 abort: a/a not under root '$TESTTMP/b'
99 (consider using '--cwd b')
96 (consider using '--cwd b')
100 [255]
97 [255]
101 $ hg log
98 $ hg log
102 abort: no repository found in '$TESTTMP' (.hg not found)
99 abort: no repository found in '$TESTTMP' (.hg not found)
103 [10]
100 [10]
104
101
105 #endif
102 #endif
106
103
107 Abbreviation of long option:
104 Abbreviation of long option:
108
105
109 $ hg --repo c tip
106 $ hg --repo c tip
110 changeset: 1:b6c483daf290
107 changeset: 1:b6c483daf290
111 tag: tip
108 tag: tip
112 parent: -1:000000000000
109 parent: -1:000000000000
113 user: test
110 user: test
114 date: Thu Jan 01 00:00:01 1970 +0000
111 date: Thu Jan 01 00:00:01 1970 +0000
115 summary: b
112 summary: b
116
113
117
114
118 earlygetopt with duplicate options (36d23de02da1):
115 earlygetopt with duplicate options (36d23de02da1):
119
116
120 $ hg --cwd a --cwd b --cwd c tip
117 $ hg --cwd a --cwd b --cwd c tip
121 changeset: 1:b6c483daf290
118 changeset: 1:b6c483daf290
122 tag: tip
119 tag: tip
123 parent: -1:000000000000
120 parent: -1:000000000000
124 user: test
121 user: test
125 date: Thu Jan 01 00:00:01 1970 +0000
122 date: Thu Jan 01 00:00:01 1970 +0000
126 summary: b
123 summary: b
127
124
128 $ hg --repo c --repository b -R a tip
125 $ hg --repo c --repository b -R a tip
129 changeset: 0:8580ff50825a
126 changeset: 0:8580ff50825a
130 tag: tip
127 tag: tip
131 user: test
128 user: test
132 date: Thu Jan 01 00:00:01 1970 +0000
129 date: Thu Jan 01 00:00:01 1970 +0000
133 summary: a
130 summary: a
134
131
135
132
136 earlygetopt short option without following space:
133 earlygetopt short option without following space:
137
134
138 $ hg -q -Rb tip
135 $ hg -q -Rb tip
139 0:b6c483daf290
136 0:b6c483daf290
140
137
141 earlygetopt with illegal abbreviations:
138 earlygetopt with illegal abbreviations:
142
139
143 $ hg --confi "foo.bar=baz"
140 $ hg --confi "foo.bar=baz"
144 abort: option --config may not be abbreviated
141 abort: option --config may not be abbreviated
145 [10]
142 [10]
146 $ hg --cw a tip
143 $ hg --cw a tip
147 abort: option --cwd may not be abbreviated
144 abort: option --cwd may not be abbreviated
148 [10]
145 [10]
149 $ hg --rep a tip
146 $ hg --rep a tip
150 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
147 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
151 [10]
148 [10]
152 $ hg --repositor a tip
149 $ hg --repositor a tip
153 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
150 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
154 [10]
151 [10]
155 $ hg -qR a tip
152 $ hg -qR a tip
156 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
153 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
157 [10]
154 [10]
158 $ hg -qRa tip
155 $ hg -qRa tip
159 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
156 abort: option -R has to be separated from other options (e.g. not -qR) and --repository may only be abbreviated as --repo
160 [10]
157 [10]
161
158
162 Testing --cwd:
159 Testing --cwd:
163
160
164 $ hg --cwd a parents
161 $ hg --cwd a parents
165 changeset: 0:8580ff50825a
162 changeset: 0:8580ff50825a
166 tag: tip
163 tag: tip
167 user: test
164 user: test
168 date: Thu Jan 01 00:00:01 1970 +0000
165 date: Thu Jan 01 00:00:01 1970 +0000
169 summary: a
166 summary: a
170
167
171
168
172 Testing -y/--noninteractive - just be sure it is parsed:
169 Testing -y/--noninteractive - just be sure it is parsed:
173
170
174 $ hg --cwd a tip -q --noninteractive
171 $ hg --cwd a tip -q --noninteractive
175 0:8580ff50825a
172 0:8580ff50825a
176 $ hg --cwd a tip -q -y
173 $ hg --cwd a tip -q -y
177 0:8580ff50825a
174 0:8580ff50825a
178
175
179 Testing -q/--quiet:
176 Testing -q/--quiet:
180
177
181 $ hg -R a -q tip
178 $ hg -R a -q tip
182 0:8580ff50825a
179 0:8580ff50825a
183 $ hg -R b -q tip
180 $ hg -R b -q tip
184 0:b6c483daf290
181 0:b6c483daf290
185 $ hg -R c --quiet parents
182 $ hg -R c --quiet parents
186 0:8580ff50825a
183 0:8580ff50825a
187 1:b6c483daf290
184 1:b6c483daf290
188
185
189 Testing -v/--verbose:
186 Testing -v/--verbose:
190
187
191 $ hg --cwd c head -v
188 $ hg --cwd c head -v
192 changeset: 1:b6c483daf290
189 changeset: 1:b6c483daf290
193 tag: tip
190 tag: tip
194 parent: -1:000000000000
191 parent: -1:000000000000
195 user: test
192 user: test
196 date: Thu Jan 01 00:00:01 1970 +0000
193 date: Thu Jan 01 00:00:01 1970 +0000
197 files: b
194 files: b
198 description:
195 description:
199 b
196 b
200
197
201
198
202 changeset: 0:8580ff50825a
199 changeset: 0:8580ff50825a
203 user: test
200 user: test
204 date: Thu Jan 01 00:00:01 1970 +0000
201 date: Thu Jan 01 00:00:01 1970 +0000
205 files: a
202 files: a
206 description:
203 description:
207 a
204 a
208
205
209
206
210 $ hg --cwd b tip --verbose
207 $ hg --cwd b tip --verbose
211 changeset: 0:b6c483daf290
208 changeset: 0:b6c483daf290
212 tag: tip
209 tag: tip
213 user: test
210 user: test
214 date: Thu Jan 01 00:00:01 1970 +0000
211 date: Thu Jan 01 00:00:01 1970 +0000
215 files: b
212 files: b
216 description:
213 description:
217 b
214 b
218
215
219
216
220
217
221 Testing --config:
218 Testing --config:
222
219
223 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
220 $ hg --cwd c --config paths.quuxfoo=bar paths | grep quuxfoo > /dev/null && echo quuxfoo
224 quuxfoo
221 quuxfoo
225 TODO: add rhg support for detailed exit codes
222 TODO: add rhg support for detailed exit codes
226 #if no-rhg
223 #if no-rhg
227 $ hg --cwd c --config '' tip -q
224 $ hg --cwd c --config '' tip -q
228 abort: malformed --config option: '' (use --config section.name=value)
225 abort: malformed --config option: '' (use --config section.name=value)
229 [10]
226 [10]
230 $ hg --cwd c --config a.b tip -q
227 $ hg --cwd c --config a.b tip -q
231 abort: malformed --config option: 'a.b' (use --config section.name=value)
228 abort: malformed --config option: 'a.b' (use --config section.name=value)
232 [10]
229 [10]
233 $ hg --cwd c --config a tip -q
230 $ hg --cwd c --config a tip -q
234 abort: malformed --config option: 'a' (use --config section.name=value)
231 abort: malformed --config option: 'a' (use --config section.name=value)
235 [10]
232 [10]
236 $ hg --cwd c --config a.= tip -q
233 $ hg --cwd c --config a.= tip -q
237 abort: malformed --config option: 'a.=' (use --config section.name=value)
234 abort: malformed --config option: 'a.=' (use --config section.name=value)
238 [10]
235 [10]
239 $ hg --cwd c --config .b= tip -q
236 $ hg --cwd c --config .b= tip -q
240 abort: malformed --config option: '.b=' (use --config section.name=value)
237 abort: malformed --config option: '.b=' (use --config section.name=value)
241 [10]
238 [10]
242 #endif
239 #endif
243
240
244 Testing --debug:
241 Testing --debug:
245
242
246 $ hg --cwd c log --debug
243 $ hg --cwd c log --debug
247 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
244 changeset: 1:b6c483daf2907ce5825c0bb50f5716226281cc1a
248 tag: tip
245 tag: tip
249 phase: public
246 phase: public
250 parent: -1:0000000000000000000000000000000000000000
247 parent: -1:0000000000000000000000000000000000000000
251 parent: -1:0000000000000000000000000000000000000000
248 parent: -1:0000000000000000000000000000000000000000
252 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
249 manifest: 1:23226e7a252cacdc2d99e4fbdc3653441056de49
253 user: test
250 user: test
254 date: Thu Jan 01 00:00:01 1970 +0000
251 date: Thu Jan 01 00:00:01 1970 +0000
255 files+: b
252 files+: b
256 extra: branch=default
253 extra: branch=default
257 description:
254 description:
258 b
255 b
259
256
260
257
261 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
258 changeset: 0:8580ff50825a50c8f716709acdf8de0deddcd6ab
262 phase: public
259 phase: public
263 parent: -1:0000000000000000000000000000000000000000
260 parent: -1:0000000000000000000000000000000000000000
264 parent: -1:0000000000000000000000000000000000000000
261 parent: -1:0000000000000000000000000000000000000000
265 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
262 manifest: 0:a0c8bcbbb45c63b90b70ad007bf38961f64f2af0
266 user: test
263 user: test
267 date: Thu Jan 01 00:00:01 1970 +0000
264 date: Thu Jan 01 00:00:01 1970 +0000
268 files+: a
265 files+: a
269 extra: branch=default
266 extra: branch=default
270 description:
267 description:
271 a
268 a
272
269
273
270
274
271
275 Testing --traceback:
272 Testing --traceback:
276
273
277 #if no-chg no-rhg
274 #if no-chg no-rhg
278 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
275 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
279 Traceback (most recent call last):
276 Traceback (most recent call last):
280 Traceback (most recent call last): (py3 !)
277 Traceback (most recent call last): (py3 !)
281 #else
278 #else
282 Traceback for '--config' errors not supported with chg.
279 Traceback for '--config' errors not supported with chg.
283 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
280 $ hg --cwd c --config x --traceback id 2>&1 | grep -i 'traceback'
284 [1]
281 [1]
285 #endif
282 #endif
286
283
287 Testing --time:
284 Testing --time:
288
285
289 $ hg --cwd a --time id
286 $ hg --cwd a --time id
290 8580ff50825a tip
287 8580ff50825a tip
291 time: real * (glob)
288 time: real * (glob)
292
289
293 Testing --version:
290 Testing --version:
294
291
295 $ hg --version -q
292 $ hg --version -q
296 Mercurial Distributed SCM * (glob)
293 Mercurial Distributed SCM * (glob)
297
294
298 hide outer repo
295 hide outer repo
299 $ hg init
296 $ hg init
300
297
301 Testing -h/--help:
298 Testing -h/--help:
302
299
303 #if no-extraextensions
300 #if no-extraextensions
304
301
305 $ hg -h
302 $ hg -h
306 Mercurial Distributed SCM
303 Mercurial Distributed SCM
307
304
308 list of commands:
305 list of commands:
309
306
310 Repository creation:
307 Repository creation:
311
308
312 clone make a copy of an existing repository
309 clone make a copy of an existing repository
313 init create a new repository in the given directory
310 init create a new repository in the given directory
314
311
315 Remote repository management:
312 Remote repository management:
316
313
317 incoming show new changesets found in source
314 incoming show new changesets found in source
318 outgoing show changesets not found in the destination
315 outgoing show changesets not found in the destination
319 paths show aliases for remote repositories
316 paths show aliases for remote repositories
320 pull pull changes from the specified source
317 pull pull changes from the specified source
321 push push changes to the specified destination
318 push push changes to the specified destination
322 serve start stand-alone webserver
319 serve start stand-alone webserver
323
320
324 Change creation:
321 Change creation:
325
322
326 commit commit the specified files or all outstanding changes
323 commit commit the specified files or all outstanding changes
327
324
328 Change manipulation:
325 Change manipulation:
329
326
330 backout reverse effect of earlier changeset
327 backout reverse effect of earlier changeset
331 graft copy changes from other branches onto the current branch
328 graft copy changes from other branches onto the current branch
332 merge merge another revision into working directory
329 merge merge another revision into working directory
333
330
334 Change organization:
331 Change organization:
335
332
336 bookmarks create a new bookmark or list existing bookmarks
333 bookmarks create a new bookmark or list existing bookmarks
337 branch set or show the current branch name
334 branch set or show the current branch name
338 branches list repository named branches
335 branches list repository named branches
339 phase set or show the current phase name
336 phase set or show the current phase name
340 tag add one or more tags for the current or given revision
337 tag add one or more tags for the current or given revision
341 tags list repository tags
338 tags list repository tags
342
339
343 File content management:
340 File content management:
344
341
345 annotate show changeset information by line for each file
342 annotate show changeset information by line for each file
346 cat output the current or given revision of files
343 cat output the current or given revision of files
347 copy mark files as copied for the next commit
344 copy mark files as copied for the next commit
348 diff diff repository (or selected files)
345 diff diff repository (or selected files)
349 grep search for a pattern in specified files
346 grep search for a pattern in specified files
350
347
351 Change navigation:
348 Change navigation:
352
349
353 bisect subdivision search of changesets
350 bisect subdivision search of changesets
354 heads show branch heads
351 heads show branch heads
355 identify identify the working directory or specified revision
352 identify identify the working directory or specified revision
356 log show revision history of entire repository or files
353 log show revision history of entire repository or files
357
354
358 Working directory management:
355 Working directory management:
359
356
360 add add the specified files on the next commit
357 add add the specified files on the next commit
361 addremove add all new files, delete all missing files
358 addremove add all new files, delete all missing files
362 files list tracked files
359 files list tracked files
363 forget forget the specified files on the next commit
360 forget forget the specified files on the next commit
364 purge removes files not tracked by Mercurial
361 purge removes files not tracked by Mercurial
365 remove remove the specified files on the next commit
362 remove remove the specified files on the next commit
366 rename rename files; equivalent of copy + remove
363 rename rename files; equivalent of copy + remove
367 resolve redo merges or set/view the merge status of files
364 resolve redo merges or set/view the merge status of files
368 revert restore files to their checkout state
365 revert restore files to their checkout state
369 root print the root (top) of the current working directory
366 root print the root (top) of the current working directory
370 shelve save and set aside changes from the working directory
367 shelve save and set aside changes from the working directory
371 status show changed files in the working directory
368 status show changed files in the working directory
372 summary summarize working directory state
369 summary summarize working directory state
373 unshelve restore a shelved change to the working directory
370 unshelve restore a shelved change to the working directory
374 update update working directory (or switch revisions)
371 update update working directory (or switch revisions)
375
372
376 Change import/export:
373 Change import/export:
377
374
378 archive create an unversioned archive of a repository revision
375 archive create an unversioned archive of a repository revision
379 bundle create a bundle file
376 bundle create a bundle file
380 export dump the header and diffs for one or more changesets
377 export dump the header and diffs for one or more changesets
381 import import an ordered set of patches
378 import import an ordered set of patches
382 unbundle apply one or more bundle files
379 unbundle apply one or more bundle files
383
380
384 Repository maintenance:
381 Repository maintenance:
385
382
386 manifest output the current or given revision of the project manifest
383 manifest output the current or given revision of the project manifest
387 recover roll back an interrupted transaction
384 recover roll back an interrupted transaction
388 verify verify the integrity of the repository
385 verify verify the integrity of the repository
389
386
390 Help:
387 Help:
391
388
392 config show combined config settings from all hgrc files
389 config show combined config settings from all hgrc files
393 help show help for a given topic or a help overview
390 help show help for a given topic or a help overview
394 version output version and copyright information
391 version output version and copyright information
395
392
396 additional help topics:
393 additional help topics:
397
394
398 Mercurial identifiers:
395 Mercurial identifiers:
399
396
400 filesets Specifying File Sets
397 filesets Specifying File Sets
401 hgignore Syntax for Mercurial Ignore Files
398 hgignore Syntax for Mercurial Ignore Files
402 patterns File Name Patterns
399 patterns File Name Patterns
403 revisions Specifying Revisions
400 revisions Specifying Revisions
404 urls URL Paths
401 urls URL Paths
405
402
406 Mercurial output:
403 Mercurial output:
407
404
408 color Colorizing Outputs
405 color Colorizing Outputs
409 dates Date Formats
406 dates Date Formats
410 diffs Diff Formats
407 diffs Diff Formats
411 templating Template Usage
408 templating Template Usage
412
409
413 Mercurial configuration:
410 Mercurial configuration:
414
411
415 config Configuration Files
412 config Configuration Files
416 environment Environment Variables
413 environment Environment Variables
417 extensions Using Additional Features
414 extensions Using Additional Features
418 flags Command-line flags
415 flags Command-line flags
419 hgweb Configuring hgweb
416 hgweb Configuring hgweb
420 merge-tools Merge Tools
417 merge-tools Merge Tools
421 pager Pager Support
418 pager Pager Support
422
419
423 Concepts:
420 Concepts:
424
421
425 bundlespec Bundle File Formats
422 bundlespec Bundle File Formats
426 evolution Safely rewriting history (EXPERIMENTAL)
423 evolution Safely rewriting history (EXPERIMENTAL)
427 glossary Glossary
424 glossary Glossary
428 phases Working with Phases
425 phases Working with Phases
429 subrepos Subrepositories
426 subrepos Subrepositories
430
427
431 Miscellaneous:
428 Miscellaneous:
432
429
433 deprecated Deprecated Features
430 deprecated Deprecated Features
434 internals Technical implementation topics
431 internals Technical implementation topics
435 scripting Using Mercurial from scripts and automation
432 scripting Using Mercurial from scripts and automation
436
433
437 (use 'hg help -v' to show built-in aliases and global options)
434 (use 'hg help -v' to show built-in aliases and global options)
438
435
439 $ hg --help
436 $ hg --help
440 Mercurial Distributed SCM
437 Mercurial Distributed SCM
441
438
442 list of commands:
439 list of commands:
443
440
444 Repository creation:
441 Repository creation:
445
442
446 clone make a copy of an existing repository
443 clone make a copy of an existing repository
447 init create a new repository in the given directory
444 init create a new repository in the given directory
448
445
449 Remote repository management:
446 Remote repository management:
450
447
451 incoming show new changesets found in source
448 incoming show new changesets found in source
452 outgoing show changesets not found in the destination
449 outgoing show changesets not found in the destination
453 paths show aliases for remote repositories
450 paths show aliases for remote repositories
454 pull pull changes from the specified source
451 pull pull changes from the specified source
455 push push changes to the specified destination
452 push push changes to the specified destination
456 serve start stand-alone webserver
453 serve start stand-alone webserver
457
454
458 Change creation:
455 Change creation:
459
456
460 commit commit the specified files or all outstanding changes
457 commit commit the specified files or all outstanding changes
461
458
462 Change manipulation:
459 Change manipulation:
463
460
464 backout reverse effect of earlier changeset
461 backout reverse effect of earlier changeset
465 graft copy changes from other branches onto the current branch
462 graft copy changes from other branches onto the current branch
466 merge merge another revision into working directory
463 merge merge another revision into working directory
467
464
468 Change organization:
465 Change organization:
469
466
470 bookmarks create a new bookmark or list existing bookmarks
467 bookmarks create a new bookmark or list existing bookmarks
471 branch set or show the current branch name
468 branch set or show the current branch name
472 branches list repository named branches
469 branches list repository named branches
473 phase set or show the current phase name
470 phase set or show the current phase name
474 tag add one or more tags for the current or given revision
471 tag add one or more tags for the current or given revision
475 tags list repository tags
472 tags list repository tags
476
473
477 File content management:
474 File content management:
478
475
479 annotate show changeset information by line for each file
476 annotate show changeset information by line for each file
480 cat output the current or given revision of files
477 cat output the current or given revision of files
481 copy mark files as copied for the next commit
478 copy mark files as copied for the next commit
482 diff diff repository (or selected files)
479 diff diff repository (or selected files)
483 grep search for a pattern in specified files
480 grep search for a pattern in specified files
484
481
485 Change navigation:
482 Change navigation:
486
483
487 bisect subdivision search of changesets
484 bisect subdivision search of changesets
488 heads show branch heads
485 heads show branch heads
489 identify identify the working directory or specified revision
486 identify identify the working directory or specified revision
490 log show revision history of entire repository or files
487 log show revision history of entire repository or files
491
488
492 Working directory management:
489 Working directory management:
493
490
494 add add the specified files on the next commit
491 add add the specified files on the next commit
495 addremove add all new files, delete all missing files
492 addremove add all new files, delete all missing files
496 files list tracked files
493 files list tracked files
497 forget forget the specified files on the next commit
494 forget forget the specified files on the next commit
498 purge removes files not tracked by Mercurial
495 purge removes files not tracked by Mercurial
499 remove remove the specified files on the next commit
496 remove remove the specified files on the next commit
500 rename rename files; equivalent of copy + remove
497 rename rename files; equivalent of copy + remove
501 resolve redo merges or set/view the merge status of files
498 resolve redo merges or set/view the merge status of files
502 revert restore files to their checkout state
499 revert restore files to their checkout state
503 root print the root (top) of the current working directory
500 root print the root (top) of the current working directory
504 shelve save and set aside changes from the working directory
501 shelve save and set aside changes from the working directory
505 status show changed files in the working directory
502 status show changed files in the working directory
506 summary summarize working directory state
503 summary summarize working directory state
507 unshelve restore a shelved change to the working directory
504 unshelve restore a shelved change to the working directory
508 update update working directory (or switch revisions)
505 update update working directory (or switch revisions)
509
506
510 Change import/export:
507 Change import/export:
511
508
512 archive create an unversioned archive of a repository revision
509 archive create an unversioned archive of a repository revision
513 bundle create a bundle file
510 bundle create a bundle file
514 export dump the header and diffs for one or more changesets
511 export dump the header and diffs for one or more changesets
515 import import an ordered set of patches
512 import import an ordered set of patches
516 unbundle apply one or more bundle files
513 unbundle apply one or more bundle files
517
514
518 Repository maintenance:
515 Repository maintenance:
519
516
520 manifest output the current or given revision of the project manifest
517 manifest output the current or given revision of the project manifest
521 recover roll back an interrupted transaction
518 recover roll back an interrupted transaction
522 verify verify the integrity of the repository
519 verify verify the integrity of the repository
523
520
524 Help:
521 Help:
525
522
526 config show combined config settings from all hgrc files
523 config show combined config settings from all hgrc files
527 help show help for a given topic or a help overview
524 help show help for a given topic or a help overview
528 version output version and copyright information
525 version output version and copyright information
529
526
530 additional help topics:
527 additional help topics:
531
528
532 Mercurial identifiers:
529 Mercurial identifiers:
533
530
534 filesets Specifying File Sets
531 filesets Specifying File Sets
535 hgignore Syntax for Mercurial Ignore Files
532 hgignore Syntax for Mercurial Ignore Files
536 patterns File Name Patterns
533 patterns File Name Patterns
537 revisions Specifying Revisions
534 revisions Specifying Revisions
538 urls URL Paths
535 urls URL Paths
539
536
540 Mercurial output:
537 Mercurial output:
541
538
542 color Colorizing Outputs
539 color Colorizing Outputs
543 dates Date Formats
540 dates Date Formats
544 diffs Diff Formats
541 diffs Diff Formats
545 templating Template Usage
542 templating Template Usage
546
543
547 Mercurial configuration:
544 Mercurial configuration:
548
545
549 config Configuration Files
546 config Configuration Files
550 environment Environment Variables
547 environment Environment Variables
551 extensions Using Additional Features
548 extensions Using Additional Features
552 flags Command-line flags
549 flags Command-line flags
553 hgweb Configuring hgweb
550 hgweb Configuring hgweb
554 merge-tools Merge Tools
551 merge-tools Merge Tools
555 pager Pager Support
552 pager Pager Support
556
553
557 Concepts:
554 Concepts:
558
555
559 bundlespec Bundle File Formats
556 bundlespec Bundle File Formats
560 evolution Safely rewriting history (EXPERIMENTAL)
557 evolution Safely rewriting history (EXPERIMENTAL)
561 glossary Glossary
558 glossary Glossary
562 phases Working with Phases
559 phases Working with Phases
563 subrepos Subrepositories
560 subrepos Subrepositories
564
561
565 Miscellaneous:
562 Miscellaneous:
566
563
567 deprecated Deprecated Features
564 deprecated Deprecated Features
568 internals Technical implementation topics
565 internals Technical implementation topics
569 scripting Using Mercurial from scripts and automation
566 scripting Using Mercurial from scripts and automation
570
567
571 (use 'hg help -v' to show built-in aliases and global options)
568 (use 'hg help -v' to show built-in aliases and global options)
572
569
573 #endif
570 #endif
574
571
575 Not tested: --debugger
572 Not tested: --debugger
576
573
General Comments 0
You need to be logged in to leave comments. Login now