##// END OF EJS Templates
copies-rust: move CPU-heavy Rust processing into a child thread...
Simon Sapin -
r47330:47557ea7 default
parent child Browse files
Show More
@@ -1,2617 +1,2622 b''
1 1 # configitems.py - centralized declaration of configuration option
2 2 #
3 3 # Copyright 2017 Pierre-Yves David <pierre-yves.david@octobus.net>
4 4 #
5 5 # This software may be used and distributed according to the terms of the
6 6 # GNU General Public License version 2 or any later version.
7 7
8 8 from __future__ import absolute_import
9 9
10 10 import functools
11 11 import re
12 12
13 13 from . import (
14 14 encoding,
15 15 error,
16 16 )
17 17
18 18
19 19 def loadconfigtable(ui, extname, configtable):
20 20 """update config item known to the ui with the extension ones"""
21 21 for section, items in sorted(configtable.items()):
22 22 knownitems = ui._knownconfig.setdefault(section, itemregister())
23 23 knownkeys = set(knownitems)
24 24 newkeys = set(items)
25 25 for key in sorted(knownkeys & newkeys):
26 26 msg = b"extension '%s' overwrite config item '%s.%s'"
27 27 msg %= (extname, section, key)
28 28 ui.develwarn(msg, config=b'warn-config')
29 29
30 30 knownitems.update(items)
31 31
32 32
33 33 class configitem(object):
34 34 """represent a known config item
35 35
36 36 :section: the official config section where to find this item,
37 37 :name: the official name within the section,
38 38 :default: default value for this item,
39 39 :alias: optional list of tuples as alternatives,
40 40 :generic: this is a generic definition, match name using regular expression.
41 41 """
42 42
43 43 def __init__(
44 44 self,
45 45 section,
46 46 name,
47 47 default=None,
48 48 alias=(),
49 49 generic=False,
50 50 priority=0,
51 51 experimental=False,
52 52 ):
53 53 self.section = section
54 54 self.name = name
55 55 self.default = default
56 56 self.alias = list(alias)
57 57 self.generic = generic
58 58 self.priority = priority
59 59 self.experimental = experimental
60 60 self._re = None
61 61 if generic:
62 62 self._re = re.compile(self.name)
63 63
64 64
65 65 class itemregister(dict):
66 66 """A specialized dictionary that can handle wild-card selection"""
67 67
68 68 def __init__(self):
69 69 super(itemregister, self).__init__()
70 70 self._generics = set()
71 71
72 72 def update(self, other):
73 73 super(itemregister, self).update(other)
74 74 self._generics.update(other._generics)
75 75
76 76 def __setitem__(self, key, item):
77 77 super(itemregister, self).__setitem__(key, item)
78 78 if item.generic:
79 79 self._generics.add(item)
80 80
81 81 def get(self, key):
82 82 baseitem = super(itemregister, self).get(key)
83 83 if baseitem is not None and not baseitem.generic:
84 84 return baseitem
85 85
86 86 # search for a matching generic item
87 87 generics = sorted(self._generics, key=(lambda x: (x.priority, x.name)))
88 88 for item in generics:
89 89 # we use 'match' instead of 'search' to make the matching simpler
90 90 # for people unfamiliar with regular expression. Having the match
91 91 # rooted to the start of the string will produce less surprising
92 92 # result for user writing simple regex for sub-attribute.
93 93 #
94 94 # For example using "color\..*" match produces an unsurprising
95 95 # result, while using search could suddenly match apparently
96 96 # unrelated configuration that happens to contains "color."
97 97 # anywhere. This is a tradeoff where we favor requiring ".*" on
98 98 # some match to avoid the need to prefix most pattern with "^".
99 99 # The "^" seems more error prone.
100 100 if item._re.match(key):
101 101 return item
102 102
103 103 return None
104 104
105 105
106 106 coreitems = {}
107 107
108 108
109 109 def _register(configtable, *args, **kwargs):
110 110 item = configitem(*args, **kwargs)
111 111 section = configtable.setdefault(item.section, itemregister())
112 112 if item.name in section:
113 113 msg = b"duplicated config item registration for '%s.%s'"
114 114 raise error.ProgrammingError(msg % (item.section, item.name))
115 115 section[item.name] = item
116 116
117 117
118 118 # special value for case where the default is derived from other values
119 119 dynamicdefault = object()
120 120
121 121 # Registering actual config items
122 122
123 123
124 124 def getitemregister(configtable):
125 125 f = functools.partial(_register, configtable)
126 126 # export pseudo enum as configitem.*
127 127 f.dynamicdefault = dynamicdefault
128 128 return f
129 129
130 130
131 131 coreconfigitem = getitemregister(coreitems)
132 132
133 133
134 134 def _registerdiffopts(section, configprefix=b''):
135 135 coreconfigitem(
136 136 section,
137 137 configprefix + b'nodates',
138 138 default=False,
139 139 )
140 140 coreconfigitem(
141 141 section,
142 142 configprefix + b'showfunc',
143 143 default=False,
144 144 )
145 145 coreconfigitem(
146 146 section,
147 147 configprefix + b'unified',
148 148 default=None,
149 149 )
150 150 coreconfigitem(
151 151 section,
152 152 configprefix + b'git',
153 153 default=False,
154 154 )
155 155 coreconfigitem(
156 156 section,
157 157 configprefix + b'ignorews',
158 158 default=False,
159 159 )
160 160 coreconfigitem(
161 161 section,
162 162 configprefix + b'ignorewsamount',
163 163 default=False,
164 164 )
165 165 coreconfigitem(
166 166 section,
167 167 configprefix + b'ignoreblanklines',
168 168 default=False,
169 169 )
170 170 coreconfigitem(
171 171 section,
172 172 configprefix + b'ignorewseol',
173 173 default=False,
174 174 )
175 175 coreconfigitem(
176 176 section,
177 177 configprefix + b'nobinary',
178 178 default=False,
179 179 )
180 180 coreconfigitem(
181 181 section,
182 182 configprefix + b'noprefix',
183 183 default=False,
184 184 )
185 185 coreconfigitem(
186 186 section,
187 187 configprefix + b'word-diff',
188 188 default=False,
189 189 )
190 190
191 191
192 192 coreconfigitem(
193 193 b'alias',
194 194 b'.*',
195 195 default=dynamicdefault,
196 196 generic=True,
197 197 )
198 198 coreconfigitem(
199 199 b'auth',
200 200 b'cookiefile',
201 201 default=None,
202 202 )
203 203 _registerdiffopts(section=b'annotate')
204 204 # bookmarks.pushing: internal hack for discovery
205 205 coreconfigitem(
206 206 b'bookmarks',
207 207 b'pushing',
208 208 default=list,
209 209 )
210 210 # bundle.mainreporoot: internal hack for bundlerepo
211 211 coreconfigitem(
212 212 b'bundle',
213 213 b'mainreporoot',
214 214 default=b'',
215 215 )
216 216 coreconfigitem(
217 217 b'censor',
218 218 b'policy',
219 219 default=b'abort',
220 220 experimental=True,
221 221 )
222 222 coreconfigitem(
223 223 b'chgserver',
224 224 b'idletimeout',
225 225 default=3600,
226 226 )
227 227 coreconfigitem(
228 228 b'chgserver',
229 229 b'skiphash',
230 230 default=False,
231 231 )
232 232 coreconfigitem(
233 233 b'cmdserver',
234 234 b'log',
235 235 default=None,
236 236 )
237 237 coreconfigitem(
238 238 b'cmdserver',
239 239 b'max-log-files',
240 240 default=7,
241 241 )
242 242 coreconfigitem(
243 243 b'cmdserver',
244 244 b'max-log-size',
245 245 default=b'1 MB',
246 246 )
247 247 coreconfigitem(
248 248 b'cmdserver',
249 249 b'max-repo-cache',
250 250 default=0,
251 251 experimental=True,
252 252 )
253 253 coreconfigitem(
254 254 b'cmdserver',
255 255 b'message-encodings',
256 256 default=list,
257 257 )
258 258 coreconfigitem(
259 259 b'cmdserver',
260 260 b'track-log',
261 261 default=lambda: [b'chgserver', b'cmdserver', b'repocache'],
262 262 )
263 263 coreconfigitem(
264 264 b'cmdserver',
265 265 b'shutdown-on-interrupt',
266 266 default=True,
267 267 )
268 268 coreconfigitem(
269 269 b'color',
270 270 b'.*',
271 271 default=None,
272 272 generic=True,
273 273 )
274 274 coreconfigitem(
275 275 b'color',
276 276 b'mode',
277 277 default=b'auto',
278 278 )
279 279 coreconfigitem(
280 280 b'color',
281 281 b'pagermode',
282 282 default=dynamicdefault,
283 283 )
284 284 coreconfigitem(
285 285 b'command-templates',
286 286 b'graphnode',
287 287 default=None,
288 288 alias=[(b'ui', b'graphnodetemplate')],
289 289 )
290 290 coreconfigitem(
291 291 b'command-templates',
292 292 b'log',
293 293 default=None,
294 294 alias=[(b'ui', b'logtemplate')],
295 295 )
296 296 coreconfigitem(
297 297 b'command-templates',
298 298 b'mergemarker',
299 299 default=(
300 300 b'{node|short} '
301 301 b'{ifeq(tags, "tip", "", '
302 302 b'ifeq(tags, "", "", "{tags} "))}'
303 303 b'{if(bookmarks, "{bookmarks} ")}'
304 304 b'{ifeq(branch, "default", "", "{branch} ")}'
305 305 b'- {author|user}: {desc|firstline}'
306 306 ),
307 307 alias=[(b'ui', b'mergemarkertemplate')],
308 308 )
309 309 coreconfigitem(
310 310 b'command-templates',
311 311 b'pre-merge-tool-output',
312 312 default=None,
313 313 alias=[(b'ui', b'pre-merge-tool-output-template')],
314 314 )
315 315 coreconfigitem(
316 316 b'command-templates',
317 317 b'oneline-summary',
318 318 default=None,
319 319 )
320 320 coreconfigitem(
321 321 b'command-templates',
322 322 b'oneline-summary.*',
323 323 default=dynamicdefault,
324 324 generic=True,
325 325 )
326 326 _registerdiffopts(section=b'commands', configprefix=b'commit.interactive.')
327 327 coreconfigitem(
328 328 b'commands',
329 329 b'commit.post-status',
330 330 default=False,
331 331 )
332 332 coreconfigitem(
333 333 b'commands',
334 334 b'grep.all-files',
335 335 default=False,
336 336 experimental=True,
337 337 )
338 338 coreconfigitem(
339 339 b'commands',
340 340 b'merge.require-rev',
341 341 default=False,
342 342 )
343 343 coreconfigitem(
344 344 b'commands',
345 345 b'push.require-revs',
346 346 default=False,
347 347 )
348 348 coreconfigitem(
349 349 b'commands',
350 350 b'resolve.confirm',
351 351 default=False,
352 352 )
353 353 coreconfigitem(
354 354 b'commands',
355 355 b'resolve.explicit-re-merge',
356 356 default=False,
357 357 )
358 358 coreconfigitem(
359 359 b'commands',
360 360 b'resolve.mark-check',
361 361 default=b'none',
362 362 )
363 363 _registerdiffopts(section=b'commands', configprefix=b'revert.interactive.')
364 364 coreconfigitem(
365 365 b'commands',
366 366 b'show.aliasprefix',
367 367 default=list,
368 368 )
369 369 coreconfigitem(
370 370 b'commands',
371 371 b'status.relative',
372 372 default=False,
373 373 )
374 374 coreconfigitem(
375 375 b'commands',
376 376 b'status.skipstates',
377 377 default=[],
378 378 experimental=True,
379 379 )
380 380 coreconfigitem(
381 381 b'commands',
382 382 b'status.terse',
383 383 default=b'',
384 384 )
385 385 coreconfigitem(
386 386 b'commands',
387 387 b'status.verbose',
388 388 default=False,
389 389 )
390 390 coreconfigitem(
391 391 b'commands',
392 392 b'update.check',
393 393 default=None,
394 394 )
395 395 coreconfigitem(
396 396 b'commands',
397 397 b'update.requiredest',
398 398 default=False,
399 399 )
400 400 coreconfigitem(
401 401 b'committemplate',
402 402 b'.*',
403 403 default=None,
404 404 generic=True,
405 405 )
406 406 coreconfigitem(
407 407 b'convert',
408 408 b'bzr.saverev',
409 409 default=True,
410 410 )
411 411 coreconfigitem(
412 412 b'convert',
413 413 b'cvsps.cache',
414 414 default=True,
415 415 )
416 416 coreconfigitem(
417 417 b'convert',
418 418 b'cvsps.fuzz',
419 419 default=60,
420 420 )
421 421 coreconfigitem(
422 422 b'convert',
423 423 b'cvsps.logencoding',
424 424 default=None,
425 425 )
426 426 coreconfigitem(
427 427 b'convert',
428 428 b'cvsps.mergefrom',
429 429 default=None,
430 430 )
431 431 coreconfigitem(
432 432 b'convert',
433 433 b'cvsps.mergeto',
434 434 default=None,
435 435 )
436 436 coreconfigitem(
437 437 b'convert',
438 438 b'git.committeractions',
439 439 default=lambda: [b'messagedifferent'],
440 440 )
441 441 coreconfigitem(
442 442 b'convert',
443 443 b'git.extrakeys',
444 444 default=list,
445 445 )
446 446 coreconfigitem(
447 447 b'convert',
448 448 b'git.findcopiesharder',
449 449 default=False,
450 450 )
451 451 coreconfigitem(
452 452 b'convert',
453 453 b'git.remoteprefix',
454 454 default=b'remote',
455 455 )
456 456 coreconfigitem(
457 457 b'convert',
458 458 b'git.renamelimit',
459 459 default=400,
460 460 )
461 461 coreconfigitem(
462 462 b'convert',
463 463 b'git.saverev',
464 464 default=True,
465 465 )
466 466 coreconfigitem(
467 467 b'convert',
468 468 b'git.similarity',
469 469 default=50,
470 470 )
471 471 coreconfigitem(
472 472 b'convert',
473 473 b'git.skipsubmodules',
474 474 default=False,
475 475 )
476 476 coreconfigitem(
477 477 b'convert',
478 478 b'hg.clonebranches',
479 479 default=False,
480 480 )
481 481 coreconfigitem(
482 482 b'convert',
483 483 b'hg.ignoreerrors',
484 484 default=False,
485 485 )
486 486 coreconfigitem(
487 487 b'convert',
488 488 b'hg.preserve-hash',
489 489 default=False,
490 490 )
491 491 coreconfigitem(
492 492 b'convert',
493 493 b'hg.revs',
494 494 default=None,
495 495 )
496 496 coreconfigitem(
497 497 b'convert',
498 498 b'hg.saverev',
499 499 default=False,
500 500 )
501 501 coreconfigitem(
502 502 b'convert',
503 503 b'hg.sourcename',
504 504 default=None,
505 505 )
506 506 coreconfigitem(
507 507 b'convert',
508 508 b'hg.startrev',
509 509 default=None,
510 510 )
511 511 coreconfigitem(
512 512 b'convert',
513 513 b'hg.tagsbranch',
514 514 default=b'default',
515 515 )
516 516 coreconfigitem(
517 517 b'convert',
518 518 b'hg.usebranchnames',
519 519 default=True,
520 520 )
521 521 coreconfigitem(
522 522 b'convert',
523 523 b'ignoreancestorcheck',
524 524 default=False,
525 525 experimental=True,
526 526 )
527 527 coreconfigitem(
528 528 b'convert',
529 529 b'localtimezone',
530 530 default=False,
531 531 )
532 532 coreconfigitem(
533 533 b'convert',
534 534 b'p4.encoding',
535 535 default=dynamicdefault,
536 536 )
537 537 coreconfigitem(
538 538 b'convert',
539 539 b'p4.startrev',
540 540 default=0,
541 541 )
542 542 coreconfigitem(
543 543 b'convert',
544 544 b'skiptags',
545 545 default=False,
546 546 )
547 547 coreconfigitem(
548 548 b'convert',
549 549 b'svn.debugsvnlog',
550 550 default=True,
551 551 )
552 552 coreconfigitem(
553 553 b'convert',
554 554 b'svn.trunk',
555 555 default=None,
556 556 )
557 557 coreconfigitem(
558 558 b'convert',
559 559 b'svn.tags',
560 560 default=None,
561 561 )
562 562 coreconfigitem(
563 563 b'convert',
564 564 b'svn.branches',
565 565 default=None,
566 566 )
567 567 coreconfigitem(
568 568 b'convert',
569 569 b'svn.startrev',
570 570 default=0,
571 571 )
572 572 coreconfigitem(
573 573 b'convert',
574 574 b'svn.dangerous-set-commit-dates',
575 575 default=False,
576 576 )
577 577 coreconfigitem(
578 578 b'debug',
579 579 b'dirstate.delaywrite',
580 580 default=0,
581 581 )
582 582 coreconfigitem(
583 583 b'defaults',
584 584 b'.*',
585 585 default=None,
586 586 generic=True,
587 587 )
588 588 coreconfigitem(
589 589 b'devel',
590 590 b'all-warnings',
591 591 default=False,
592 592 )
593 593 coreconfigitem(
594 594 b'devel',
595 595 b'bundle2.debug',
596 596 default=False,
597 597 )
598 598 coreconfigitem(
599 599 b'devel',
600 600 b'bundle.delta',
601 601 default=b'',
602 602 )
603 603 coreconfigitem(
604 604 b'devel',
605 605 b'cache-vfs',
606 606 default=None,
607 607 )
608 608 coreconfigitem(
609 609 b'devel',
610 610 b'check-locks',
611 611 default=False,
612 612 )
613 613 coreconfigitem(
614 614 b'devel',
615 615 b'check-relroot',
616 616 default=False,
617 617 )
618 618 # Track copy information for all file, not just "added" one (very slow)
619 619 coreconfigitem(
620 620 b'devel',
621 621 b'copy-tracing.trace-all-files',
622 622 default=False,
623 623 )
624 624 coreconfigitem(
625 625 b'devel',
626 626 b'default-date',
627 627 default=None,
628 628 )
629 629 coreconfigitem(
630 630 b'devel',
631 631 b'deprec-warn',
632 632 default=False,
633 633 )
634 634 coreconfigitem(
635 635 b'devel',
636 636 b'disableloaddefaultcerts',
637 637 default=False,
638 638 )
639 639 coreconfigitem(
640 640 b'devel',
641 641 b'warn-empty-changegroup',
642 642 default=False,
643 643 )
644 644 coreconfigitem(
645 645 b'devel',
646 646 b'legacy.exchange',
647 647 default=list,
648 648 )
649 649 # When True, revlogs use a special reference version of the nodemap, that is not
650 650 # performant but is "known" to behave properly.
651 651 coreconfigitem(
652 652 b'devel',
653 653 b'persistent-nodemap',
654 654 default=False,
655 655 )
656 656 coreconfigitem(
657 657 b'devel',
658 658 b'servercafile',
659 659 default=b'',
660 660 )
661 661 coreconfigitem(
662 662 b'devel',
663 663 b'serverexactprotocol',
664 664 default=b'',
665 665 )
666 666 coreconfigitem(
667 667 b'devel',
668 668 b'serverrequirecert',
669 669 default=False,
670 670 )
671 671 coreconfigitem(
672 672 b'devel',
673 673 b'strip-obsmarkers',
674 674 default=True,
675 675 )
676 676 coreconfigitem(
677 677 b'devel',
678 678 b'warn-config',
679 679 default=None,
680 680 )
681 681 coreconfigitem(
682 682 b'devel',
683 683 b'warn-config-default',
684 684 default=None,
685 685 )
686 686 coreconfigitem(
687 687 b'devel',
688 688 b'user.obsmarker',
689 689 default=None,
690 690 )
691 691 coreconfigitem(
692 692 b'devel',
693 693 b'warn-config-unknown',
694 694 default=None,
695 695 )
696 696 coreconfigitem(
697 697 b'devel',
698 698 b'debug.copies',
699 699 default=False,
700 700 )
701 701 coreconfigitem(
702 702 b'devel',
703 b'copy-tracing.multi-thread',
704 default=True,
705 )
706 coreconfigitem(
707 b'devel',
703 708 b'debug.extensions',
704 709 default=False,
705 710 )
706 711 coreconfigitem(
707 712 b'devel',
708 713 b'debug.repo-filters',
709 714 default=False,
710 715 )
711 716 coreconfigitem(
712 717 b'devel',
713 718 b'debug.peer-request',
714 719 default=False,
715 720 )
716 721 # If discovery.exchange-heads is False, the discovery will not start with
717 722 # remote head fetching and local head querying.
718 723 coreconfigitem(
719 724 b'devel',
720 725 b'discovery.exchange-heads',
721 726 default=True,
722 727 )
723 728 # If discovery.grow-sample is False, the sample size used in set discovery will
724 729 # not be increased through the process
725 730 coreconfigitem(
726 731 b'devel',
727 732 b'discovery.grow-sample',
728 733 default=True,
729 734 )
730 735 # discovery.grow-sample.rate control the rate at which the sample grow
731 736 coreconfigitem(
732 737 b'devel',
733 738 b'discovery.grow-sample.rate',
734 739 default=1.05,
735 740 )
736 741 # If discovery.randomize is False, random sampling during discovery are
737 742 # deterministic. It is meant for integration tests.
738 743 coreconfigitem(
739 744 b'devel',
740 745 b'discovery.randomize',
741 746 default=True,
742 747 )
743 748 # Control the initial size of the discovery sample
744 749 coreconfigitem(
745 750 b'devel',
746 751 b'discovery.sample-size',
747 752 default=200,
748 753 )
749 754 # Control the initial size of the discovery for initial change
750 755 coreconfigitem(
751 756 b'devel',
752 757 b'discovery.sample-size.initial',
753 758 default=100,
754 759 )
755 760 _registerdiffopts(section=b'diff')
756 761 coreconfigitem(
757 762 b'diff',
758 763 b'merge',
759 764 default=False,
760 765 experimental=True,
761 766 )
762 767 coreconfigitem(
763 768 b'email',
764 769 b'bcc',
765 770 default=None,
766 771 )
767 772 coreconfigitem(
768 773 b'email',
769 774 b'cc',
770 775 default=None,
771 776 )
772 777 coreconfigitem(
773 778 b'email',
774 779 b'charsets',
775 780 default=list,
776 781 )
777 782 coreconfigitem(
778 783 b'email',
779 784 b'from',
780 785 default=None,
781 786 )
782 787 coreconfigitem(
783 788 b'email',
784 789 b'method',
785 790 default=b'smtp',
786 791 )
787 792 coreconfigitem(
788 793 b'email',
789 794 b'reply-to',
790 795 default=None,
791 796 )
792 797 coreconfigitem(
793 798 b'email',
794 799 b'to',
795 800 default=None,
796 801 )
797 802 coreconfigitem(
798 803 b'experimental',
799 804 b'archivemetatemplate',
800 805 default=dynamicdefault,
801 806 )
802 807 coreconfigitem(
803 808 b'experimental',
804 809 b'auto-publish',
805 810 default=b'publish',
806 811 )
807 812 coreconfigitem(
808 813 b'experimental',
809 814 b'bundle-phases',
810 815 default=False,
811 816 )
812 817 coreconfigitem(
813 818 b'experimental',
814 819 b'bundle2-advertise',
815 820 default=True,
816 821 )
817 822 coreconfigitem(
818 823 b'experimental',
819 824 b'bundle2-output-capture',
820 825 default=False,
821 826 )
822 827 coreconfigitem(
823 828 b'experimental',
824 829 b'bundle2.pushback',
825 830 default=False,
826 831 )
827 832 coreconfigitem(
828 833 b'experimental',
829 834 b'bundle2lazylocking',
830 835 default=False,
831 836 )
832 837 coreconfigitem(
833 838 b'experimental',
834 839 b'bundlecomplevel',
835 840 default=None,
836 841 )
837 842 coreconfigitem(
838 843 b'experimental',
839 844 b'bundlecomplevel.bzip2',
840 845 default=None,
841 846 )
842 847 coreconfigitem(
843 848 b'experimental',
844 849 b'bundlecomplevel.gzip',
845 850 default=None,
846 851 )
847 852 coreconfigitem(
848 853 b'experimental',
849 854 b'bundlecomplevel.none',
850 855 default=None,
851 856 )
852 857 coreconfigitem(
853 858 b'experimental',
854 859 b'bundlecomplevel.zstd',
855 860 default=None,
856 861 )
857 862 coreconfigitem(
858 863 b'experimental',
859 864 b'changegroup3',
860 865 default=False,
861 866 )
862 867 coreconfigitem(
863 868 b'experimental',
864 869 b'cleanup-as-archived',
865 870 default=False,
866 871 )
867 872 coreconfigitem(
868 873 b'experimental',
869 874 b'clientcompressionengines',
870 875 default=list,
871 876 )
872 877 coreconfigitem(
873 878 b'experimental',
874 879 b'copytrace',
875 880 default=b'on',
876 881 )
877 882 coreconfigitem(
878 883 b'experimental',
879 884 b'copytrace.movecandidateslimit',
880 885 default=100,
881 886 )
882 887 coreconfigitem(
883 888 b'experimental',
884 889 b'copytrace.sourcecommitlimit',
885 890 default=100,
886 891 )
887 892 coreconfigitem(
888 893 b'experimental',
889 894 b'copies.read-from',
890 895 default=b"filelog-only",
891 896 )
892 897 coreconfigitem(
893 898 b'experimental',
894 899 b'copies.write-to',
895 900 default=b'filelog-only',
896 901 )
897 902 coreconfigitem(
898 903 b'experimental',
899 904 b'crecordtest',
900 905 default=None,
901 906 )
902 907 coreconfigitem(
903 908 b'experimental',
904 909 b'directaccess',
905 910 default=False,
906 911 )
907 912 coreconfigitem(
908 913 b'experimental',
909 914 b'directaccess.revnums',
910 915 default=False,
911 916 )
912 917 coreconfigitem(
913 918 b'experimental',
914 919 b'editortmpinhg',
915 920 default=False,
916 921 )
917 922 coreconfigitem(
918 923 b'experimental',
919 924 b'evolution',
920 925 default=list,
921 926 )
922 927 coreconfigitem(
923 928 b'experimental',
924 929 b'evolution.allowdivergence',
925 930 default=False,
926 931 alias=[(b'experimental', b'allowdivergence')],
927 932 )
928 933 coreconfigitem(
929 934 b'experimental',
930 935 b'evolution.allowunstable',
931 936 default=None,
932 937 )
933 938 coreconfigitem(
934 939 b'experimental',
935 940 b'evolution.createmarkers',
936 941 default=None,
937 942 )
938 943 coreconfigitem(
939 944 b'experimental',
940 945 b'evolution.effect-flags',
941 946 default=True,
942 947 alias=[(b'experimental', b'effect-flags')],
943 948 )
944 949 coreconfigitem(
945 950 b'experimental',
946 951 b'evolution.exchange',
947 952 default=None,
948 953 )
949 954 coreconfigitem(
950 955 b'experimental',
951 956 b'evolution.bundle-obsmarker',
952 957 default=False,
953 958 )
954 959 coreconfigitem(
955 960 b'experimental',
956 961 b'evolution.bundle-obsmarker:mandatory',
957 962 default=True,
958 963 )
959 964 coreconfigitem(
960 965 b'experimental',
961 966 b'log.topo',
962 967 default=False,
963 968 )
964 969 coreconfigitem(
965 970 b'experimental',
966 971 b'evolution.report-instabilities',
967 972 default=True,
968 973 )
969 974 coreconfigitem(
970 975 b'experimental',
971 976 b'evolution.track-operation',
972 977 default=True,
973 978 )
974 979 # repo-level config to exclude a revset visibility
975 980 #
976 981 # The target use case is to use `share` to expose different subset of the same
977 982 # repository, especially server side. See also `server.view`.
978 983 coreconfigitem(
979 984 b'experimental',
980 985 b'extra-filter-revs',
981 986 default=None,
982 987 )
983 988 coreconfigitem(
984 989 b'experimental',
985 990 b'maxdeltachainspan',
986 991 default=-1,
987 992 )
988 993 # tracks files which were undeleted (merge might delete them but we explicitly
989 994 # kept/undeleted them) and creates new filenodes for them
990 995 coreconfigitem(
991 996 b'experimental',
992 997 b'merge-track-salvaged',
993 998 default=False,
994 999 )
995 1000 coreconfigitem(
996 1001 b'experimental',
997 1002 b'mergetempdirprefix',
998 1003 default=None,
999 1004 )
1000 1005 coreconfigitem(
1001 1006 b'experimental',
1002 1007 b'mmapindexthreshold',
1003 1008 default=None,
1004 1009 )
1005 1010 coreconfigitem(
1006 1011 b'experimental',
1007 1012 b'narrow',
1008 1013 default=False,
1009 1014 )
1010 1015 coreconfigitem(
1011 1016 b'experimental',
1012 1017 b'nonnormalparanoidcheck',
1013 1018 default=False,
1014 1019 )
1015 1020 coreconfigitem(
1016 1021 b'experimental',
1017 1022 b'exportableenviron',
1018 1023 default=list,
1019 1024 )
1020 1025 coreconfigitem(
1021 1026 b'experimental',
1022 1027 b'extendedheader.index',
1023 1028 default=None,
1024 1029 )
1025 1030 coreconfigitem(
1026 1031 b'experimental',
1027 1032 b'extendedheader.similarity',
1028 1033 default=False,
1029 1034 )
1030 1035 coreconfigitem(
1031 1036 b'experimental',
1032 1037 b'graphshorten',
1033 1038 default=False,
1034 1039 )
1035 1040 coreconfigitem(
1036 1041 b'experimental',
1037 1042 b'graphstyle.parent',
1038 1043 default=dynamicdefault,
1039 1044 )
1040 1045 coreconfigitem(
1041 1046 b'experimental',
1042 1047 b'graphstyle.missing',
1043 1048 default=dynamicdefault,
1044 1049 )
1045 1050 coreconfigitem(
1046 1051 b'experimental',
1047 1052 b'graphstyle.grandparent',
1048 1053 default=dynamicdefault,
1049 1054 )
1050 1055 coreconfigitem(
1051 1056 b'experimental',
1052 1057 b'hook-track-tags',
1053 1058 default=False,
1054 1059 )
1055 1060 coreconfigitem(
1056 1061 b'experimental',
1057 1062 b'httppeer.advertise-v2',
1058 1063 default=False,
1059 1064 )
1060 1065 coreconfigitem(
1061 1066 b'experimental',
1062 1067 b'httppeer.v2-encoder-order',
1063 1068 default=None,
1064 1069 )
1065 1070 coreconfigitem(
1066 1071 b'experimental',
1067 1072 b'httppostargs',
1068 1073 default=False,
1069 1074 )
1070 1075 coreconfigitem(b'experimental', b'nointerrupt', default=False)
1071 1076 coreconfigitem(b'experimental', b'nointerrupt-interactiveonly', default=True)
1072 1077
1073 1078 coreconfigitem(
1074 1079 b'experimental',
1075 1080 b'obsmarkers-exchange-debug',
1076 1081 default=False,
1077 1082 )
1078 1083 coreconfigitem(
1079 1084 b'experimental',
1080 1085 b'remotenames',
1081 1086 default=False,
1082 1087 )
1083 1088 coreconfigitem(
1084 1089 b'experimental',
1085 1090 b'removeemptydirs',
1086 1091 default=True,
1087 1092 )
1088 1093 coreconfigitem(
1089 1094 b'experimental',
1090 1095 b'revert.interactive.select-to-keep',
1091 1096 default=False,
1092 1097 )
1093 1098 coreconfigitem(
1094 1099 b'experimental',
1095 1100 b'revisions.prefixhexnode',
1096 1101 default=False,
1097 1102 )
1098 1103 coreconfigitem(
1099 1104 b'experimental',
1100 1105 b'revlogv2',
1101 1106 default=None,
1102 1107 )
1103 1108 coreconfigitem(
1104 1109 b'experimental',
1105 1110 b'revisions.disambiguatewithin',
1106 1111 default=None,
1107 1112 )
1108 1113 coreconfigitem(
1109 1114 b'experimental',
1110 1115 b'rust.index',
1111 1116 default=False,
1112 1117 )
1113 1118 coreconfigitem(
1114 1119 b'experimental',
1115 1120 b'server.filesdata.recommended-batch-size',
1116 1121 default=50000,
1117 1122 )
1118 1123 coreconfigitem(
1119 1124 b'experimental',
1120 1125 b'server.manifestdata.recommended-batch-size',
1121 1126 default=100000,
1122 1127 )
1123 1128 coreconfigitem(
1124 1129 b'experimental',
1125 1130 b'server.stream-narrow-clones',
1126 1131 default=False,
1127 1132 )
1128 1133 coreconfigitem(
1129 1134 b'experimental',
1130 1135 b'single-head-per-branch',
1131 1136 default=False,
1132 1137 )
1133 1138 coreconfigitem(
1134 1139 b'experimental',
1135 1140 b'single-head-per-branch:account-closed-heads',
1136 1141 default=False,
1137 1142 )
1138 1143 coreconfigitem(
1139 1144 b'experimental',
1140 1145 b'single-head-per-branch:public-changes-only',
1141 1146 default=False,
1142 1147 )
1143 1148 coreconfigitem(
1144 1149 b'experimental',
1145 1150 b'sshserver.support-v2',
1146 1151 default=False,
1147 1152 )
1148 1153 coreconfigitem(
1149 1154 b'experimental',
1150 1155 b'sparse-read',
1151 1156 default=False,
1152 1157 )
1153 1158 coreconfigitem(
1154 1159 b'experimental',
1155 1160 b'sparse-read.density-threshold',
1156 1161 default=0.50,
1157 1162 )
1158 1163 coreconfigitem(
1159 1164 b'experimental',
1160 1165 b'sparse-read.min-gap-size',
1161 1166 default=b'65K',
1162 1167 )
1163 1168 coreconfigitem(
1164 1169 b'experimental',
1165 1170 b'treemanifest',
1166 1171 default=False,
1167 1172 )
1168 1173 coreconfigitem(
1169 1174 b'experimental',
1170 1175 b'update.atomic-file',
1171 1176 default=False,
1172 1177 )
1173 1178 coreconfigitem(
1174 1179 b'experimental',
1175 1180 b'sshpeer.advertise-v2',
1176 1181 default=False,
1177 1182 )
1178 1183 coreconfigitem(
1179 1184 b'experimental',
1180 1185 b'web.apiserver',
1181 1186 default=False,
1182 1187 )
1183 1188 coreconfigitem(
1184 1189 b'experimental',
1185 1190 b'web.api.http-v2',
1186 1191 default=False,
1187 1192 )
1188 1193 coreconfigitem(
1189 1194 b'experimental',
1190 1195 b'web.api.debugreflect',
1191 1196 default=False,
1192 1197 )
1193 1198 coreconfigitem(
1194 1199 b'experimental',
1195 1200 b'worker.wdir-get-thread-safe',
1196 1201 default=False,
1197 1202 )
1198 1203 coreconfigitem(
1199 1204 b'experimental',
1200 1205 b'worker.repository-upgrade',
1201 1206 default=False,
1202 1207 )
1203 1208 coreconfigitem(
1204 1209 b'experimental',
1205 1210 b'xdiff',
1206 1211 default=False,
1207 1212 )
1208 1213 coreconfigitem(
1209 1214 b'extensions',
1210 1215 b'.*',
1211 1216 default=None,
1212 1217 generic=True,
1213 1218 )
1214 1219 coreconfigitem(
1215 1220 b'extdata',
1216 1221 b'.*',
1217 1222 default=None,
1218 1223 generic=True,
1219 1224 )
1220 1225 coreconfigitem(
1221 1226 b'format',
1222 1227 b'bookmarks-in-store',
1223 1228 default=False,
1224 1229 )
1225 1230 coreconfigitem(
1226 1231 b'format',
1227 1232 b'chunkcachesize',
1228 1233 default=None,
1229 1234 experimental=True,
1230 1235 )
1231 1236 coreconfigitem(
1232 1237 b'format',
1233 1238 b'dotencode',
1234 1239 default=True,
1235 1240 )
1236 1241 coreconfigitem(
1237 1242 b'format',
1238 1243 b'generaldelta',
1239 1244 default=False,
1240 1245 experimental=True,
1241 1246 )
1242 1247 coreconfigitem(
1243 1248 b'format',
1244 1249 b'manifestcachesize',
1245 1250 default=None,
1246 1251 experimental=True,
1247 1252 )
1248 1253 coreconfigitem(
1249 1254 b'format',
1250 1255 b'maxchainlen',
1251 1256 default=dynamicdefault,
1252 1257 experimental=True,
1253 1258 )
1254 1259 coreconfigitem(
1255 1260 b'format',
1256 1261 b'obsstore-version',
1257 1262 default=None,
1258 1263 )
1259 1264 coreconfigitem(
1260 1265 b'format',
1261 1266 b'sparse-revlog',
1262 1267 default=True,
1263 1268 )
1264 1269 coreconfigitem(
1265 1270 b'format',
1266 1271 b'revlog-compression',
1267 1272 default=lambda: [b'zlib'],
1268 1273 alias=[(b'experimental', b'format.compression')],
1269 1274 )
1270 1275 coreconfigitem(
1271 1276 b'format',
1272 1277 b'usefncache',
1273 1278 default=True,
1274 1279 )
1275 1280 coreconfigitem(
1276 1281 b'format',
1277 1282 b'usegeneraldelta',
1278 1283 default=True,
1279 1284 )
1280 1285 coreconfigitem(
1281 1286 b'format',
1282 1287 b'usestore',
1283 1288 default=True,
1284 1289 )
1285 1290 coreconfigitem(
1286 1291 b'format',
1287 1292 b'use-persistent-nodemap',
1288 1293 default=False,
1289 1294 )
1290 1295 coreconfigitem(
1291 1296 b'format',
1292 1297 b'exp-use-copies-side-data-changeset',
1293 1298 default=False,
1294 1299 experimental=True,
1295 1300 )
1296 1301 coreconfigitem(
1297 1302 b'format',
1298 1303 b'exp-use-side-data',
1299 1304 default=False,
1300 1305 experimental=True,
1301 1306 )
1302 1307 coreconfigitem(
1303 1308 b'format',
1304 1309 b'use-share-safe',
1305 1310 default=False,
1306 1311 )
1307 1312 coreconfigitem(
1308 1313 b'format',
1309 1314 b'internal-phase',
1310 1315 default=False,
1311 1316 experimental=True,
1312 1317 )
1313 1318 coreconfigitem(
1314 1319 b'fsmonitor',
1315 1320 b'warn_when_unused',
1316 1321 default=True,
1317 1322 )
1318 1323 coreconfigitem(
1319 1324 b'fsmonitor',
1320 1325 b'warn_update_file_count',
1321 1326 default=50000,
1322 1327 )
1323 1328 coreconfigitem(
1324 1329 b'fsmonitor',
1325 1330 b'warn_update_file_count_rust',
1326 1331 default=400000,
1327 1332 )
1328 1333 coreconfigitem(
1329 1334 b'help',
1330 1335 br'hidden-command\..*',
1331 1336 default=False,
1332 1337 generic=True,
1333 1338 )
1334 1339 coreconfigitem(
1335 1340 b'help',
1336 1341 br'hidden-topic\..*',
1337 1342 default=False,
1338 1343 generic=True,
1339 1344 )
1340 1345 coreconfigitem(
1341 1346 b'hooks',
1342 1347 b'[^:]*',
1343 1348 default=dynamicdefault,
1344 1349 generic=True,
1345 1350 )
1346 1351 coreconfigitem(
1347 1352 b'hooks',
1348 1353 b'.*:run-with-plain',
1349 1354 default=True,
1350 1355 generic=True,
1351 1356 )
1352 1357 coreconfigitem(
1353 1358 b'hgweb-paths',
1354 1359 b'.*',
1355 1360 default=list,
1356 1361 generic=True,
1357 1362 )
1358 1363 coreconfigitem(
1359 1364 b'hostfingerprints',
1360 1365 b'.*',
1361 1366 default=list,
1362 1367 generic=True,
1363 1368 )
1364 1369 coreconfigitem(
1365 1370 b'hostsecurity',
1366 1371 b'ciphers',
1367 1372 default=None,
1368 1373 )
1369 1374 coreconfigitem(
1370 1375 b'hostsecurity',
1371 1376 b'minimumprotocol',
1372 1377 default=dynamicdefault,
1373 1378 )
1374 1379 coreconfigitem(
1375 1380 b'hostsecurity',
1376 1381 b'.*:minimumprotocol$',
1377 1382 default=dynamicdefault,
1378 1383 generic=True,
1379 1384 )
1380 1385 coreconfigitem(
1381 1386 b'hostsecurity',
1382 1387 b'.*:ciphers$',
1383 1388 default=dynamicdefault,
1384 1389 generic=True,
1385 1390 )
1386 1391 coreconfigitem(
1387 1392 b'hostsecurity',
1388 1393 b'.*:fingerprints$',
1389 1394 default=list,
1390 1395 generic=True,
1391 1396 )
1392 1397 coreconfigitem(
1393 1398 b'hostsecurity',
1394 1399 b'.*:verifycertsfile$',
1395 1400 default=None,
1396 1401 generic=True,
1397 1402 )
1398 1403
1399 1404 coreconfigitem(
1400 1405 b'http_proxy',
1401 1406 b'always',
1402 1407 default=False,
1403 1408 )
1404 1409 coreconfigitem(
1405 1410 b'http_proxy',
1406 1411 b'host',
1407 1412 default=None,
1408 1413 )
1409 1414 coreconfigitem(
1410 1415 b'http_proxy',
1411 1416 b'no',
1412 1417 default=list,
1413 1418 )
1414 1419 coreconfigitem(
1415 1420 b'http_proxy',
1416 1421 b'passwd',
1417 1422 default=None,
1418 1423 )
1419 1424 coreconfigitem(
1420 1425 b'http_proxy',
1421 1426 b'user',
1422 1427 default=None,
1423 1428 )
1424 1429
1425 1430 coreconfigitem(
1426 1431 b'http',
1427 1432 b'timeout',
1428 1433 default=None,
1429 1434 )
1430 1435
1431 1436 coreconfigitem(
1432 1437 b'logtoprocess',
1433 1438 b'commandexception',
1434 1439 default=None,
1435 1440 )
1436 1441 coreconfigitem(
1437 1442 b'logtoprocess',
1438 1443 b'commandfinish',
1439 1444 default=None,
1440 1445 )
1441 1446 coreconfigitem(
1442 1447 b'logtoprocess',
1443 1448 b'command',
1444 1449 default=None,
1445 1450 )
1446 1451 coreconfigitem(
1447 1452 b'logtoprocess',
1448 1453 b'develwarn',
1449 1454 default=None,
1450 1455 )
1451 1456 coreconfigitem(
1452 1457 b'logtoprocess',
1453 1458 b'uiblocked',
1454 1459 default=None,
1455 1460 )
1456 1461 coreconfigitem(
1457 1462 b'merge',
1458 1463 b'checkunknown',
1459 1464 default=b'abort',
1460 1465 )
1461 1466 coreconfigitem(
1462 1467 b'merge',
1463 1468 b'checkignored',
1464 1469 default=b'abort',
1465 1470 )
1466 1471 coreconfigitem(
1467 1472 b'experimental',
1468 1473 b'merge.checkpathconflicts',
1469 1474 default=False,
1470 1475 )
1471 1476 coreconfigitem(
1472 1477 b'merge',
1473 1478 b'followcopies',
1474 1479 default=True,
1475 1480 )
1476 1481 coreconfigitem(
1477 1482 b'merge',
1478 1483 b'on-failure',
1479 1484 default=b'continue',
1480 1485 )
1481 1486 coreconfigitem(
1482 1487 b'merge',
1483 1488 b'preferancestor',
1484 1489 default=lambda: [b'*'],
1485 1490 experimental=True,
1486 1491 )
1487 1492 coreconfigitem(
1488 1493 b'merge',
1489 1494 b'strict-capability-check',
1490 1495 default=False,
1491 1496 )
1492 1497 coreconfigitem(
1493 1498 b'merge-tools',
1494 1499 b'.*',
1495 1500 default=None,
1496 1501 generic=True,
1497 1502 )
1498 1503 coreconfigitem(
1499 1504 b'merge-tools',
1500 1505 br'.*\.args$',
1501 1506 default=b"$local $base $other",
1502 1507 generic=True,
1503 1508 priority=-1,
1504 1509 )
1505 1510 coreconfigitem(
1506 1511 b'merge-tools',
1507 1512 br'.*\.binary$',
1508 1513 default=False,
1509 1514 generic=True,
1510 1515 priority=-1,
1511 1516 )
1512 1517 coreconfigitem(
1513 1518 b'merge-tools',
1514 1519 br'.*\.check$',
1515 1520 default=list,
1516 1521 generic=True,
1517 1522 priority=-1,
1518 1523 )
1519 1524 coreconfigitem(
1520 1525 b'merge-tools',
1521 1526 br'.*\.checkchanged$',
1522 1527 default=False,
1523 1528 generic=True,
1524 1529 priority=-1,
1525 1530 )
1526 1531 coreconfigitem(
1527 1532 b'merge-tools',
1528 1533 br'.*\.executable$',
1529 1534 default=dynamicdefault,
1530 1535 generic=True,
1531 1536 priority=-1,
1532 1537 )
1533 1538 coreconfigitem(
1534 1539 b'merge-tools',
1535 1540 br'.*\.fixeol$',
1536 1541 default=False,
1537 1542 generic=True,
1538 1543 priority=-1,
1539 1544 )
1540 1545 coreconfigitem(
1541 1546 b'merge-tools',
1542 1547 br'.*\.gui$',
1543 1548 default=False,
1544 1549 generic=True,
1545 1550 priority=-1,
1546 1551 )
1547 1552 coreconfigitem(
1548 1553 b'merge-tools',
1549 1554 br'.*\.mergemarkers$',
1550 1555 default=b'basic',
1551 1556 generic=True,
1552 1557 priority=-1,
1553 1558 )
1554 1559 coreconfigitem(
1555 1560 b'merge-tools',
1556 1561 br'.*\.mergemarkertemplate$',
1557 1562 default=dynamicdefault, # take from command-templates.mergemarker
1558 1563 generic=True,
1559 1564 priority=-1,
1560 1565 )
1561 1566 coreconfigitem(
1562 1567 b'merge-tools',
1563 1568 br'.*\.priority$',
1564 1569 default=0,
1565 1570 generic=True,
1566 1571 priority=-1,
1567 1572 )
1568 1573 coreconfigitem(
1569 1574 b'merge-tools',
1570 1575 br'.*\.premerge$',
1571 1576 default=dynamicdefault,
1572 1577 generic=True,
1573 1578 priority=-1,
1574 1579 )
1575 1580 coreconfigitem(
1576 1581 b'merge-tools',
1577 1582 br'.*\.symlink$',
1578 1583 default=False,
1579 1584 generic=True,
1580 1585 priority=-1,
1581 1586 )
1582 1587 coreconfigitem(
1583 1588 b'pager',
1584 1589 b'attend-.*',
1585 1590 default=dynamicdefault,
1586 1591 generic=True,
1587 1592 )
1588 1593 coreconfigitem(
1589 1594 b'pager',
1590 1595 b'ignore',
1591 1596 default=list,
1592 1597 )
1593 1598 coreconfigitem(
1594 1599 b'pager',
1595 1600 b'pager',
1596 1601 default=dynamicdefault,
1597 1602 )
1598 1603 coreconfigitem(
1599 1604 b'patch',
1600 1605 b'eol',
1601 1606 default=b'strict',
1602 1607 )
1603 1608 coreconfigitem(
1604 1609 b'patch',
1605 1610 b'fuzz',
1606 1611 default=2,
1607 1612 )
1608 1613 coreconfigitem(
1609 1614 b'paths',
1610 1615 b'default',
1611 1616 default=None,
1612 1617 )
1613 1618 coreconfigitem(
1614 1619 b'paths',
1615 1620 b'default-push',
1616 1621 default=None,
1617 1622 )
1618 1623 coreconfigitem(
1619 1624 b'paths',
1620 1625 b'.*',
1621 1626 default=None,
1622 1627 generic=True,
1623 1628 )
1624 1629 coreconfigitem(
1625 1630 b'phases',
1626 1631 b'checksubrepos',
1627 1632 default=b'follow',
1628 1633 )
1629 1634 coreconfigitem(
1630 1635 b'phases',
1631 1636 b'new-commit',
1632 1637 default=b'draft',
1633 1638 )
1634 1639 coreconfigitem(
1635 1640 b'phases',
1636 1641 b'publish',
1637 1642 default=True,
1638 1643 )
1639 1644 coreconfigitem(
1640 1645 b'profiling',
1641 1646 b'enabled',
1642 1647 default=False,
1643 1648 )
1644 1649 coreconfigitem(
1645 1650 b'profiling',
1646 1651 b'format',
1647 1652 default=b'text',
1648 1653 )
1649 1654 coreconfigitem(
1650 1655 b'profiling',
1651 1656 b'freq',
1652 1657 default=1000,
1653 1658 )
1654 1659 coreconfigitem(
1655 1660 b'profiling',
1656 1661 b'limit',
1657 1662 default=30,
1658 1663 )
1659 1664 coreconfigitem(
1660 1665 b'profiling',
1661 1666 b'nested',
1662 1667 default=0,
1663 1668 )
1664 1669 coreconfigitem(
1665 1670 b'profiling',
1666 1671 b'output',
1667 1672 default=None,
1668 1673 )
1669 1674 coreconfigitem(
1670 1675 b'profiling',
1671 1676 b'showmax',
1672 1677 default=0.999,
1673 1678 )
1674 1679 coreconfigitem(
1675 1680 b'profiling',
1676 1681 b'showmin',
1677 1682 default=dynamicdefault,
1678 1683 )
1679 1684 coreconfigitem(
1680 1685 b'profiling',
1681 1686 b'showtime',
1682 1687 default=True,
1683 1688 )
1684 1689 coreconfigitem(
1685 1690 b'profiling',
1686 1691 b'sort',
1687 1692 default=b'inlinetime',
1688 1693 )
1689 1694 coreconfigitem(
1690 1695 b'profiling',
1691 1696 b'statformat',
1692 1697 default=b'hotpath',
1693 1698 )
1694 1699 coreconfigitem(
1695 1700 b'profiling',
1696 1701 b'time-track',
1697 1702 default=dynamicdefault,
1698 1703 )
1699 1704 coreconfigitem(
1700 1705 b'profiling',
1701 1706 b'type',
1702 1707 default=b'stat',
1703 1708 )
1704 1709 coreconfigitem(
1705 1710 b'progress',
1706 1711 b'assume-tty',
1707 1712 default=False,
1708 1713 )
1709 1714 coreconfigitem(
1710 1715 b'progress',
1711 1716 b'changedelay',
1712 1717 default=1,
1713 1718 )
1714 1719 coreconfigitem(
1715 1720 b'progress',
1716 1721 b'clear-complete',
1717 1722 default=True,
1718 1723 )
1719 1724 coreconfigitem(
1720 1725 b'progress',
1721 1726 b'debug',
1722 1727 default=False,
1723 1728 )
1724 1729 coreconfigitem(
1725 1730 b'progress',
1726 1731 b'delay',
1727 1732 default=3,
1728 1733 )
1729 1734 coreconfigitem(
1730 1735 b'progress',
1731 1736 b'disable',
1732 1737 default=False,
1733 1738 )
1734 1739 coreconfigitem(
1735 1740 b'progress',
1736 1741 b'estimateinterval',
1737 1742 default=60.0,
1738 1743 )
1739 1744 coreconfigitem(
1740 1745 b'progress',
1741 1746 b'format',
1742 1747 default=lambda: [b'topic', b'bar', b'number', b'estimate'],
1743 1748 )
1744 1749 coreconfigitem(
1745 1750 b'progress',
1746 1751 b'refresh',
1747 1752 default=0.1,
1748 1753 )
1749 1754 coreconfigitem(
1750 1755 b'progress',
1751 1756 b'width',
1752 1757 default=dynamicdefault,
1753 1758 )
1754 1759 coreconfigitem(
1755 1760 b'pull',
1756 1761 b'confirm',
1757 1762 default=False,
1758 1763 )
1759 1764 coreconfigitem(
1760 1765 b'push',
1761 1766 b'pushvars.server',
1762 1767 default=False,
1763 1768 )
1764 1769 coreconfigitem(
1765 1770 b'rewrite',
1766 1771 b'backup-bundle',
1767 1772 default=True,
1768 1773 alias=[(b'ui', b'history-editing-backup')],
1769 1774 )
1770 1775 coreconfigitem(
1771 1776 b'rewrite',
1772 1777 b'update-timestamp',
1773 1778 default=False,
1774 1779 )
1775 1780 coreconfigitem(
1776 1781 b'rewrite',
1777 1782 b'empty-successor',
1778 1783 default=b'skip',
1779 1784 experimental=True,
1780 1785 )
1781 1786 coreconfigitem(
1782 1787 b'storage',
1783 1788 b'new-repo-backend',
1784 1789 default=b'revlogv1',
1785 1790 experimental=True,
1786 1791 )
1787 1792 coreconfigitem(
1788 1793 b'storage',
1789 1794 b'revlog.optimize-delta-parent-choice',
1790 1795 default=True,
1791 1796 alias=[(b'format', b'aggressivemergedeltas')],
1792 1797 )
1793 1798 # experimental as long as rust is experimental (or a C version is implemented)
1794 1799 coreconfigitem(
1795 1800 b'storage',
1796 1801 b'revlog.persistent-nodemap.mmap',
1797 1802 default=True,
1798 1803 )
1799 1804 # experimental as long as format.use-persistent-nodemap is.
1800 1805 coreconfigitem(
1801 1806 b'storage',
1802 1807 b'revlog.persistent-nodemap.slow-path',
1803 1808 default=b"abort",
1804 1809 )
1805 1810
1806 1811 coreconfigitem(
1807 1812 b'storage',
1808 1813 b'revlog.reuse-external-delta',
1809 1814 default=True,
1810 1815 )
1811 1816 coreconfigitem(
1812 1817 b'storage',
1813 1818 b'revlog.reuse-external-delta-parent',
1814 1819 default=None,
1815 1820 )
1816 1821 coreconfigitem(
1817 1822 b'storage',
1818 1823 b'revlog.zlib.level',
1819 1824 default=None,
1820 1825 )
1821 1826 coreconfigitem(
1822 1827 b'storage',
1823 1828 b'revlog.zstd.level',
1824 1829 default=None,
1825 1830 )
1826 1831 coreconfigitem(
1827 1832 b'server',
1828 1833 b'bookmarks-pushkey-compat',
1829 1834 default=True,
1830 1835 )
1831 1836 coreconfigitem(
1832 1837 b'server',
1833 1838 b'bundle1',
1834 1839 default=True,
1835 1840 )
1836 1841 coreconfigitem(
1837 1842 b'server',
1838 1843 b'bundle1gd',
1839 1844 default=None,
1840 1845 )
1841 1846 coreconfigitem(
1842 1847 b'server',
1843 1848 b'bundle1.pull',
1844 1849 default=None,
1845 1850 )
1846 1851 coreconfigitem(
1847 1852 b'server',
1848 1853 b'bundle1gd.pull',
1849 1854 default=None,
1850 1855 )
1851 1856 coreconfigitem(
1852 1857 b'server',
1853 1858 b'bundle1.push',
1854 1859 default=None,
1855 1860 )
1856 1861 coreconfigitem(
1857 1862 b'server',
1858 1863 b'bundle1gd.push',
1859 1864 default=None,
1860 1865 )
1861 1866 coreconfigitem(
1862 1867 b'server',
1863 1868 b'bundle2.stream',
1864 1869 default=True,
1865 1870 alias=[(b'experimental', b'bundle2.stream')],
1866 1871 )
1867 1872 coreconfigitem(
1868 1873 b'server',
1869 1874 b'compressionengines',
1870 1875 default=list,
1871 1876 )
1872 1877 coreconfigitem(
1873 1878 b'server',
1874 1879 b'concurrent-push-mode',
1875 1880 default=b'check-related',
1876 1881 )
1877 1882 coreconfigitem(
1878 1883 b'server',
1879 1884 b'disablefullbundle',
1880 1885 default=False,
1881 1886 )
1882 1887 coreconfigitem(
1883 1888 b'server',
1884 1889 b'maxhttpheaderlen',
1885 1890 default=1024,
1886 1891 )
1887 1892 coreconfigitem(
1888 1893 b'server',
1889 1894 b'pullbundle',
1890 1895 default=False,
1891 1896 )
1892 1897 coreconfigitem(
1893 1898 b'server',
1894 1899 b'preferuncompressed',
1895 1900 default=False,
1896 1901 )
1897 1902 coreconfigitem(
1898 1903 b'server',
1899 1904 b'streamunbundle',
1900 1905 default=False,
1901 1906 )
1902 1907 coreconfigitem(
1903 1908 b'server',
1904 1909 b'uncompressed',
1905 1910 default=True,
1906 1911 )
1907 1912 coreconfigitem(
1908 1913 b'server',
1909 1914 b'uncompressedallowsecret',
1910 1915 default=False,
1911 1916 )
1912 1917 coreconfigitem(
1913 1918 b'server',
1914 1919 b'view',
1915 1920 default=b'served',
1916 1921 )
1917 1922 coreconfigitem(
1918 1923 b'server',
1919 1924 b'validate',
1920 1925 default=False,
1921 1926 )
1922 1927 coreconfigitem(
1923 1928 b'server',
1924 1929 b'zliblevel',
1925 1930 default=-1,
1926 1931 )
1927 1932 coreconfigitem(
1928 1933 b'server',
1929 1934 b'zstdlevel',
1930 1935 default=3,
1931 1936 )
1932 1937 coreconfigitem(
1933 1938 b'share',
1934 1939 b'pool',
1935 1940 default=None,
1936 1941 )
1937 1942 coreconfigitem(
1938 1943 b'share',
1939 1944 b'poolnaming',
1940 1945 default=b'identity',
1941 1946 )
1942 1947 coreconfigitem(
1943 1948 b'share',
1944 1949 b'safe-mismatch.source-not-safe',
1945 1950 default=b'abort',
1946 1951 )
1947 1952 coreconfigitem(
1948 1953 b'share',
1949 1954 b'safe-mismatch.source-safe',
1950 1955 default=b'abort',
1951 1956 )
1952 1957 coreconfigitem(
1953 1958 b'share',
1954 1959 b'safe-mismatch.source-not-safe.warn',
1955 1960 default=True,
1956 1961 )
1957 1962 coreconfigitem(
1958 1963 b'share',
1959 1964 b'safe-mismatch.source-safe.warn',
1960 1965 default=True,
1961 1966 )
1962 1967 coreconfigitem(
1963 1968 b'shelve',
1964 1969 b'maxbackups',
1965 1970 default=10,
1966 1971 )
1967 1972 coreconfigitem(
1968 1973 b'smtp',
1969 1974 b'host',
1970 1975 default=None,
1971 1976 )
1972 1977 coreconfigitem(
1973 1978 b'smtp',
1974 1979 b'local_hostname',
1975 1980 default=None,
1976 1981 )
1977 1982 coreconfigitem(
1978 1983 b'smtp',
1979 1984 b'password',
1980 1985 default=None,
1981 1986 )
1982 1987 coreconfigitem(
1983 1988 b'smtp',
1984 1989 b'port',
1985 1990 default=dynamicdefault,
1986 1991 )
1987 1992 coreconfigitem(
1988 1993 b'smtp',
1989 1994 b'tls',
1990 1995 default=b'none',
1991 1996 )
1992 1997 coreconfigitem(
1993 1998 b'smtp',
1994 1999 b'username',
1995 2000 default=None,
1996 2001 )
1997 2002 coreconfigitem(
1998 2003 b'sparse',
1999 2004 b'missingwarning',
2000 2005 default=True,
2001 2006 experimental=True,
2002 2007 )
2003 2008 coreconfigitem(
2004 2009 b'subrepos',
2005 2010 b'allowed',
2006 2011 default=dynamicdefault, # to make backporting simpler
2007 2012 )
2008 2013 coreconfigitem(
2009 2014 b'subrepos',
2010 2015 b'hg:allowed',
2011 2016 default=dynamicdefault,
2012 2017 )
2013 2018 coreconfigitem(
2014 2019 b'subrepos',
2015 2020 b'git:allowed',
2016 2021 default=dynamicdefault,
2017 2022 )
2018 2023 coreconfigitem(
2019 2024 b'subrepos',
2020 2025 b'svn:allowed',
2021 2026 default=dynamicdefault,
2022 2027 )
2023 2028 coreconfigitem(
2024 2029 b'templates',
2025 2030 b'.*',
2026 2031 default=None,
2027 2032 generic=True,
2028 2033 )
2029 2034 coreconfigitem(
2030 2035 b'templateconfig',
2031 2036 b'.*',
2032 2037 default=dynamicdefault,
2033 2038 generic=True,
2034 2039 )
2035 2040 coreconfigitem(
2036 2041 b'trusted',
2037 2042 b'groups',
2038 2043 default=list,
2039 2044 )
2040 2045 coreconfigitem(
2041 2046 b'trusted',
2042 2047 b'users',
2043 2048 default=list,
2044 2049 )
2045 2050 coreconfigitem(
2046 2051 b'ui',
2047 2052 b'_usedassubrepo',
2048 2053 default=False,
2049 2054 )
2050 2055 coreconfigitem(
2051 2056 b'ui',
2052 2057 b'allowemptycommit',
2053 2058 default=False,
2054 2059 )
2055 2060 coreconfigitem(
2056 2061 b'ui',
2057 2062 b'archivemeta',
2058 2063 default=True,
2059 2064 )
2060 2065 coreconfigitem(
2061 2066 b'ui',
2062 2067 b'askusername',
2063 2068 default=False,
2064 2069 )
2065 2070 coreconfigitem(
2066 2071 b'ui',
2067 2072 b'available-memory',
2068 2073 default=None,
2069 2074 )
2070 2075
2071 2076 coreconfigitem(
2072 2077 b'ui',
2073 2078 b'clonebundlefallback',
2074 2079 default=False,
2075 2080 )
2076 2081 coreconfigitem(
2077 2082 b'ui',
2078 2083 b'clonebundleprefers',
2079 2084 default=list,
2080 2085 )
2081 2086 coreconfigitem(
2082 2087 b'ui',
2083 2088 b'clonebundles',
2084 2089 default=True,
2085 2090 )
2086 2091 coreconfigitem(
2087 2092 b'ui',
2088 2093 b'color',
2089 2094 default=b'auto',
2090 2095 )
2091 2096 coreconfigitem(
2092 2097 b'ui',
2093 2098 b'commitsubrepos',
2094 2099 default=False,
2095 2100 )
2096 2101 coreconfigitem(
2097 2102 b'ui',
2098 2103 b'debug',
2099 2104 default=False,
2100 2105 )
2101 2106 coreconfigitem(
2102 2107 b'ui',
2103 2108 b'debugger',
2104 2109 default=None,
2105 2110 )
2106 2111 coreconfigitem(
2107 2112 b'ui',
2108 2113 b'editor',
2109 2114 default=dynamicdefault,
2110 2115 )
2111 2116 coreconfigitem(
2112 2117 b'ui',
2113 2118 b'detailed-exit-code',
2114 2119 default=False,
2115 2120 experimental=True,
2116 2121 )
2117 2122 coreconfigitem(
2118 2123 b'ui',
2119 2124 b'fallbackencoding',
2120 2125 default=None,
2121 2126 )
2122 2127 coreconfigitem(
2123 2128 b'ui',
2124 2129 b'forcecwd',
2125 2130 default=None,
2126 2131 )
2127 2132 coreconfigitem(
2128 2133 b'ui',
2129 2134 b'forcemerge',
2130 2135 default=None,
2131 2136 )
2132 2137 coreconfigitem(
2133 2138 b'ui',
2134 2139 b'formatdebug',
2135 2140 default=False,
2136 2141 )
2137 2142 coreconfigitem(
2138 2143 b'ui',
2139 2144 b'formatjson',
2140 2145 default=False,
2141 2146 )
2142 2147 coreconfigitem(
2143 2148 b'ui',
2144 2149 b'formatted',
2145 2150 default=None,
2146 2151 )
2147 2152 coreconfigitem(
2148 2153 b'ui',
2149 2154 b'interactive',
2150 2155 default=None,
2151 2156 )
2152 2157 coreconfigitem(
2153 2158 b'ui',
2154 2159 b'interface',
2155 2160 default=None,
2156 2161 )
2157 2162 coreconfigitem(
2158 2163 b'ui',
2159 2164 b'interface.chunkselector',
2160 2165 default=None,
2161 2166 )
2162 2167 coreconfigitem(
2163 2168 b'ui',
2164 2169 b'large-file-limit',
2165 2170 default=10000000,
2166 2171 )
2167 2172 coreconfigitem(
2168 2173 b'ui',
2169 2174 b'logblockedtimes',
2170 2175 default=False,
2171 2176 )
2172 2177 coreconfigitem(
2173 2178 b'ui',
2174 2179 b'merge',
2175 2180 default=None,
2176 2181 )
2177 2182 coreconfigitem(
2178 2183 b'ui',
2179 2184 b'mergemarkers',
2180 2185 default=b'basic',
2181 2186 )
2182 2187 coreconfigitem(
2183 2188 b'ui',
2184 2189 b'message-output',
2185 2190 default=b'stdio',
2186 2191 )
2187 2192 coreconfigitem(
2188 2193 b'ui',
2189 2194 b'nontty',
2190 2195 default=False,
2191 2196 )
2192 2197 coreconfigitem(
2193 2198 b'ui',
2194 2199 b'origbackuppath',
2195 2200 default=None,
2196 2201 )
2197 2202 coreconfigitem(
2198 2203 b'ui',
2199 2204 b'paginate',
2200 2205 default=True,
2201 2206 )
2202 2207 coreconfigitem(
2203 2208 b'ui',
2204 2209 b'patch',
2205 2210 default=None,
2206 2211 )
2207 2212 coreconfigitem(
2208 2213 b'ui',
2209 2214 b'portablefilenames',
2210 2215 default=b'warn',
2211 2216 )
2212 2217 coreconfigitem(
2213 2218 b'ui',
2214 2219 b'promptecho',
2215 2220 default=False,
2216 2221 )
2217 2222 coreconfigitem(
2218 2223 b'ui',
2219 2224 b'quiet',
2220 2225 default=False,
2221 2226 )
2222 2227 coreconfigitem(
2223 2228 b'ui',
2224 2229 b'quietbookmarkmove',
2225 2230 default=False,
2226 2231 )
2227 2232 coreconfigitem(
2228 2233 b'ui',
2229 2234 b'relative-paths',
2230 2235 default=b'legacy',
2231 2236 )
2232 2237 coreconfigitem(
2233 2238 b'ui',
2234 2239 b'remotecmd',
2235 2240 default=b'hg',
2236 2241 )
2237 2242 coreconfigitem(
2238 2243 b'ui',
2239 2244 b'report_untrusted',
2240 2245 default=True,
2241 2246 )
2242 2247 coreconfigitem(
2243 2248 b'ui',
2244 2249 b'rollback',
2245 2250 default=True,
2246 2251 )
2247 2252 coreconfigitem(
2248 2253 b'ui',
2249 2254 b'signal-safe-lock',
2250 2255 default=True,
2251 2256 )
2252 2257 coreconfigitem(
2253 2258 b'ui',
2254 2259 b'slash',
2255 2260 default=False,
2256 2261 )
2257 2262 coreconfigitem(
2258 2263 b'ui',
2259 2264 b'ssh',
2260 2265 default=b'ssh',
2261 2266 )
2262 2267 coreconfigitem(
2263 2268 b'ui',
2264 2269 b'ssherrorhint',
2265 2270 default=None,
2266 2271 )
2267 2272 coreconfigitem(
2268 2273 b'ui',
2269 2274 b'statuscopies',
2270 2275 default=False,
2271 2276 )
2272 2277 coreconfigitem(
2273 2278 b'ui',
2274 2279 b'strict',
2275 2280 default=False,
2276 2281 )
2277 2282 coreconfigitem(
2278 2283 b'ui',
2279 2284 b'style',
2280 2285 default=b'',
2281 2286 )
2282 2287 coreconfigitem(
2283 2288 b'ui',
2284 2289 b'supportcontact',
2285 2290 default=None,
2286 2291 )
2287 2292 coreconfigitem(
2288 2293 b'ui',
2289 2294 b'textwidth',
2290 2295 default=78,
2291 2296 )
2292 2297 coreconfigitem(
2293 2298 b'ui',
2294 2299 b'timeout',
2295 2300 default=b'600',
2296 2301 )
2297 2302 coreconfigitem(
2298 2303 b'ui',
2299 2304 b'timeout.warn',
2300 2305 default=0,
2301 2306 )
2302 2307 coreconfigitem(
2303 2308 b'ui',
2304 2309 b'timestamp-output',
2305 2310 default=False,
2306 2311 )
2307 2312 coreconfigitem(
2308 2313 b'ui',
2309 2314 b'traceback',
2310 2315 default=False,
2311 2316 )
2312 2317 coreconfigitem(
2313 2318 b'ui',
2314 2319 b'tweakdefaults',
2315 2320 default=False,
2316 2321 )
2317 2322 coreconfigitem(b'ui', b'username', alias=[(b'ui', b'user')])
2318 2323 coreconfigitem(
2319 2324 b'ui',
2320 2325 b'verbose',
2321 2326 default=False,
2322 2327 )
2323 2328 coreconfigitem(
2324 2329 b'verify',
2325 2330 b'skipflags',
2326 2331 default=None,
2327 2332 )
2328 2333 coreconfigitem(
2329 2334 b'web',
2330 2335 b'allowbz2',
2331 2336 default=False,
2332 2337 )
2333 2338 coreconfigitem(
2334 2339 b'web',
2335 2340 b'allowgz',
2336 2341 default=False,
2337 2342 )
2338 2343 coreconfigitem(
2339 2344 b'web',
2340 2345 b'allow-pull',
2341 2346 alias=[(b'web', b'allowpull')],
2342 2347 default=True,
2343 2348 )
2344 2349 coreconfigitem(
2345 2350 b'web',
2346 2351 b'allow-push',
2347 2352 alias=[(b'web', b'allow_push')],
2348 2353 default=list,
2349 2354 )
2350 2355 coreconfigitem(
2351 2356 b'web',
2352 2357 b'allowzip',
2353 2358 default=False,
2354 2359 )
2355 2360 coreconfigitem(
2356 2361 b'web',
2357 2362 b'archivesubrepos',
2358 2363 default=False,
2359 2364 )
2360 2365 coreconfigitem(
2361 2366 b'web',
2362 2367 b'cache',
2363 2368 default=True,
2364 2369 )
2365 2370 coreconfigitem(
2366 2371 b'web',
2367 2372 b'comparisoncontext',
2368 2373 default=5,
2369 2374 )
2370 2375 coreconfigitem(
2371 2376 b'web',
2372 2377 b'contact',
2373 2378 default=None,
2374 2379 )
2375 2380 coreconfigitem(
2376 2381 b'web',
2377 2382 b'deny_push',
2378 2383 default=list,
2379 2384 )
2380 2385 coreconfigitem(
2381 2386 b'web',
2382 2387 b'guessmime',
2383 2388 default=False,
2384 2389 )
2385 2390 coreconfigitem(
2386 2391 b'web',
2387 2392 b'hidden',
2388 2393 default=False,
2389 2394 )
2390 2395 coreconfigitem(
2391 2396 b'web',
2392 2397 b'labels',
2393 2398 default=list,
2394 2399 )
2395 2400 coreconfigitem(
2396 2401 b'web',
2397 2402 b'logoimg',
2398 2403 default=b'hglogo.png',
2399 2404 )
2400 2405 coreconfigitem(
2401 2406 b'web',
2402 2407 b'logourl',
2403 2408 default=b'https://mercurial-scm.org/',
2404 2409 )
2405 2410 coreconfigitem(
2406 2411 b'web',
2407 2412 b'accesslog',
2408 2413 default=b'-',
2409 2414 )
2410 2415 coreconfigitem(
2411 2416 b'web',
2412 2417 b'address',
2413 2418 default=b'',
2414 2419 )
2415 2420 coreconfigitem(
2416 2421 b'web',
2417 2422 b'allow-archive',
2418 2423 alias=[(b'web', b'allow_archive')],
2419 2424 default=list,
2420 2425 )
2421 2426 coreconfigitem(
2422 2427 b'web',
2423 2428 b'allow_read',
2424 2429 default=list,
2425 2430 )
2426 2431 coreconfigitem(
2427 2432 b'web',
2428 2433 b'baseurl',
2429 2434 default=None,
2430 2435 )
2431 2436 coreconfigitem(
2432 2437 b'web',
2433 2438 b'cacerts',
2434 2439 default=None,
2435 2440 )
2436 2441 coreconfigitem(
2437 2442 b'web',
2438 2443 b'certificate',
2439 2444 default=None,
2440 2445 )
2441 2446 coreconfigitem(
2442 2447 b'web',
2443 2448 b'collapse',
2444 2449 default=False,
2445 2450 )
2446 2451 coreconfigitem(
2447 2452 b'web',
2448 2453 b'csp',
2449 2454 default=None,
2450 2455 )
2451 2456 coreconfigitem(
2452 2457 b'web',
2453 2458 b'deny_read',
2454 2459 default=list,
2455 2460 )
2456 2461 coreconfigitem(
2457 2462 b'web',
2458 2463 b'descend',
2459 2464 default=True,
2460 2465 )
2461 2466 coreconfigitem(
2462 2467 b'web',
2463 2468 b'description',
2464 2469 default=b"",
2465 2470 )
2466 2471 coreconfigitem(
2467 2472 b'web',
2468 2473 b'encoding',
2469 2474 default=lambda: encoding.encoding,
2470 2475 )
2471 2476 coreconfigitem(
2472 2477 b'web',
2473 2478 b'errorlog',
2474 2479 default=b'-',
2475 2480 )
2476 2481 coreconfigitem(
2477 2482 b'web',
2478 2483 b'ipv6',
2479 2484 default=False,
2480 2485 )
2481 2486 coreconfigitem(
2482 2487 b'web',
2483 2488 b'maxchanges',
2484 2489 default=10,
2485 2490 )
2486 2491 coreconfigitem(
2487 2492 b'web',
2488 2493 b'maxfiles',
2489 2494 default=10,
2490 2495 )
2491 2496 coreconfigitem(
2492 2497 b'web',
2493 2498 b'maxshortchanges',
2494 2499 default=60,
2495 2500 )
2496 2501 coreconfigitem(
2497 2502 b'web',
2498 2503 b'motd',
2499 2504 default=b'',
2500 2505 )
2501 2506 coreconfigitem(
2502 2507 b'web',
2503 2508 b'name',
2504 2509 default=dynamicdefault,
2505 2510 )
2506 2511 coreconfigitem(
2507 2512 b'web',
2508 2513 b'port',
2509 2514 default=8000,
2510 2515 )
2511 2516 coreconfigitem(
2512 2517 b'web',
2513 2518 b'prefix',
2514 2519 default=b'',
2515 2520 )
2516 2521 coreconfigitem(
2517 2522 b'web',
2518 2523 b'push_ssl',
2519 2524 default=True,
2520 2525 )
2521 2526 coreconfigitem(
2522 2527 b'web',
2523 2528 b'refreshinterval',
2524 2529 default=20,
2525 2530 )
2526 2531 coreconfigitem(
2527 2532 b'web',
2528 2533 b'server-header',
2529 2534 default=None,
2530 2535 )
2531 2536 coreconfigitem(
2532 2537 b'web',
2533 2538 b'static',
2534 2539 default=None,
2535 2540 )
2536 2541 coreconfigitem(
2537 2542 b'web',
2538 2543 b'staticurl',
2539 2544 default=None,
2540 2545 )
2541 2546 coreconfigitem(
2542 2547 b'web',
2543 2548 b'stripes',
2544 2549 default=1,
2545 2550 )
2546 2551 coreconfigitem(
2547 2552 b'web',
2548 2553 b'style',
2549 2554 default=b'paper',
2550 2555 )
2551 2556 coreconfigitem(
2552 2557 b'web',
2553 2558 b'templates',
2554 2559 default=None,
2555 2560 )
2556 2561 coreconfigitem(
2557 2562 b'web',
2558 2563 b'view',
2559 2564 default=b'served',
2560 2565 experimental=True,
2561 2566 )
2562 2567 coreconfigitem(
2563 2568 b'worker',
2564 2569 b'backgroundclose',
2565 2570 default=dynamicdefault,
2566 2571 )
2567 2572 # Windows defaults to a limit of 512 open files. A buffer of 128
2568 2573 # should give us enough headway.
2569 2574 coreconfigitem(
2570 2575 b'worker',
2571 2576 b'backgroundclosemaxqueue',
2572 2577 default=384,
2573 2578 )
2574 2579 coreconfigitem(
2575 2580 b'worker',
2576 2581 b'backgroundcloseminfilecount',
2577 2582 default=2048,
2578 2583 )
2579 2584 coreconfigitem(
2580 2585 b'worker',
2581 2586 b'backgroundclosethreadcount',
2582 2587 default=4,
2583 2588 )
2584 2589 coreconfigitem(
2585 2590 b'worker',
2586 2591 b'enabled',
2587 2592 default=True,
2588 2593 )
2589 2594 coreconfigitem(
2590 2595 b'worker',
2591 2596 b'numcpus',
2592 2597 default=None,
2593 2598 )
2594 2599
2595 2600 # Rebase related configuration moved to core because other extension are doing
2596 2601 # strange things. For example, shelve import the extensions to reuse some bit
2597 2602 # without formally loading it.
2598 2603 coreconfigitem(
2599 2604 b'commands',
2600 2605 b'rebase.requiredest',
2601 2606 default=False,
2602 2607 )
2603 2608 coreconfigitem(
2604 2609 b'experimental',
2605 2610 b'rebaseskipobsolete',
2606 2611 default=True,
2607 2612 )
2608 2613 coreconfigitem(
2609 2614 b'rebase',
2610 2615 b'singletransaction',
2611 2616 default=False,
2612 2617 )
2613 2618 coreconfigitem(
2614 2619 b'rebase',
2615 2620 b'experimental.inmemory',
2616 2621 default=False,
2617 2622 )
@@ -1,1281 +1,1288 b''
1 1 # coding: utf8
2 2 # copies.py - copy detection for Mercurial
3 3 #
4 4 # Copyright 2008 Matt Mackall <mpm@selenic.com>
5 5 #
6 6 # This software may be used and distributed according to the terms of the
7 7 # GNU General Public License version 2 or any later version.
8 8
9 9 from __future__ import absolute_import
10 10
11 11 import collections
12 12 import os
13 13
14 14 from .i18n import _
15 15 from .node import (
16 16 nullid,
17 17 nullrev,
18 18 )
19 19
20 20 from . import (
21 21 match as matchmod,
22 22 pathutil,
23 23 policy,
24 24 pycompat,
25 25 util,
26 26 )
27 27
28 28
29 29 from .utils import stringutil
30 30
31 31 from .revlogutils import (
32 32 flagutil,
33 33 sidedata as sidedatamod,
34 34 )
35 35
36 36 rustmod = policy.importrust("copy_tracing")
37 37
38 38
39 39 def _filter(src, dst, t):
40 40 """filters out invalid copies after chaining"""
41 41
42 42 # When _chain()'ing copies in 'a' (from 'src' via some other commit 'mid')
43 43 # with copies in 'b' (from 'mid' to 'dst'), we can get the different cases
44 44 # in the following table (not including trivial cases). For example, case 6
45 45 # is where a file existed in 'src' and remained under that name in 'mid' and
46 46 # then was renamed between 'mid' and 'dst'.
47 47 #
48 48 # case src mid dst result
49 49 # 1 x y - -
50 50 # 2 x y y x->y
51 51 # 3 x y x -
52 52 # 4 x y z x->z
53 53 # 5 - x y -
54 54 # 6 x x y x->y
55 55 #
56 56 # _chain() takes care of chaining the copies in 'a' and 'b', but it
57 57 # cannot tell the difference between cases 1 and 2, between 3 and 4, or
58 58 # between 5 and 6, so it includes all cases in its result.
59 59 # Cases 1, 3, and 5 are then removed by _filter().
60 60
61 61 for k, v in list(t.items()):
62 62 if k == v: # case 3
63 63 del t[k]
64 64 elif v not in src: # case 5
65 65 # remove copies from files that didn't exist
66 66 del t[k]
67 67 elif k not in dst: # case 1
68 68 # remove copies to files that were then removed
69 69 del t[k]
70 70
71 71
72 72 def _chain(prefix, suffix):
73 73 """chain two sets of copies 'prefix' and 'suffix'"""
74 74 result = prefix.copy()
75 75 for key, value in pycompat.iteritems(suffix):
76 76 result[key] = prefix.get(value, value)
77 77 return result
78 78
79 79
80 80 def _tracefile(fctx, am, basemf):
81 81 """return file context that is the ancestor of fctx present in ancestor
82 82 manifest am
83 83
84 84 Note: we used to try and stop after a given limit, however checking if that
85 85 limit is reached turned out to be very expensive. we are better off
86 86 disabling that feature."""
87 87
88 88 for f in fctx.ancestors():
89 89 path = f.path()
90 90 if am.get(path, None) == f.filenode():
91 91 return path
92 92 if basemf and basemf.get(path, None) == f.filenode():
93 93 return path
94 94
95 95
96 96 def _dirstatecopies(repo, match=None):
97 97 ds = repo.dirstate
98 98 c = ds.copies().copy()
99 99 for k in list(c):
100 100 if ds[k] not in b'anm' or (match and not match(k)):
101 101 del c[k]
102 102 return c
103 103
104 104
105 105 def _computeforwardmissing(a, b, match=None):
106 106 """Computes which files are in b but not a.
107 107 This is its own function so extensions can easily wrap this call to see what
108 108 files _forwardcopies is about to process.
109 109 """
110 110 ma = a.manifest()
111 111 mb = b.manifest()
112 112 return mb.filesnotin(ma, match=match)
113 113
114 114
115 115 def usechangesetcentricalgo(repo):
116 116 """Checks if we should use changeset-centric copy algorithms"""
117 117 if repo.filecopiesmode == b'changeset-sidedata':
118 118 return True
119 119 readfrom = repo.ui.config(b'experimental', b'copies.read-from')
120 120 changesetsource = (b'changeset-only', b'compatibility')
121 121 return readfrom in changesetsource
122 122
123 123
124 124 def _committedforwardcopies(a, b, base, match):
125 125 """Like _forwardcopies(), but b.rev() cannot be None (working copy)"""
126 126 # files might have to be traced back to the fctx parent of the last
127 127 # one-side-only changeset, but not further back than that
128 128 repo = a._repo
129 129
130 130 if usechangesetcentricalgo(repo):
131 131 return _changesetforwardcopies(a, b, match)
132 132
133 133 debug = repo.ui.debugflag and repo.ui.configbool(b'devel', b'debug.copies')
134 134 dbg = repo.ui.debug
135 135 if debug:
136 136 dbg(b'debug.copies: looking into rename from %s to %s\n' % (a, b))
137 137 am = a.manifest()
138 138 basemf = None if base is None else base.manifest()
139 139
140 140 # find where new files came from
141 141 # we currently don't try to find where old files went, too expensive
142 142 # this means we can miss a case like 'hg rm b; hg cp a b'
143 143 cm = {}
144 144
145 145 # Computing the forward missing is quite expensive on large manifests, since
146 146 # it compares the entire manifests. We can optimize it in the common use
147 147 # case of computing what copies are in a commit versus its parent (like
148 148 # during a rebase or histedit). Note, we exclude merge commits from this
149 149 # optimization, since the ctx.files() for a merge commit is not correct for
150 150 # this comparison.
151 151 forwardmissingmatch = match
152 152 if b.p1() == a and b.p2().node() == nullid:
153 153 filesmatcher = matchmod.exact(b.files())
154 154 forwardmissingmatch = matchmod.intersectmatchers(match, filesmatcher)
155 155 if repo.ui.configbool(b'devel', b'copy-tracing.trace-all-files'):
156 156 missing = list(b.walk(match))
157 157 # _computeforwardmissing(a, b, match=forwardmissingmatch)
158 158 if debug:
159 159 dbg(b'debug.copies: searching all files: %d\n' % len(missing))
160 160 else:
161 161 missing = _computeforwardmissing(a, b, match=forwardmissingmatch)
162 162 if debug:
163 163 dbg(
164 164 b'debug.copies: missing files to search: %d\n'
165 165 % len(missing)
166 166 )
167 167
168 168 ancestrycontext = a._repo.changelog.ancestors([b.rev()], inclusive=True)
169 169
170 170 for f in sorted(missing):
171 171 if debug:
172 172 dbg(b'debug.copies: tracing file: %s\n' % f)
173 173 fctx = b[f]
174 174 fctx._ancestrycontext = ancestrycontext
175 175
176 176 if debug:
177 177 start = util.timer()
178 178 opath = _tracefile(fctx, am, basemf)
179 179 if opath:
180 180 if debug:
181 181 dbg(b'debug.copies: rename of: %s\n' % opath)
182 182 cm[f] = opath
183 183 if debug:
184 184 dbg(
185 185 b'debug.copies: time: %f seconds\n'
186 186 % (util.timer() - start)
187 187 )
188 188 return cm
189 189
190 190
191 191 def _revinfo_getter(repo, match):
192 192 """returns a function that returns the following data given a <rev>"
193 193
194 194 * p1: revision number of first parent
195 195 * p2: revision number of first parent
196 196 * changes: a ChangingFiles object
197 197 """
198 198 cl = repo.changelog
199 199 parents = cl.parentrevs
200 200 flags = cl.flags
201 201
202 202 HASCOPIESINFO = flagutil.REVIDX_HASCOPIESINFO
203 203
204 204 changelogrevision = cl.changelogrevision
205 205
206 206 if rustmod is not None:
207 207
208 208 def revinfo(rev):
209 209 p1, p2 = parents(rev)
210 210 if flags(rev) & HASCOPIESINFO:
211 211 raw = changelogrevision(rev)._sidedata.get(sidedatamod.SD_FILES)
212 212 else:
213 213 raw = None
214 214 return (p1, p2, raw)
215 215
216 216 else:
217 217
218 218 def revinfo(rev):
219 219 p1, p2 = parents(rev)
220 220 if flags(rev) & HASCOPIESINFO:
221 221 changes = changelogrevision(rev).changes
222 222 else:
223 223 changes = None
224 224 return (p1, p2, changes)
225 225
226 226 return revinfo
227 227
228 228
229 229 def cached_is_ancestor(is_ancestor):
230 230 """return a cached version of is_ancestor"""
231 231 cache = {}
232 232
233 233 def _is_ancestor(anc, desc):
234 234 if anc > desc:
235 235 return False
236 236 elif anc == desc:
237 237 return True
238 238 key = (anc, desc)
239 239 ret = cache.get(key)
240 240 if ret is None:
241 241 ret = cache[key] = is_ancestor(anc, desc)
242 242 return ret
243 243
244 244 return _is_ancestor
245 245
246 246
247 247 def _changesetforwardcopies(a, b, match):
248 248 if a.rev() in (nullrev, b.rev()):
249 249 return {}
250 250
251 251 repo = a.repo().unfiltered()
252 252 children = {}
253 253
254 254 cl = repo.changelog
255 255 isancestor = cl.isancestorrev
256 256
257 257 # To track rename from "A" to B, we need to gather all parent → children
258 258 # edges that are contains in `::B` but not in `::A`.
259 259 #
260 260 #
261 261 # To do so, we need to gather all revisions exclusive¹ to "B" (ie¹: `::b -
262 262 # ::a`) and also all the "roots point", ie the parents of the exclusive set
263 263 # that belong to ::a. These are exactly all the revisions needed to express
264 264 # the parent → children we need to combine.
265 265 #
266 266 # [1] actually, we need to gather all the edges within `(::a)::b`, ie:
267 267 # excluding paths that leads to roots that are not ancestors of `a`. We
268 268 # keep this out of the explanation because it is hard enough without this special case..
269 269
270 270 parents = cl._uncheckedparentrevs
271 271 graph_roots = (nullrev, nullrev)
272 272
273 273 ancestors = cl.ancestors([a.rev()], inclusive=True)
274 274 revs = cl.findmissingrevs(common=[a.rev()], heads=[b.rev()])
275 275 roots = set()
276 276 has_graph_roots = False
277 multi_thread = repo.ui.configbool(b'devel', b'copy-tracing.multi-thread')
277 278
278 279 # iterate over `only(B, A)`
279 280 for r in revs:
280 281 ps = parents(r)
281 282 if ps == graph_roots:
282 283 has_graph_roots = True
283 284 else:
284 285 p1, p2 = ps
285 286
286 287 # find all the "root points" (see larger comment above)
287 288 if p1 != nullrev and p1 in ancestors:
288 289 roots.add(p1)
289 290 if p2 != nullrev and p2 in ancestors:
290 291 roots.add(p2)
291 292 if not roots:
292 293 # no common revision to track copies from
293 294 return {}
294 295 if has_graph_roots:
295 296 # this deal with the special case mentionned in the [1] footnotes. We
296 297 # must filter out revisions that leads to non-common graphroots.
297 298 roots = list(roots)
298 299 m = min(roots)
299 300 h = [b.rev()]
300 301 roots_to_head = cl.reachableroots(m, h, roots, includepath=True)
301 302 roots_to_head = set(roots_to_head)
302 303 revs = [r for r in revs if r in roots_to_head]
303 304
304 305 if repo.filecopiesmode == b'changeset-sidedata':
305 306 # When using side-data, we will process the edges "from" the children.
306 307 # We iterate over the childre, gathering previous collected data for
307 308 # the parents. Do know when the parents data is no longer necessary, we
308 309 # keep a counter of how many children each revision has.
309 310 #
310 311 # An interresting property of `children_count` is that it only contains
311 312 # revision that will be relevant for a edge of the graph. So if a
312 313 # children has parent not in `children_count`, that edges should not be
313 314 # processed.
314 315 children_count = dict((r, 0) for r in roots)
315 316 for r in revs:
316 317 for p in cl.parentrevs(r):
317 318 if p == nullrev:
318 319 continue
319 320 children_count[r] = 0
320 321 if p in children_count:
321 322 children_count[p] += 1
322 323 revinfo = _revinfo_getter(repo, match)
323 324 return _combine_changeset_copies(
324 revs, children_count, b.rev(), revinfo, match, isancestor
325 revs,
326 children_count,
327 b.rev(),
328 revinfo,
329 match,
330 isancestor,
331 multi_thread,
325 332 )
326 333 else:
327 334 # When not using side-data, we will process the edges "from" the parent.
328 335 # so we need a full mapping of the parent -> children relation.
329 336 children = dict((r, []) for r in roots)
330 337 for r in revs:
331 338 for p in cl.parentrevs(r):
332 339 if p == nullrev:
333 340 continue
334 341 children[r] = []
335 342 if p in children:
336 343 children[p].append(r)
337 344 x = revs.pop()
338 345 assert x == b.rev()
339 346 revs.extend(roots)
340 347 revs.sort()
341 348
342 349 revinfo = _revinfo_getter_extra(repo)
343 350 return _combine_changeset_copies_extra(
344 351 revs, children, b.rev(), revinfo, match, isancestor
345 352 )
346 353
347 354
348 355 def _combine_changeset_copies(
349 revs, children_count, targetrev, revinfo, match, isancestor
356 revs, children_count, targetrev, revinfo, match, isancestor, multi_thread
350 357 ):
351 358 """combine the copies information for each item of iterrevs
352 359
353 360 revs: sorted iterable of revision to visit
354 361 children_count: a {parent: <number-of-relevant-children>} mapping.
355 362 targetrev: the final copies destination revision (not in iterrevs)
356 363 revinfo(rev): a function that return (p1, p2, p1copies, p2copies, removed)
357 364 match: a matcher
358 365
359 366 It returns the aggregated copies information for `targetrev`.
360 367 """
361 368
362 369 alwaysmatch = match.always()
363 370
364 371 if rustmod is not None:
365 372 final_copies = rustmod.combine_changeset_copies(
366 list(revs), children_count, targetrev, revinfo
373 list(revs), children_count, targetrev, revinfo, multi_thread
367 374 )
368 375 else:
369 376 isancestor = cached_is_ancestor(isancestor)
370 377
371 378 all_copies = {}
372 379 # iterate over all the "children" side of copy tracing "edge"
373 380 for current_rev in revs:
374 381 p1, p2, changes = revinfo(current_rev)
375 382 current_copies = None
376 383 # iterate over all parents to chain the existing data with the
377 384 # data from the parent → child edge.
378 385 for parent, parent_rev in ((1, p1), (2, p2)):
379 386 if parent_rev == nullrev:
380 387 continue
381 388 remaining_children = children_count.get(parent_rev)
382 389 if remaining_children is None:
383 390 continue
384 391 remaining_children -= 1
385 392 children_count[parent_rev] = remaining_children
386 393 if remaining_children:
387 394 copies = all_copies.get(parent_rev, None)
388 395 else:
389 396 copies = all_copies.pop(parent_rev, None)
390 397
391 398 if copies is None:
392 399 # this is a root
393 400 newcopies = copies = {}
394 401 elif remaining_children:
395 402 newcopies = copies.copy()
396 403 else:
397 404 newcopies = copies
398 405 # chain the data in the edge with the existing data
399 406 if changes is not None:
400 407 childcopies = {}
401 408 if parent == 1:
402 409 childcopies = changes.copied_from_p1
403 410 elif parent == 2:
404 411 childcopies = changes.copied_from_p2
405 412
406 413 if childcopies:
407 414 newcopies = copies.copy()
408 415 for dest, source in pycompat.iteritems(childcopies):
409 416 prev = copies.get(source)
410 417 if prev is not None and prev[1] is not None:
411 418 source = prev[1]
412 419 newcopies[dest] = (current_rev, source)
413 420 assert newcopies is not copies
414 421 if changes.removed:
415 422 for f in changes.removed:
416 423 if f in newcopies:
417 424 if newcopies is copies:
418 425 # copy on write to avoid affecting potential other
419 426 # branches. when there are no other branches, this
420 427 # could be avoided.
421 428 newcopies = copies.copy()
422 429 newcopies[f] = (current_rev, None)
423 430 # check potential need to combine the data from another parent (for
424 431 # that child). See comment below for details.
425 432 if current_copies is None:
426 433 current_copies = newcopies
427 434 else:
428 435 # we are the second parent to work on c, we need to merge our
429 436 # work with the other.
430 437 #
431 438 # In case of conflict, parent 1 take precedence over parent 2.
432 439 # This is an arbitrary choice made anew when implementing
433 440 # changeset based copies. It was made without regards with
434 441 # potential filelog related behavior.
435 442 assert parent == 2
436 443 current_copies = _merge_copies_dict(
437 444 newcopies,
438 445 current_copies,
439 446 isancestor,
440 447 changes,
441 448 current_rev,
442 449 )
443 450 all_copies[current_rev] = current_copies
444 451
445 452 # filter out internal details and return a {dest: source mapping}
446 453 final_copies = {}
447 454 for dest, (tt, source) in all_copies[targetrev].items():
448 455 if source is not None:
449 456 final_copies[dest] = source
450 457 if not alwaysmatch:
451 458 for filename in list(final_copies.keys()):
452 459 if not match(filename):
453 460 del final_copies[filename]
454 461 return final_copies
455 462
456 463
457 464 # constant to decide which side to pick with _merge_copies_dict
458 465 PICK_MINOR = 0
459 466 PICK_MAJOR = 1
460 467 PICK_EITHER = 2
461 468
462 469
463 470 def _merge_copies_dict(minor, major, isancestor, changes, current_merge):
464 471 """merge two copies-mapping together, minor and major
465 472
466 473 In case of conflict, value from "major" will be picked.
467 474
468 475 - `isancestors(low_rev, high_rev)`: callable return True if `low_rev` is an
469 476 ancestors of `high_rev`,
470 477
471 478 - `ismerged(path)`: callable return True if `path` have been merged in the
472 479 current revision,
473 480
474 481 return the resulting dict (in practice, the "minor" object, updated)
475 482 """
476 483 for dest, value in major.items():
477 484 other = minor.get(dest)
478 485 if other is None:
479 486 minor[dest] = value
480 487 else:
481 488 pick, overwrite = _compare_values(
482 489 changes, isancestor, dest, other, value
483 490 )
484 491 if overwrite:
485 492 if pick == PICK_MAJOR:
486 493 minor[dest] = (current_merge, value[1])
487 494 else:
488 495 minor[dest] = (current_merge, other[1])
489 496 elif pick == PICK_MAJOR:
490 497 minor[dest] = value
491 498 return minor
492 499
493 500
494 501 def _compare_values(changes, isancestor, dest, minor, major):
495 502 """compare two value within a _merge_copies_dict loop iteration
496 503
497 504 return (pick, overwrite).
498 505
499 506 - pick is one of PICK_MINOR, PICK_MAJOR or PICK_EITHER
500 507 - overwrite is True if pick is a return of an ambiguity that needs resolution.
501 508 """
502 509 major_tt, major_value = major
503 510 minor_tt, minor_value = minor
504 511
505 512 if major_tt == minor_tt:
506 513 # if it comes from the same revision it must be the same value
507 514 assert major_value == minor_value
508 515 return PICK_EITHER, False
509 516 elif (
510 517 changes is not None
511 518 and minor_value is not None
512 519 and major_value is None
513 520 and dest in changes.salvaged
514 521 ):
515 522 # In this case, a deletion was reverted, the "alive" value overwrite
516 523 # the deleted one.
517 524 return PICK_MINOR, True
518 525 elif (
519 526 changes is not None
520 527 and major_value is not None
521 528 and minor_value is None
522 529 and dest in changes.salvaged
523 530 ):
524 531 # In this case, a deletion was reverted, the "alive" value overwrite
525 532 # the deleted one.
526 533 return PICK_MAJOR, True
527 534 elif isancestor(minor_tt, major_tt):
528 535 if changes is not None and dest in changes.merged:
529 536 # change to dest happened on the branch without copy-source change,
530 537 # so both source are valid and "major" wins.
531 538 return PICK_MAJOR, True
532 539 else:
533 540 return PICK_MAJOR, False
534 541 elif isancestor(major_tt, minor_tt):
535 542 if changes is not None and dest in changes.merged:
536 543 # change to dest happened on the branch without copy-source change,
537 544 # so both source are valid and "major" wins.
538 545 return PICK_MAJOR, True
539 546 else:
540 547 return PICK_MINOR, False
541 548 elif minor_value is None:
542 549 # in case of conflict, the "alive" side wins.
543 550 return PICK_MAJOR, True
544 551 elif major_value is None:
545 552 # in case of conflict, the "alive" side wins.
546 553 return PICK_MINOR, True
547 554 else:
548 555 # in case of conflict where both side are alive, major wins.
549 556 return PICK_MAJOR, True
550 557
551 558
552 559 def _revinfo_getter_extra(repo):
553 560 """return a function that return multiple data given a <rev>"i
554 561
555 562 * p1: revision number of first parent
556 563 * p2: revision number of first parent
557 564 * p1copies: mapping of copies from p1
558 565 * p2copies: mapping of copies from p2
559 566 * removed: a list of removed files
560 567 * ismerged: a callback to know if file was merged in that revision
561 568 """
562 569 cl = repo.changelog
563 570 parents = cl.parentrevs
564 571
565 572 def get_ismerged(rev):
566 573 ctx = repo[rev]
567 574
568 575 def ismerged(path):
569 576 if path not in ctx.files():
570 577 return False
571 578 fctx = ctx[path]
572 579 parents = fctx._filelog.parents(fctx._filenode)
573 580 nb_parents = 0
574 581 for n in parents:
575 582 if n != nullid:
576 583 nb_parents += 1
577 584 return nb_parents >= 2
578 585
579 586 return ismerged
580 587
581 588 def revinfo(rev):
582 589 p1, p2 = parents(rev)
583 590 ctx = repo[rev]
584 591 p1copies, p2copies = ctx._copies
585 592 removed = ctx.filesremoved()
586 593 return p1, p2, p1copies, p2copies, removed, get_ismerged(rev)
587 594
588 595 return revinfo
589 596
590 597
591 598 def _combine_changeset_copies_extra(
592 599 revs, children, targetrev, revinfo, match, isancestor
593 600 ):
594 601 """version of `_combine_changeset_copies` that works with the Google
595 602 specific "extra" based storage for copy information"""
596 603 all_copies = {}
597 604 alwaysmatch = match.always()
598 605 for r in revs:
599 606 copies = all_copies.pop(r, None)
600 607 if copies is None:
601 608 # this is a root
602 609 copies = {}
603 610 for i, c in enumerate(children[r]):
604 611 p1, p2, p1copies, p2copies, removed, ismerged = revinfo(c)
605 612 if r == p1:
606 613 parent = 1
607 614 childcopies = p1copies
608 615 else:
609 616 assert r == p2
610 617 parent = 2
611 618 childcopies = p2copies
612 619 if not alwaysmatch:
613 620 childcopies = {
614 621 dst: src for dst, src in childcopies.items() if match(dst)
615 622 }
616 623 newcopies = copies
617 624 if childcopies:
618 625 newcopies = copies.copy()
619 626 for dest, source in pycompat.iteritems(childcopies):
620 627 prev = copies.get(source)
621 628 if prev is not None and prev[1] is not None:
622 629 source = prev[1]
623 630 newcopies[dest] = (c, source)
624 631 assert newcopies is not copies
625 632 for f in removed:
626 633 if f in newcopies:
627 634 if newcopies is copies:
628 635 # copy on write to avoid affecting potential other
629 636 # branches. when there are no other branches, this
630 637 # could be avoided.
631 638 newcopies = copies.copy()
632 639 newcopies[f] = (c, None)
633 640 othercopies = all_copies.get(c)
634 641 if othercopies is None:
635 642 all_copies[c] = newcopies
636 643 else:
637 644 # we are the second parent to work on c, we need to merge our
638 645 # work with the other.
639 646 #
640 647 # In case of conflict, parent 1 take precedence over parent 2.
641 648 # This is an arbitrary choice made anew when implementing
642 649 # changeset based copies. It was made without regards with
643 650 # potential filelog related behavior.
644 651 if parent == 1:
645 652 _merge_copies_dict_extra(
646 653 othercopies, newcopies, isancestor, ismerged
647 654 )
648 655 else:
649 656 _merge_copies_dict_extra(
650 657 newcopies, othercopies, isancestor, ismerged
651 658 )
652 659 all_copies[c] = newcopies
653 660
654 661 final_copies = {}
655 662 for dest, (tt, source) in all_copies[targetrev].items():
656 663 if source is not None:
657 664 final_copies[dest] = source
658 665 return final_copies
659 666
660 667
661 668 def _merge_copies_dict_extra(minor, major, isancestor, ismerged):
662 669 """version of `_merge_copies_dict` that works with the Google
663 670 specific "extra" based storage for copy information"""
664 671 for dest, value in major.items():
665 672 other = minor.get(dest)
666 673 if other is None:
667 674 minor[dest] = value
668 675 else:
669 676 new_tt = value[0]
670 677 other_tt = other[0]
671 678 if value[1] == other[1]:
672 679 continue
673 680 # content from "major" wins, unless it is older
674 681 # than the branch point or there is a merge
675 682 if (
676 683 new_tt == other_tt
677 684 or not isancestor(new_tt, other_tt)
678 685 or ismerged(dest)
679 686 ):
680 687 minor[dest] = value
681 688
682 689
683 690 def _forwardcopies(a, b, base=None, match=None):
684 691 """find {dst@b: src@a} copy mapping where a is an ancestor of b"""
685 692
686 693 if base is None:
687 694 base = a
688 695 match = a.repo().narrowmatch(match)
689 696 # check for working copy
690 697 if b.rev() is None:
691 698 cm = _committedforwardcopies(a, b.p1(), base, match)
692 699 # combine copies from dirstate if necessary
693 700 copies = _chain(cm, _dirstatecopies(b._repo, match))
694 701 else:
695 702 copies = _committedforwardcopies(a, b, base, match)
696 703 return copies
697 704
698 705
699 706 def _backwardrenames(a, b, match):
700 707 if a._repo.ui.config(b'experimental', b'copytrace') == b'off':
701 708 return {}
702 709
703 710 # Even though we're not taking copies into account, 1:n rename situations
704 711 # can still exist (e.g. hg cp a b; hg mv a c). In those cases we
705 712 # arbitrarily pick one of the renames.
706 713 # We don't want to pass in "match" here, since that would filter
707 714 # the destination by it. Since we're reversing the copies, we want
708 715 # to filter the source instead.
709 716 f = _forwardcopies(b, a)
710 717 r = {}
711 718 for k, v in sorted(pycompat.iteritems(f)):
712 719 if match and not match(v):
713 720 continue
714 721 # remove copies
715 722 if v in a:
716 723 continue
717 724 r[v] = k
718 725 return r
719 726
720 727
721 728 def pathcopies(x, y, match=None):
722 729 """find {dst@y: src@x} copy mapping for directed compare"""
723 730 repo = x._repo
724 731 debug = repo.ui.debugflag and repo.ui.configbool(b'devel', b'debug.copies')
725 732 if debug:
726 733 repo.ui.debug(
727 734 b'debug.copies: searching copies from %s to %s\n' % (x, y)
728 735 )
729 736 if x == y or not x or not y:
730 737 return {}
731 738 if y.rev() is None and x == y.p1():
732 739 if debug:
733 740 repo.ui.debug(b'debug.copies: search mode: dirstate\n')
734 741 # short-circuit to avoid issues with merge states
735 742 return _dirstatecopies(repo, match)
736 743 a = y.ancestor(x)
737 744 if a == x:
738 745 if debug:
739 746 repo.ui.debug(b'debug.copies: search mode: forward\n')
740 747 copies = _forwardcopies(x, y, match=match)
741 748 elif a == y:
742 749 if debug:
743 750 repo.ui.debug(b'debug.copies: search mode: backward\n')
744 751 copies = _backwardrenames(x, y, match=match)
745 752 else:
746 753 if debug:
747 754 repo.ui.debug(b'debug.copies: search mode: combined\n')
748 755 base = None
749 756 if a.rev() != nullrev:
750 757 base = x
751 758 copies = _chain(
752 759 _backwardrenames(x, a, match=match),
753 760 _forwardcopies(a, y, base, match=match),
754 761 )
755 762 _filter(x, y, copies)
756 763 return copies
757 764
758 765
759 766 def mergecopies(repo, c1, c2, base):
760 767 """
761 768 Finds moves and copies between context c1 and c2 that are relevant for
762 769 merging. 'base' will be used as the merge base.
763 770
764 771 Copytracing is used in commands like rebase, merge, unshelve, etc to merge
765 772 files that were moved/ copied in one merge parent and modified in another.
766 773 For example:
767 774
768 775 o ---> 4 another commit
769 776 |
770 777 | o ---> 3 commit that modifies a.txt
771 778 | /
772 779 o / ---> 2 commit that moves a.txt to b.txt
773 780 |/
774 781 o ---> 1 merge base
775 782
776 783 If we try to rebase revision 3 on revision 4, since there is no a.txt in
777 784 revision 4, and if user have copytrace disabled, we prints the following
778 785 message:
779 786
780 787 ```other changed <file> which local deleted```
781 788
782 789 Returns a tuple where:
783 790
784 791 "branch_copies" an instance of branch_copies.
785 792
786 793 "diverge" is a mapping of source name -> list of destination names
787 794 for divergent renames.
788 795
789 796 This function calls different copytracing algorithms based on config.
790 797 """
791 798 # avoid silly behavior for update from empty dir
792 799 if not c1 or not c2 or c1 == c2:
793 800 return branch_copies(), branch_copies(), {}
794 801
795 802 narrowmatch = c1.repo().narrowmatch()
796 803
797 804 # avoid silly behavior for parent -> working dir
798 805 if c2.node() is None and c1.node() == repo.dirstate.p1():
799 806 return (
800 807 branch_copies(_dirstatecopies(repo, narrowmatch)),
801 808 branch_copies(),
802 809 {},
803 810 )
804 811
805 812 copytracing = repo.ui.config(b'experimental', b'copytrace')
806 813 if stringutil.parsebool(copytracing) is False:
807 814 # stringutil.parsebool() returns None when it is unable to parse the
808 815 # value, so we should rely on making sure copytracing is on such cases
809 816 return branch_copies(), branch_copies(), {}
810 817
811 818 if usechangesetcentricalgo(repo):
812 819 # The heuristics don't make sense when we need changeset-centric algos
813 820 return _fullcopytracing(repo, c1, c2, base)
814 821
815 822 # Copy trace disabling is explicitly below the node == p1 logic above
816 823 # because the logic above is required for a simple copy to be kept across a
817 824 # rebase.
818 825 if copytracing == b'heuristics':
819 826 # Do full copytracing if only non-public revisions are involved as
820 827 # that will be fast enough and will also cover the copies which could
821 828 # be missed by heuristics
822 829 if _isfullcopytraceable(repo, c1, base):
823 830 return _fullcopytracing(repo, c1, c2, base)
824 831 return _heuristicscopytracing(repo, c1, c2, base)
825 832 else:
826 833 return _fullcopytracing(repo, c1, c2, base)
827 834
828 835
829 836 def _isfullcopytraceable(repo, c1, base):
830 837 """Checks that if base, source and destination are all no-public branches,
831 838 if yes let's use the full copytrace algorithm for increased capabilities
832 839 since it will be fast enough.
833 840
834 841 `experimental.copytrace.sourcecommitlimit` can be used to set a limit for
835 842 number of changesets from c1 to base such that if number of changesets are
836 843 more than the limit, full copytracing algorithm won't be used.
837 844 """
838 845 if c1.rev() is None:
839 846 c1 = c1.p1()
840 847 if c1.mutable() and base.mutable():
841 848 sourcecommitlimit = repo.ui.configint(
842 849 b'experimental', b'copytrace.sourcecommitlimit'
843 850 )
844 851 commits = len(repo.revs(b'%d::%d', base.rev(), c1.rev()))
845 852 return commits < sourcecommitlimit
846 853 return False
847 854
848 855
849 856 def _checksinglesidecopies(
850 857 src, dsts1, m1, m2, mb, c2, base, copy, renamedelete
851 858 ):
852 859 if src not in m2:
853 860 # deleted on side 2
854 861 if src not in m1:
855 862 # renamed on side 1, deleted on side 2
856 863 renamedelete[src] = dsts1
857 864 elif src not in mb:
858 865 # Work around the "short-circuit to avoid issues with merge states"
859 866 # thing in pathcopies(): pathcopies(x, y) can return a copy where the
860 867 # destination doesn't exist in y.
861 868 pass
862 869 elif mb[src] != m2[src] and not _related(c2[src], base[src]):
863 870 return
864 871 elif mb[src] != m2[src] or mb.flags(src) != m2.flags(src):
865 872 # modified on side 2
866 873 for dst in dsts1:
867 874 copy[dst] = src
868 875
869 876
870 877 class branch_copies(object):
871 878 """Information about copies made on one side of a merge/graft.
872 879
873 880 "copy" is a mapping from destination name -> source name,
874 881 where source is in c1 and destination is in c2 or vice-versa.
875 882
876 883 "movewithdir" is a mapping from source name -> destination name,
877 884 where the file at source present in one context but not the other
878 885 needs to be moved to destination by the merge process, because the
879 886 other context moved the directory it is in.
880 887
881 888 "renamedelete" is a mapping of source name -> list of destination
882 889 names for files deleted in c1 that were renamed in c2 or vice-versa.
883 890
884 891 "dirmove" is a mapping of detected source dir -> destination dir renames.
885 892 This is needed for handling changes to new files previously grafted into
886 893 renamed directories.
887 894 """
888 895
889 896 def __init__(
890 897 self, copy=None, renamedelete=None, dirmove=None, movewithdir=None
891 898 ):
892 899 self.copy = {} if copy is None else copy
893 900 self.renamedelete = {} if renamedelete is None else renamedelete
894 901 self.dirmove = {} if dirmove is None else dirmove
895 902 self.movewithdir = {} if movewithdir is None else movewithdir
896 903
897 904 def __repr__(self):
898 905 return '<branch_copies\n copy=%r\n renamedelete=%r\n dirmove=%r\n movewithdir=%r\n>' % (
899 906 self.copy,
900 907 self.renamedelete,
901 908 self.dirmove,
902 909 self.movewithdir,
903 910 )
904 911
905 912
906 913 def _fullcopytracing(repo, c1, c2, base):
907 914 """The full copytracing algorithm which finds all the new files that were
908 915 added from merge base up to the top commit and for each file it checks if
909 916 this file was copied from another file.
910 917
911 918 This is pretty slow when a lot of changesets are involved but will track all
912 919 the copies.
913 920 """
914 921 m1 = c1.manifest()
915 922 m2 = c2.manifest()
916 923 mb = base.manifest()
917 924
918 925 copies1 = pathcopies(base, c1)
919 926 copies2 = pathcopies(base, c2)
920 927
921 928 if not (copies1 or copies2):
922 929 return branch_copies(), branch_copies(), {}
923 930
924 931 inversecopies1 = {}
925 932 inversecopies2 = {}
926 933 for dst, src in copies1.items():
927 934 inversecopies1.setdefault(src, []).append(dst)
928 935 for dst, src in copies2.items():
929 936 inversecopies2.setdefault(src, []).append(dst)
930 937
931 938 copy1 = {}
932 939 copy2 = {}
933 940 diverge = {}
934 941 renamedelete1 = {}
935 942 renamedelete2 = {}
936 943 allsources = set(inversecopies1) | set(inversecopies2)
937 944 for src in allsources:
938 945 dsts1 = inversecopies1.get(src)
939 946 dsts2 = inversecopies2.get(src)
940 947 if dsts1 and dsts2:
941 948 # copied/renamed on both sides
942 949 if src not in m1 and src not in m2:
943 950 # renamed on both sides
944 951 dsts1 = set(dsts1)
945 952 dsts2 = set(dsts2)
946 953 # If there's some overlap in the rename destinations, we
947 954 # consider it not divergent. For example, if side 1 copies 'a'
948 955 # to 'b' and 'c' and deletes 'a', and side 2 copies 'a' to 'c'
949 956 # and 'd' and deletes 'a'.
950 957 if dsts1 & dsts2:
951 958 for dst in dsts1 & dsts2:
952 959 copy1[dst] = src
953 960 copy2[dst] = src
954 961 else:
955 962 diverge[src] = sorted(dsts1 | dsts2)
956 963 elif src in m1 and src in m2:
957 964 # copied on both sides
958 965 dsts1 = set(dsts1)
959 966 dsts2 = set(dsts2)
960 967 for dst in dsts1 & dsts2:
961 968 copy1[dst] = src
962 969 copy2[dst] = src
963 970 # TODO: Handle cases where it was renamed on one side and copied
964 971 # on the other side
965 972 elif dsts1:
966 973 # copied/renamed only on side 1
967 974 _checksinglesidecopies(
968 975 src, dsts1, m1, m2, mb, c2, base, copy1, renamedelete1
969 976 )
970 977 elif dsts2:
971 978 # copied/renamed only on side 2
972 979 _checksinglesidecopies(
973 980 src, dsts2, m2, m1, mb, c1, base, copy2, renamedelete2
974 981 )
975 982
976 983 # find interesting file sets from manifests
977 984 cache = []
978 985
979 986 def _get_addedfiles(idx):
980 987 if not cache:
981 988 addedinm1 = m1.filesnotin(mb, repo.narrowmatch())
982 989 addedinm2 = m2.filesnotin(mb, repo.narrowmatch())
983 990 u1 = sorted(addedinm1 - addedinm2)
984 991 u2 = sorted(addedinm2 - addedinm1)
985 992 cache.extend((u1, u2))
986 993 return cache[idx]
987 994
988 995 u1fn = lambda: _get_addedfiles(0)
989 996 u2fn = lambda: _get_addedfiles(1)
990 997 if repo.ui.debugflag:
991 998 u1 = u1fn()
992 999 u2 = u2fn()
993 1000
994 1001 header = b" unmatched files in %s"
995 1002 if u1:
996 1003 repo.ui.debug(
997 1004 b"%s:\n %s\n" % (header % b'local', b"\n ".join(u1))
998 1005 )
999 1006 if u2:
1000 1007 repo.ui.debug(
1001 1008 b"%s:\n %s\n" % (header % b'other', b"\n ".join(u2))
1002 1009 )
1003 1010
1004 1011 renamedeleteset = set()
1005 1012 divergeset = set()
1006 1013 for dsts in diverge.values():
1007 1014 divergeset.update(dsts)
1008 1015 for dsts in renamedelete1.values():
1009 1016 renamedeleteset.update(dsts)
1010 1017 for dsts in renamedelete2.values():
1011 1018 renamedeleteset.update(dsts)
1012 1019
1013 1020 repo.ui.debug(
1014 1021 b" all copies found (* = to merge, ! = divergent, "
1015 1022 b"% = renamed and deleted):\n"
1016 1023 )
1017 1024 for side, copies in ((b"local", copies1), (b"remote", copies2)):
1018 1025 if not copies:
1019 1026 continue
1020 1027 repo.ui.debug(b" on %s side:\n" % side)
1021 1028 for f in sorted(copies):
1022 1029 note = b""
1023 1030 if f in copy1 or f in copy2:
1024 1031 note += b"*"
1025 1032 if f in divergeset:
1026 1033 note += b"!"
1027 1034 if f in renamedeleteset:
1028 1035 note += b"%"
1029 1036 repo.ui.debug(
1030 1037 b" src: '%s' -> dst: '%s' %s\n" % (copies[f], f, note)
1031 1038 )
1032 1039 del renamedeleteset
1033 1040 del divergeset
1034 1041
1035 1042 repo.ui.debug(b" checking for directory renames\n")
1036 1043
1037 1044 dirmove1, movewithdir2 = _dir_renames(repo, c1, copy1, copies1, u2fn)
1038 1045 dirmove2, movewithdir1 = _dir_renames(repo, c2, copy2, copies2, u1fn)
1039 1046
1040 1047 branch_copies1 = branch_copies(copy1, renamedelete1, dirmove1, movewithdir1)
1041 1048 branch_copies2 = branch_copies(copy2, renamedelete2, dirmove2, movewithdir2)
1042 1049
1043 1050 return branch_copies1, branch_copies2, diverge
1044 1051
1045 1052
1046 1053 def _dir_renames(repo, ctx, copy, fullcopy, addedfilesfn):
1047 1054 """Finds moved directories and files that should move with them.
1048 1055
1049 1056 ctx: the context for one of the sides
1050 1057 copy: files copied on the same side (as ctx)
1051 1058 fullcopy: files copied on the same side (as ctx), including those that
1052 1059 merge.manifestmerge() won't care about
1053 1060 addedfilesfn: function returning added files on the other side (compared to
1054 1061 ctx)
1055 1062 """
1056 1063 # generate a directory move map
1057 1064 invalid = set()
1058 1065 dirmove = {}
1059 1066
1060 1067 # examine each file copy for a potential directory move, which is
1061 1068 # when all the files in a directory are moved to a new directory
1062 1069 for dst, src in pycompat.iteritems(fullcopy):
1063 1070 dsrc, ddst = pathutil.dirname(src), pathutil.dirname(dst)
1064 1071 if dsrc in invalid:
1065 1072 # already seen to be uninteresting
1066 1073 continue
1067 1074 elif ctx.hasdir(dsrc) and ctx.hasdir(ddst):
1068 1075 # directory wasn't entirely moved locally
1069 1076 invalid.add(dsrc)
1070 1077 elif dsrc in dirmove and dirmove[dsrc] != ddst:
1071 1078 # files from the same directory moved to two different places
1072 1079 invalid.add(dsrc)
1073 1080 else:
1074 1081 # looks good so far
1075 1082 dirmove[dsrc] = ddst
1076 1083
1077 1084 for i in invalid:
1078 1085 if i in dirmove:
1079 1086 del dirmove[i]
1080 1087 del invalid
1081 1088
1082 1089 if not dirmove:
1083 1090 return {}, {}
1084 1091
1085 1092 dirmove = {k + b"/": v + b"/" for k, v in pycompat.iteritems(dirmove)}
1086 1093
1087 1094 for d in dirmove:
1088 1095 repo.ui.debug(
1089 1096 b" discovered dir src: '%s' -> dst: '%s'\n" % (d, dirmove[d])
1090 1097 )
1091 1098
1092 1099 movewithdir = {}
1093 1100 # check unaccounted nonoverlapping files against directory moves
1094 1101 for f in addedfilesfn():
1095 1102 if f not in fullcopy:
1096 1103 for d in dirmove:
1097 1104 if f.startswith(d):
1098 1105 # new file added in a directory that was moved, move it
1099 1106 df = dirmove[d] + f[len(d) :]
1100 1107 if df not in copy:
1101 1108 movewithdir[f] = df
1102 1109 repo.ui.debug(
1103 1110 b" pending file src: '%s' -> dst: '%s'\n"
1104 1111 % (f, df)
1105 1112 )
1106 1113 break
1107 1114
1108 1115 return dirmove, movewithdir
1109 1116
1110 1117
1111 1118 def _heuristicscopytracing(repo, c1, c2, base):
1112 1119 """Fast copytracing using filename heuristics
1113 1120
1114 1121 Assumes that moves or renames are of following two types:
1115 1122
1116 1123 1) Inside a directory only (same directory name but different filenames)
1117 1124 2) Move from one directory to another
1118 1125 (same filenames but different directory names)
1119 1126
1120 1127 Works only when there are no merge commits in the "source branch".
1121 1128 Source branch is commits from base up to c2 not including base.
1122 1129
1123 1130 If merge is involved it fallbacks to _fullcopytracing().
1124 1131
1125 1132 Can be used by setting the following config:
1126 1133
1127 1134 [experimental]
1128 1135 copytrace = heuristics
1129 1136
1130 1137 In some cases the copy/move candidates found by heuristics can be very large
1131 1138 in number and that will make the algorithm slow. The number of possible
1132 1139 candidates to check can be limited by using the config
1133 1140 `experimental.copytrace.movecandidateslimit` which defaults to 100.
1134 1141 """
1135 1142
1136 1143 if c1.rev() is None:
1137 1144 c1 = c1.p1()
1138 1145 if c2.rev() is None:
1139 1146 c2 = c2.p1()
1140 1147
1141 1148 changedfiles = set()
1142 1149 m1 = c1.manifest()
1143 1150 if not repo.revs(b'%d::%d', base.rev(), c2.rev()):
1144 1151 # If base is not in c2 branch, we switch to fullcopytracing
1145 1152 repo.ui.debug(
1146 1153 b"switching to full copytracing as base is not "
1147 1154 b"an ancestor of c2\n"
1148 1155 )
1149 1156 return _fullcopytracing(repo, c1, c2, base)
1150 1157
1151 1158 ctx = c2
1152 1159 while ctx != base:
1153 1160 if len(ctx.parents()) == 2:
1154 1161 # To keep things simple let's not handle merges
1155 1162 repo.ui.debug(b"switching to full copytracing because of merges\n")
1156 1163 return _fullcopytracing(repo, c1, c2, base)
1157 1164 changedfiles.update(ctx.files())
1158 1165 ctx = ctx.p1()
1159 1166
1160 1167 copies2 = {}
1161 1168 cp = _forwardcopies(base, c2)
1162 1169 for dst, src in pycompat.iteritems(cp):
1163 1170 if src in m1:
1164 1171 copies2[dst] = src
1165 1172
1166 1173 # file is missing if it isn't present in the destination, but is present in
1167 1174 # the base and present in the source.
1168 1175 # Presence in the base is important to exclude added files, presence in the
1169 1176 # source is important to exclude removed files.
1170 1177 filt = lambda f: f not in m1 and f in base and f in c2
1171 1178 missingfiles = [f for f in changedfiles if filt(f)]
1172 1179
1173 1180 copies1 = {}
1174 1181 if missingfiles:
1175 1182 basenametofilename = collections.defaultdict(list)
1176 1183 dirnametofilename = collections.defaultdict(list)
1177 1184
1178 1185 for f in m1.filesnotin(base.manifest()):
1179 1186 basename = os.path.basename(f)
1180 1187 dirname = os.path.dirname(f)
1181 1188 basenametofilename[basename].append(f)
1182 1189 dirnametofilename[dirname].append(f)
1183 1190
1184 1191 for f in missingfiles:
1185 1192 basename = os.path.basename(f)
1186 1193 dirname = os.path.dirname(f)
1187 1194 samebasename = basenametofilename[basename]
1188 1195 samedirname = dirnametofilename[dirname]
1189 1196 movecandidates = samebasename + samedirname
1190 1197 # f is guaranteed to be present in c2, that's why
1191 1198 # c2.filectx(f) won't fail
1192 1199 f2 = c2.filectx(f)
1193 1200 # we can have a lot of candidates which can slow down the heuristics
1194 1201 # config value to limit the number of candidates moves to check
1195 1202 maxcandidates = repo.ui.configint(
1196 1203 b'experimental', b'copytrace.movecandidateslimit'
1197 1204 )
1198 1205
1199 1206 if len(movecandidates) > maxcandidates:
1200 1207 repo.ui.status(
1201 1208 _(
1202 1209 b"skipping copytracing for '%s', more "
1203 1210 b"candidates than the limit: %d\n"
1204 1211 )
1205 1212 % (f, len(movecandidates))
1206 1213 )
1207 1214 continue
1208 1215
1209 1216 for candidate in movecandidates:
1210 1217 f1 = c1.filectx(candidate)
1211 1218 if _related(f1, f2):
1212 1219 # if there are a few related copies then we'll merge
1213 1220 # changes into all of them. This matches the behaviour
1214 1221 # of upstream copytracing
1215 1222 copies1[candidate] = f
1216 1223
1217 1224 return branch_copies(copies1), branch_copies(copies2), {}
1218 1225
1219 1226
1220 1227 def _related(f1, f2):
1221 1228 """return True if f1 and f2 filectx have a common ancestor
1222 1229
1223 1230 Walk back to common ancestor to see if the two files originate
1224 1231 from the same file. Since workingfilectx's rev() is None it messes
1225 1232 up the integer comparison logic, hence the pre-step check for
1226 1233 None (f1 and f2 can only be workingfilectx's initially).
1227 1234 """
1228 1235
1229 1236 if f1 == f2:
1230 1237 return True # a match
1231 1238
1232 1239 g1, g2 = f1.ancestors(), f2.ancestors()
1233 1240 try:
1234 1241 f1r, f2r = f1.linkrev(), f2.linkrev()
1235 1242
1236 1243 if f1r is None:
1237 1244 f1 = next(g1)
1238 1245 if f2r is None:
1239 1246 f2 = next(g2)
1240 1247
1241 1248 while True:
1242 1249 f1r, f2r = f1.linkrev(), f2.linkrev()
1243 1250 if f1r > f2r:
1244 1251 f1 = next(g1)
1245 1252 elif f2r > f1r:
1246 1253 f2 = next(g2)
1247 1254 else: # f1 and f2 point to files in the same linkrev
1248 1255 return f1 == f2 # true if they point to the same file
1249 1256 except StopIteration:
1250 1257 return False
1251 1258
1252 1259
1253 1260 def graftcopies(wctx, ctx, base):
1254 1261 """reproduce copies between base and ctx in the wctx
1255 1262
1256 1263 Unlike mergecopies(), this function will only consider copies between base
1257 1264 and ctx; it will ignore copies between base and wctx. Also unlike
1258 1265 mergecopies(), this function will apply copies to the working copy (instead
1259 1266 of just returning information about the copies). That makes it cheaper
1260 1267 (especially in the common case of base==ctx.p1()) and useful also when
1261 1268 experimental.copytrace=off.
1262 1269
1263 1270 merge.update() will have already marked most copies, but it will only
1264 1271 mark copies if it thinks the source files are related (see
1265 1272 merge._related()). It will also not mark copies if the file wasn't modified
1266 1273 on the local side. This function adds the copies that were "missed"
1267 1274 by merge.update().
1268 1275 """
1269 1276 new_copies = pathcopies(base, ctx)
1270 1277 parent = wctx.p1()
1271 1278 _filter(parent, wctx, new_copies)
1272 1279 # Extra filtering to drop copy information for files that existed before
1273 1280 # the graft. This is to handle the case of grafting a rename onto a commit
1274 1281 # that already has the rename. Otherwise the presence of copy information
1275 1282 # would result in the creation of an empty commit where we would prefer to
1276 1283 # not create one.
1277 1284 for dest, __ in list(new_copies.items()):
1278 1285 if dest in parent:
1279 1286 del new_copies[dest]
1280 1287 for dst, src in pycompat.iteritems(new_copies):
1281 1288 wctx[dst].markcopied(src)
@@ -1,1049 +1,1050 b''
1 1 # This file is automatically @generated by Cargo.
2 2 # It is not intended for manual editing.
3 3 [[package]]
4 4 name = "adler"
5 5 version = "0.2.3"
6 6 source = "registry+https://github.com/rust-lang/crates.io-index"
7 7
8 8 [[package]]
9 9 name = "aho-corasick"
10 10 version = "0.7.15"
11 11 source = "registry+https://github.com/rust-lang/crates.io-index"
12 12 dependencies = [
13 13 "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
14 14 ]
15 15
16 16 [[package]]
17 17 name = "ansi_term"
18 18 version = "0.11.0"
19 19 source = "registry+https://github.com/rust-lang/crates.io-index"
20 20 dependencies = [
21 21 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
22 22 ]
23 23
24 24 [[package]]
25 25 name = "atty"
26 26 version = "0.2.14"
27 27 source = "registry+https://github.com/rust-lang/crates.io-index"
28 28 dependencies = [
29 29 "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
30 30 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
31 31 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
32 32 ]
33 33
34 34 [[package]]
35 35 name = "autocfg"
36 36 version = "1.0.1"
37 37 source = "registry+https://github.com/rust-lang/crates.io-index"
38 38
39 39 [[package]]
40 40 name = "bitflags"
41 41 version = "1.2.1"
42 42 source = "registry+https://github.com/rust-lang/crates.io-index"
43 43
44 44 [[package]]
45 45 name = "bitmaps"
46 46 version = "2.1.0"
47 47 source = "registry+https://github.com/rust-lang/crates.io-index"
48 48 dependencies = [
49 49 "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
50 50 ]
51 51
52 52 [[package]]
53 53 name = "byteorder"
54 54 version = "1.3.4"
55 55 source = "registry+https://github.com/rust-lang/crates.io-index"
56 56
57 57 [[package]]
58 58 name = "bytes-cast"
59 59 version = "0.1.0"
60 60 source = "registry+https://github.com/rust-lang/crates.io-index"
61 61 dependencies = [
62 62 "bytes-cast-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
63 63 ]
64 64
65 65 [[package]]
66 66 name = "bytes-cast-derive"
67 67 version = "0.1.0"
68 68 source = "registry+https://github.com/rust-lang/crates.io-index"
69 69 dependencies = [
70 70 "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
71 71 "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
72 72 "syn 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)",
73 73 ]
74 74
75 75 [[package]]
76 76 name = "cc"
77 77 version = "1.0.66"
78 78 source = "registry+https://github.com/rust-lang/crates.io-index"
79 79 dependencies = [
80 80 "jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)",
81 81 ]
82 82
83 83 [[package]]
84 84 name = "cfg-if"
85 85 version = "0.1.10"
86 86 source = "registry+https://github.com/rust-lang/crates.io-index"
87 87
88 88 [[package]]
89 89 name = "cfg-if"
90 90 version = "1.0.0"
91 91 source = "registry+https://github.com/rust-lang/crates.io-index"
92 92
93 93 [[package]]
94 94 name = "clap"
95 95 version = "2.33.3"
96 96 source = "registry+https://github.com/rust-lang/crates.io-index"
97 97 dependencies = [
98 98 "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
99 99 "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
100 100 "bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
101 101 "strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
102 102 "textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
103 103 "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
104 104 "vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)",
105 105 ]
106 106
107 107 [[package]]
108 108 name = "const_fn"
109 109 version = "0.4.4"
110 110 source = "registry+https://github.com/rust-lang/crates.io-index"
111 111
112 112 [[package]]
113 113 name = "cpython"
114 114 version = "0.4.1"
115 115 source = "registry+https://github.com/rust-lang/crates.io-index"
116 116 dependencies = [
117 117 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
118 118 "num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
119 119 "python27-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
120 120 "python3-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
121 121 ]
122 122
123 123 [[package]]
124 124 name = "crc32fast"
125 125 version = "1.2.1"
126 126 source = "registry+https://github.com/rust-lang/crates.io-index"
127 127 dependencies = [
128 128 "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
129 129 ]
130 130
131 131 [[package]]
132 132 name = "crossbeam-channel"
133 133 version = "0.4.4"
134 134 source = "registry+https://github.com/rust-lang/crates.io-index"
135 135 dependencies = [
136 136 "crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)",
137 137 "maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
138 138 ]
139 139
140 140 [[package]]
141 141 name = "crossbeam-channel"
142 142 version = "0.5.0"
143 143 source = "registry+https://github.com/rust-lang/crates.io-index"
144 144 dependencies = [
145 145 "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
146 146 "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
147 147 ]
148 148
149 149 [[package]]
150 150 name = "crossbeam-deque"
151 151 version = "0.8.0"
152 152 source = "registry+https://github.com/rust-lang/crates.io-index"
153 153 dependencies = [
154 154 "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
155 155 "crossbeam-epoch 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)",
156 156 "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
157 157 ]
158 158
159 159 [[package]]
160 160 name = "crossbeam-epoch"
161 161 version = "0.9.1"
162 162 source = "registry+https://github.com/rust-lang/crates.io-index"
163 163 dependencies = [
164 164 "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
165 165 "const_fn 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
166 166 "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
167 167 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
168 168 "memoffset 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
169 169 "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
170 170 ]
171 171
172 172 [[package]]
173 173 name = "crossbeam-utils"
174 174 version = "0.7.2"
175 175 source = "registry+https://github.com/rust-lang/crates.io-index"
176 176 dependencies = [
177 177 "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
178 178 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
179 179 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
180 180 ]
181 181
182 182 [[package]]
183 183 name = "crossbeam-utils"
184 184 version = "0.8.1"
185 185 source = "registry+https://github.com/rust-lang/crates.io-index"
186 186 dependencies = [
187 187 "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
188 188 "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
189 189 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
190 190 ]
191 191
192 192 [[package]]
193 193 name = "ctor"
194 194 version = "0.1.16"
195 195 source = "registry+https://github.com/rust-lang/crates.io-index"
196 196 dependencies = [
197 197 "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
198 198 "syn 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)",
199 199 ]
200 200
201 201 [[package]]
202 202 name = "derive_more"
203 203 version = "0.99.11"
204 204 source = "registry+https://github.com/rust-lang/crates.io-index"
205 205 dependencies = [
206 206 "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
207 207 "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
208 208 "syn 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)",
209 209 ]
210 210
211 211 [[package]]
212 212 name = "difference"
213 213 version = "2.0.0"
214 214 source = "registry+https://github.com/rust-lang/crates.io-index"
215 215
216 216 [[package]]
217 217 name = "either"
218 218 version = "1.6.1"
219 219 source = "registry+https://github.com/rust-lang/crates.io-index"
220 220
221 221 [[package]]
222 222 name = "env_logger"
223 223 version = "0.7.1"
224 224 source = "registry+https://github.com/rust-lang/crates.io-index"
225 225 dependencies = [
226 226 "atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)",
227 227 "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
228 228 "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
229 229 "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
230 230 "termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
231 231 ]
232 232
233 233 [[package]]
234 234 name = "flate2"
235 235 version = "1.0.19"
236 236 source = "registry+https://github.com/rust-lang/crates.io-index"
237 237 dependencies = [
238 238 "cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
239 239 "crc32fast 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
240 240 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
241 241 "libz-sys 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
242 242 "miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)",
243 243 ]
244 244
245 245 [[package]]
246 246 name = "format-bytes"
247 247 version = "0.2.0"
248 248 source = "registry+https://github.com/rust-lang/crates.io-index"
249 249 dependencies = [
250 250 "format-bytes-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
251 251 "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)",
252 252 ]
253 253
254 254 [[package]]
255 255 name = "format-bytes-macros"
256 256 version = "0.3.0"
257 257 source = "registry+https://github.com/rust-lang/crates.io-index"
258 258 dependencies = [
259 259 "proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)",
260 260 "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
261 261 "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
262 262 "syn 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)",
263 263 ]
264 264
265 265 [[package]]
266 266 name = "fuchsia-cprng"
267 267 version = "0.1.1"
268 268 source = "registry+https://github.com/rust-lang/crates.io-index"
269 269
270 270 [[package]]
271 271 name = "gcc"
272 272 version = "0.3.55"
273 273 source = "registry+https://github.com/rust-lang/crates.io-index"
274 274
275 275 [[package]]
276 276 name = "getrandom"
277 277 version = "0.1.15"
278 278 source = "registry+https://github.com/rust-lang/crates.io-index"
279 279 dependencies = [
280 280 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
281 281 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
282 282 "wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)",
283 283 ]
284 284
285 285 [[package]]
286 286 name = "glob"
287 287 version = "0.3.0"
288 288 source = "registry+https://github.com/rust-lang/crates.io-index"
289 289
290 290 [[package]]
291 291 name = "hermit-abi"
292 292 version = "0.1.17"
293 293 source = "registry+https://github.com/rust-lang/crates.io-index"
294 294 dependencies = [
295 295 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
296 296 ]
297 297
298 298 [[package]]
299 299 name = "hg-core"
300 300 version = "0.1.0"
301 301 dependencies = [
302 302 "byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
303 303 "bytes-cast 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
304 304 "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)",
305 305 "crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
306 306 "derive_more 0.99.11 (registry+https://github.com/rust-lang/crates.io-index)",
307 307 "flate2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)",
308 308 "format-bytes 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
309 309 "home 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
310 310 "im-rc 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
311 311 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
312 312 "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
313 313 "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
314 314 "memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)",
315 315 "micro-timer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
316 316 "pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
317 317 "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
318 318 "rand_distr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
319 319 "rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
320 320 "rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
321 321 "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
322 322 "rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)",
323 323 "same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)",
324 324 "tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
325 325 "twox-hash 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)",
326 326 "zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
327 327 ]
328 328
329 329 [[package]]
330 330 name = "hg-cpython"
331 331 version = "0.1.0"
332 332 dependencies = [
333 333 "cpython 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)",
334 "crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)",
334 335 "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
335 336 "hg-core 0.1.0",
336 337 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
337 338 "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
338 339 ]
339 340
340 341 [[package]]
341 342 name = "home"
342 343 version = "0.5.3"
343 344 source = "registry+https://github.com/rust-lang/crates.io-index"
344 345 dependencies = [
345 346 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
346 347 ]
347 348
348 349 [[package]]
349 350 name = "humantime"
350 351 version = "1.3.0"
351 352 source = "registry+https://github.com/rust-lang/crates.io-index"
352 353 dependencies = [
353 354 "quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
354 355 ]
355 356
356 357 [[package]]
357 358 name = "im-rc"
358 359 version = "15.0.0"
359 360 source = "registry+https://github.com/rust-lang/crates.io-index"
360 361 dependencies = [
361 362 "bitmaps 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
362 363 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
363 364 "rand_xoshiro 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
364 365 "sized-chunks 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)",
365 366 "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
366 367 "version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)",
367 368 ]
368 369
369 370 [[package]]
370 371 name = "itertools"
371 372 version = "0.9.0"
372 373 source = "registry+https://github.com/rust-lang/crates.io-index"
373 374 dependencies = [
374 375 "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
375 376 ]
376 377
377 378 [[package]]
378 379 name = "jobserver"
379 380 version = "0.1.21"
380 381 source = "registry+https://github.com/rust-lang/crates.io-index"
381 382 dependencies = [
382 383 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
383 384 ]
384 385
385 386 [[package]]
386 387 name = "lazy_static"
387 388 version = "1.4.0"
388 389 source = "registry+https://github.com/rust-lang/crates.io-index"
389 390
390 391 [[package]]
391 392 name = "libc"
392 393 version = "0.2.81"
393 394 source = "registry+https://github.com/rust-lang/crates.io-index"
394 395
395 396 [[package]]
396 397 name = "libz-sys"
397 398 version = "1.1.2"
398 399 source = "registry+https://github.com/rust-lang/crates.io-index"
399 400 dependencies = [
400 401 "cc 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
401 402 "pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)",
402 403 "vcpkg 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)",
403 404 ]
404 405
405 406 [[package]]
406 407 name = "log"
407 408 version = "0.4.11"
408 409 source = "registry+https://github.com/rust-lang/crates.io-index"
409 410 dependencies = [
410 411 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
411 412 ]
412 413
413 414 [[package]]
414 415 name = "maybe-uninit"
415 416 version = "2.0.0"
416 417 source = "registry+https://github.com/rust-lang/crates.io-index"
417 418
418 419 [[package]]
419 420 name = "memchr"
420 421 version = "2.3.4"
421 422 source = "registry+https://github.com/rust-lang/crates.io-index"
422 423
423 424 [[package]]
424 425 name = "memmap"
425 426 version = "0.7.0"
426 427 source = "registry+https://github.com/rust-lang/crates.io-index"
427 428 dependencies = [
428 429 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
429 430 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
430 431 ]
431 432
432 433 [[package]]
433 434 name = "memoffset"
434 435 version = "0.6.1"
435 436 source = "registry+https://github.com/rust-lang/crates.io-index"
436 437 dependencies = [
437 438 "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
438 439 ]
439 440
440 441 [[package]]
441 442 name = "micro-timer"
442 443 version = "0.3.1"
443 444 source = "registry+https://github.com/rust-lang/crates.io-index"
444 445 dependencies = [
445 446 "micro-timer-macros 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
446 447 "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
447 448 ]
448 449
449 450 [[package]]
450 451 name = "micro-timer-macros"
451 452 version = "0.3.1"
452 453 source = "registry+https://github.com/rust-lang/crates.io-index"
453 454 dependencies = [
454 455 "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
455 456 "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
456 457 "scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
457 458 "syn 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)",
458 459 ]
459 460
460 461 [[package]]
461 462 name = "miniz_oxide"
462 463 version = "0.4.3"
463 464 source = "registry+https://github.com/rust-lang/crates.io-index"
464 465 dependencies = [
465 466 "adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)",
466 467 "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
467 468 ]
468 469
469 470 [[package]]
470 471 name = "num-traits"
471 472 version = "0.2.14"
472 473 source = "registry+https://github.com/rust-lang/crates.io-index"
473 474 dependencies = [
474 475 "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
475 476 ]
476 477
477 478 [[package]]
478 479 name = "num_cpus"
479 480 version = "1.13.0"
480 481 source = "registry+https://github.com/rust-lang/crates.io-index"
481 482 dependencies = [
482 483 "hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)",
483 484 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
484 485 ]
485 486
486 487 [[package]]
487 488 name = "output_vt100"
488 489 version = "0.1.2"
489 490 source = "registry+https://github.com/rust-lang/crates.io-index"
490 491 dependencies = [
491 492 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
492 493 ]
493 494
494 495 [[package]]
495 496 name = "pkg-config"
496 497 version = "0.3.19"
497 498 source = "registry+https://github.com/rust-lang/crates.io-index"
498 499
499 500 [[package]]
500 501 name = "ppv-lite86"
501 502 version = "0.2.10"
502 503 source = "registry+https://github.com/rust-lang/crates.io-index"
503 504
504 505 [[package]]
505 506 name = "pretty_assertions"
506 507 version = "0.6.1"
507 508 source = "registry+https://github.com/rust-lang/crates.io-index"
508 509 dependencies = [
509 510 "ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)",
510 511 "ctor 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)",
511 512 "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)",
512 513 "output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
513 514 ]
514 515
515 516 [[package]]
516 517 name = "proc-macro-hack"
517 518 version = "0.5.19"
518 519 source = "registry+https://github.com/rust-lang/crates.io-index"
519 520
520 521 [[package]]
521 522 name = "proc-macro2"
522 523 version = "1.0.24"
523 524 source = "registry+https://github.com/rust-lang/crates.io-index"
524 525 dependencies = [
525 526 "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
526 527 ]
527 528
528 529 [[package]]
529 530 name = "python27-sys"
530 531 version = "0.4.1"
531 532 source = "registry+https://github.com/rust-lang/crates.io-index"
532 533 dependencies = [
533 534 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
534 535 "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
535 536 ]
536 537
537 538 [[package]]
538 539 name = "python3-sys"
539 540 version = "0.4.1"
540 541 source = "registry+https://github.com/rust-lang/crates.io-index"
541 542 dependencies = [
542 543 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
543 544 "regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
544 545 ]
545 546
546 547 [[package]]
547 548 name = "quick-error"
548 549 version = "1.2.3"
549 550 source = "registry+https://github.com/rust-lang/crates.io-index"
550 551
551 552 [[package]]
552 553 name = "quote"
553 554 version = "1.0.7"
554 555 source = "registry+https://github.com/rust-lang/crates.io-index"
555 556 dependencies = [
556 557 "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
557 558 ]
558 559
559 560 [[package]]
560 561 name = "rand"
561 562 version = "0.3.23"
562 563 source = "registry+https://github.com/rust-lang/crates.io-index"
563 564 dependencies = [
564 565 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
565 566 "rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)",
566 567 ]
567 568
568 569 [[package]]
569 570 name = "rand"
570 571 version = "0.4.6"
571 572 source = "registry+https://github.com/rust-lang/crates.io-index"
572 573 dependencies = [
573 574 "fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)",
574 575 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
575 576 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
576 577 "rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
577 578 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
578 579 ]
579 580
580 581 [[package]]
581 582 name = "rand"
582 583 version = "0.7.3"
583 584 source = "registry+https://github.com/rust-lang/crates.io-index"
584 585 dependencies = [
585 586 "getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
586 587 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
587 588 "rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)",
588 589 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
589 590 "rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
590 591 ]
591 592
592 593 [[package]]
593 594 name = "rand_chacha"
594 595 version = "0.2.2"
595 596 source = "registry+https://github.com/rust-lang/crates.io-index"
596 597 dependencies = [
597 598 "ppv-lite86 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)",
598 599 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
599 600 ]
600 601
601 602 [[package]]
602 603 name = "rand_core"
603 604 version = "0.3.1"
604 605 source = "registry+https://github.com/rust-lang/crates.io-index"
605 606 dependencies = [
606 607 "rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)",
607 608 ]
608 609
609 610 [[package]]
610 611 name = "rand_core"
611 612 version = "0.4.2"
612 613 source = "registry+https://github.com/rust-lang/crates.io-index"
613 614
614 615 [[package]]
615 616 name = "rand_core"
616 617 version = "0.5.1"
617 618 source = "registry+https://github.com/rust-lang/crates.io-index"
618 619 dependencies = [
619 620 "getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)",
620 621 ]
621 622
622 623 [[package]]
623 624 name = "rand_distr"
624 625 version = "0.2.2"
625 626 source = "registry+https://github.com/rust-lang/crates.io-index"
626 627 dependencies = [
627 628 "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
628 629 ]
629 630
630 631 [[package]]
631 632 name = "rand_hc"
632 633 version = "0.2.0"
633 634 source = "registry+https://github.com/rust-lang/crates.io-index"
634 635 dependencies = [
635 636 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
636 637 ]
637 638
638 639 [[package]]
639 640 name = "rand_pcg"
640 641 version = "0.2.1"
641 642 source = "registry+https://github.com/rust-lang/crates.io-index"
642 643 dependencies = [
643 644 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
644 645 ]
645 646
646 647 [[package]]
647 648 name = "rand_xoshiro"
648 649 version = "0.4.0"
649 650 source = "registry+https://github.com/rust-lang/crates.io-index"
650 651 dependencies = [
651 652 "rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)",
652 653 ]
653 654
654 655 [[package]]
655 656 name = "rayon"
656 657 version = "1.5.0"
657 658 source = "registry+https://github.com/rust-lang/crates.io-index"
658 659 dependencies = [
659 660 "autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
660 661 "crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
661 662 "either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)",
662 663 "rayon-core 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
663 664 ]
664 665
665 666 [[package]]
666 667 name = "rayon-core"
667 668 version = "1.9.0"
668 669 source = "registry+https://github.com/rust-lang/crates.io-index"
669 670 dependencies = [
670 671 "crossbeam-channel 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)",
671 672 "crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)",
672 673 "crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)",
673 674 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
674 675 "num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)",
675 676 ]
676 677
677 678 [[package]]
678 679 name = "rdrand"
679 680 version = "0.4.0"
680 681 source = "registry+https://github.com/rust-lang/crates.io-index"
681 682 dependencies = [
682 683 "rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
683 684 ]
684 685
685 686 [[package]]
686 687 name = "redox_syscall"
687 688 version = "0.1.57"
688 689 source = "registry+https://github.com/rust-lang/crates.io-index"
689 690
690 691 [[package]]
691 692 name = "regex"
692 693 version = "1.4.2"
693 694 source = "registry+https://github.com/rust-lang/crates.io-index"
694 695 dependencies = [
695 696 "aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)",
696 697 "memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)",
697 698 "regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)",
698 699 "thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)",
699 700 ]
700 701
701 702 [[package]]
702 703 name = "regex-syntax"
703 704 version = "0.6.21"
704 705 source = "registry+https://github.com/rust-lang/crates.io-index"
705 706
706 707 [[package]]
707 708 name = "remove_dir_all"
708 709 version = "0.5.3"
709 710 source = "registry+https://github.com/rust-lang/crates.io-index"
710 711 dependencies = [
711 712 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
712 713 ]
713 714
714 715 [[package]]
715 716 name = "rhg"
716 717 version = "0.1.0"
717 718 dependencies = [
718 719 "clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)",
719 720 "derive_more 0.99.11 (registry+https://github.com/rust-lang/crates.io-index)",
720 721 "env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)",
721 722 "format-bytes 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
722 723 "hg-core 0.1.0",
723 724 "log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)",
724 725 "micro-timer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
725 726 ]
726 727
727 728 [[package]]
728 729 name = "rust-crypto"
729 730 version = "0.2.36"
730 731 source = "registry+https://github.com/rust-lang/crates.io-index"
731 732 dependencies = [
732 733 "gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)",
733 734 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
734 735 "rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)",
735 736 "rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)",
736 737 "time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)",
737 738 ]
738 739
739 740 [[package]]
740 741 name = "rustc-serialize"
741 742 version = "0.3.24"
742 743 source = "registry+https://github.com/rust-lang/crates.io-index"
743 744
744 745 [[package]]
745 746 name = "same-file"
746 747 version = "1.0.6"
747 748 source = "registry+https://github.com/rust-lang/crates.io-index"
748 749 dependencies = [
749 750 "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
750 751 ]
751 752
752 753 [[package]]
753 754 name = "scopeguard"
754 755 version = "1.1.0"
755 756 source = "registry+https://github.com/rust-lang/crates.io-index"
756 757
757 758 [[package]]
758 759 name = "sized-chunks"
759 760 version = "0.6.2"
760 761 source = "registry+https://github.com/rust-lang/crates.io-index"
761 762 dependencies = [
762 763 "bitmaps 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
763 764 "typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)",
764 765 ]
765 766
766 767 [[package]]
767 768 name = "static_assertions"
768 769 version = "1.1.0"
769 770 source = "registry+https://github.com/rust-lang/crates.io-index"
770 771
771 772 [[package]]
772 773 name = "strsim"
773 774 version = "0.8.0"
774 775 source = "registry+https://github.com/rust-lang/crates.io-index"
775 776
776 777 [[package]]
777 778 name = "syn"
778 779 version = "1.0.54"
779 780 source = "registry+https://github.com/rust-lang/crates.io-index"
780 781 dependencies = [
781 782 "proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)",
782 783 "quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)",
783 784 "unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)",
784 785 ]
785 786
786 787 [[package]]
787 788 name = "tempfile"
788 789 version = "3.1.0"
789 790 source = "registry+https://github.com/rust-lang/crates.io-index"
790 791 dependencies = [
791 792 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
792 793 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
793 794 "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
794 795 "redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)",
795 796 "remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)",
796 797 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
797 798 ]
798 799
799 800 [[package]]
800 801 name = "termcolor"
801 802 version = "1.1.2"
802 803 source = "registry+https://github.com/rust-lang/crates.io-index"
803 804 dependencies = [
804 805 "winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)",
805 806 ]
806 807
807 808 [[package]]
808 809 name = "textwrap"
809 810 version = "0.11.0"
810 811 source = "registry+https://github.com/rust-lang/crates.io-index"
811 812 dependencies = [
812 813 "unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)",
813 814 ]
814 815
815 816 [[package]]
816 817 name = "thread_local"
817 818 version = "1.0.1"
818 819 source = "registry+https://github.com/rust-lang/crates.io-index"
819 820 dependencies = [
820 821 "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
821 822 ]
822 823
823 824 [[package]]
824 825 name = "time"
825 826 version = "0.1.44"
826 827 source = "registry+https://github.com/rust-lang/crates.io-index"
827 828 dependencies = [
828 829 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
829 830 "wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)",
830 831 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
831 832 ]
832 833
833 834 [[package]]
834 835 name = "twox-hash"
835 836 version = "1.6.0"
836 837 source = "registry+https://github.com/rust-lang/crates.io-index"
837 838 dependencies = [
838 839 "cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)",
839 840 "rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)",
840 841 "static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
841 842 ]
842 843
843 844 [[package]]
844 845 name = "typenum"
845 846 version = "1.12.0"
846 847 source = "registry+https://github.com/rust-lang/crates.io-index"
847 848
848 849 [[package]]
849 850 name = "unicode-width"
850 851 version = "0.1.8"
851 852 source = "registry+https://github.com/rust-lang/crates.io-index"
852 853
853 854 [[package]]
854 855 name = "unicode-xid"
855 856 version = "0.2.1"
856 857 source = "registry+https://github.com/rust-lang/crates.io-index"
857 858
858 859 [[package]]
859 860 name = "vcpkg"
860 861 version = "0.2.11"
861 862 source = "registry+https://github.com/rust-lang/crates.io-index"
862 863
863 864 [[package]]
864 865 name = "vec_map"
865 866 version = "0.8.2"
866 867 source = "registry+https://github.com/rust-lang/crates.io-index"
867 868
868 869 [[package]]
869 870 name = "version_check"
870 871 version = "0.9.2"
871 872 source = "registry+https://github.com/rust-lang/crates.io-index"
872 873
873 874 [[package]]
874 875 name = "wasi"
875 876 version = "0.9.0+wasi-snapshot-preview1"
876 877 source = "registry+https://github.com/rust-lang/crates.io-index"
877 878
878 879 [[package]]
879 880 name = "wasi"
880 881 version = "0.10.0+wasi-snapshot-preview1"
881 882 source = "registry+https://github.com/rust-lang/crates.io-index"
882 883
883 884 [[package]]
884 885 name = "winapi"
885 886 version = "0.3.9"
886 887 source = "registry+https://github.com/rust-lang/crates.io-index"
887 888 dependencies = [
888 889 "winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
889 890 "winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)",
890 891 ]
891 892
892 893 [[package]]
893 894 name = "winapi-i686-pc-windows-gnu"
894 895 version = "0.4.0"
895 896 source = "registry+https://github.com/rust-lang/crates.io-index"
896 897
897 898 [[package]]
898 899 name = "winapi-util"
899 900 version = "0.1.5"
900 901 source = "registry+https://github.com/rust-lang/crates.io-index"
901 902 dependencies = [
902 903 "winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)",
903 904 ]
904 905
905 906 [[package]]
906 907 name = "winapi-x86_64-pc-windows-gnu"
907 908 version = "0.4.0"
908 909 source = "registry+https://github.com/rust-lang/crates.io-index"
909 910
910 911 [[package]]
911 912 name = "zstd"
912 913 version = "0.5.3+zstd.1.4.5"
913 914 source = "registry+https://github.com/rust-lang/crates.io-index"
914 915 dependencies = [
915 916 "zstd-safe 2.0.5+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
916 917 ]
917 918
918 919 [[package]]
919 920 name = "zstd-safe"
920 921 version = "2.0.5+zstd.1.4.5"
921 922 source = "registry+https://github.com/rust-lang/crates.io-index"
922 923 dependencies = [
923 924 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
924 925 "zstd-sys 1.4.17+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)",
925 926 ]
926 927
927 928 [[package]]
928 929 name = "zstd-sys"
929 930 version = "1.4.17+zstd.1.4.5"
930 931 source = "registry+https://github.com/rust-lang/crates.io-index"
931 932 dependencies = [
932 933 "cc 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)",
933 934 "glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
934 935 "itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)",
935 936 "libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)",
936 937 ]
937 938
938 939 [metadata]
939 940 "checksum adler 0.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "ee2a4ec343196209d6594e19543ae87a39f96d5534d7174822a3ad825dd6ed7e"
940 941 "checksum aho-corasick 0.7.15 (registry+https://github.com/rust-lang/crates.io-index)" = "7404febffaa47dac81aa44dba71523c9d069b1bdc50a77db41195149e17f68e5"
941 942 "checksum ansi_term 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ee49baf6cb617b853aa8d93bf420db2383fab46d314482ca2803b40d5fde979b"
942 943 "checksum atty 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "d9b39be18770d11421cdb1b9947a45dd3f37e93092cbf377614828a319d5fee8"
943 944 "checksum autocfg 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
944 945 "checksum bitflags 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "cf1de2fe8c75bc145a2f577add951f8134889b4795d47466a54a5c846d691693"
945 946 "checksum bitmaps 2.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "031043d04099746d8db04daf1fa424b2bc8bd69d92b25962dcde24da39ab64a2"
946 947 "checksum byteorder 1.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de"
947 948 "checksum bytes-cast 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3196ba300c7bc9282a4331e878496cb3e9603a898a8f1446601317163e16ca52"
948 949 "checksum bytes-cast-derive 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cb936af9de38476664d6b58e529aff30d482e4ce1c5e150293d00730b0d81fdb"
949 950 "checksum cc 1.0.66 (registry+https://github.com/rust-lang/crates.io-index)" = "4c0496836a84f8d0495758516b8621a622beb77c0fed418570e50764093ced48"
950 951 "checksum cfg-if 0.1.10 (registry+https://github.com/rust-lang/crates.io-index)" = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"
951 952 "checksum cfg-if 1.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
952 953 "checksum clap 2.33.3 (registry+https://github.com/rust-lang/crates.io-index)" = "37e58ac78573c40708d45522f0d80fa2f01cc4f9b4e2bf749807255454312002"
953 954 "checksum const_fn 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "cd51eab21ab4fd6a3bf889e2d0958c0a6e3a61ad04260325e919e652a2a62826"
954 955 "checksum cpython 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "bfaf3847ab963e40c4f6dd8d6be279bdf74007ae2413786a0dcbb28c52139a95"
955 956 "checksum crc32fast 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "81156fece84ab6a9f2afdb109ce3ae577e42b1228441eded99bd77f627953b1a"
956 957 "checksum crossbeam-channel 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "b153fe7cbef478c567df0f972e02e6d736db11affe43dfc9c56a9374d1adfb87"
957 958 "checksum crossbeam-channel 0.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "dca26ee1f8d361640700bde38b2c37d8c22b3ce2d360e1fc1c74ea4b0aa7d775"
958 959 "checksum crossbeam-deque 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "94af6efb46fef72616855b036a624cf27ba656ffc9be1b9a3c931cfc7749a9a9"
959 960 "checksum crossbeam-epoch 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a1aaa739f95311c2c7887a76863f500026092fb1dce0161dab577e559ef3569d"
960 961 "checksum crossbeam-utils 0.7.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c3c7c73a2d1e9fc0886a08b93e98eb643461230d5f1925e4036204d5f2e261a8"
961 962 "checksum crossbeam-utils 0.8.1 (registry+https://github.com/rust-lang/crates.io-index)" = "02d96d1e189ef58269ebe5b97953da3274d83a93af647c2ddd6f9dab28cedb8d"
962 963 "checksum ctor 0.1.16 (registry+https://github.com/rust-lang/crates.io-index)" = "7fbaabec2c953050352311293be5c6aba8e141ba19d6811862b232d6fd020484"
963 964 "checksum derive_more 0.99.11 (registry+https://github.com/rust-lang/crates.io-index)" = "41cb0e6161ad61ed084a36ba71fbba9e3ac5aee3606fb607fe08da6acbcf3d8c"
964 965 "checksum difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "524cbf6897b527295dff137cec09ecf3a05f4fddffd7dfcd1585403449e74198"
965 966 "checksum either 1.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e78d4f1cc4ae33bbfc157ed5d5a5ef3bc29227303d595861deb238fcec4e9457"
966 967 "checksum env_logger 0.7.1 (registry+https://github.com/rust-lang/crates.io-index)" = "44533bbbb3bb3c1fa17d9f2e4e38bbbaf8396ba82193c4cb1b6445d711445d36"
967 968 "checksum flate2 1.0.19 (registry+https://github.com/rust-lang/crates.io-index)" = "7411863d55df97a419aa64cb4d2f167103ea9d767e2c54a1868b7ac3f6b47129"
968 969 "checksum format-bytes 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "cc35f5e45d6b31053cea13078ffc6fa52fa8617aa54b7ac2011720d9c009e04f"
969 970 "checksum format-bytes-macros 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "b05089e341a0460449e2210c3bf7b61597860b07f0deae58da38dbed0a4c6b6d"
970 971 "checksum fuchsia-cprng 0.1.1 (registry+https://github.com/rust-lang/crates.io-index)" = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba"
971 972 "checksum gcc 0.3.55 (registry+https://github.com/rust-lang/crates.io-index)" = "8f5f3913fa0bfe7ee1fd8248b6b9f42a5af4b9d65ec2dd2c3c26132b950ecfc2"
972 973 "checksum getrandom 0.1.15 (registry+https://github.com/rust-lang/crates.io-index)" = "fc587bc0ec293155d5bfa6b9891ec18a1e330c234f896ea47fbada4cadbe47e6"
973 974 "checksum glob 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9b919933a397b79c37e33b77bb2aa3dc8eb6e165ad809e58ff75bc7db2e34574"
974 975 "checksum hermit-abi 0.1.17 (registry+https://github.com/rust-lang/crates.io-index)" = "5aca5565f760fb5b220e499d72710ed156fdb74e631659e99377d9ebfbd13ae8"
975 976 "checksum home 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "2456aef2e6b6a9784192ae780c0f15bc57df0e918585282325e8c8ac27737654"
976 977 "checksum humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "df004cfca50ef23c36850aaaa59ad52cc70d0e90243c3c7737a4dd32dc7a3c4f"
977 978 "checksum im-rc 15.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "3ca8957e71f04a205cb162508f9326aea04676c8dfd0711220190d6b83664f3f"
978 979 "checksum itertools 0.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "284f18f85651fe11e8a991b2adb42cb078325c996ed026d994719efcfca1d54b"
979 980 "checksum jobserver 0.1.21 (registry+https://github.com/rust-lang/crates.io-index)" = "5c71313ebb9439f74b00d9d2dcec36440beaf57a6aa0623068441dd7cd81a7f2"
980 981 "checksum lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646"
981 982 "checksum libc 0.2.81 (registry+https://github.com/rust-lang/crates.io-index)" = "1482821306169ec4d07f6aca392a4681f66c75c9918aa49641a2595db64053cb"
982 983 "checksum libz-sys 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "602113192b08db8f38796c4e85c39e960c145965140e918018bcde1952429655"
983 984 "checksum log 0.4.11 (registry+https://github.com/rust-lang/crates.io-index)" = "4fabed175da42fed1fa0746b0ea71f412aa9d35e76e95e59b192c64b9dc2bf8b"
984 985 "checksum maybe-uninit 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)" = "60302e4db3a61da70c0cb7991976248362f30319e88850c487b9b95bbf059e00"
985 986 "checksum memchr 2.3.4 (registry+https://github.com/rust-lang/crates.io-index)" = "0ee1c47aaa256ecabcaea351eae4a9b01ef39ed810004e298d2511ed284b1525"
986 987 "checksum memmap 0.7.0 (registry+https://github.com/rust-lang/crates.io-index)" = "6585fd95e7bb50d6cc31e20d4cf9afb4e2ba16c5846fc76793f11218da9c475b"
987 988 "checksum memoffset 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "157b4208e3059a8f9e78d559edc658e13df41410cb3ae03979c83130067fdd87"
988 989 "checksum micro-timer 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "2620153e1d903d26b72b89f0e9c48d8c4756cba941c185461dddc234980c298c"
989 990 "checksum micro-timer-macros 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "e28a3473e6abd6e9aab36aaeef32ad22ae0bd34e79f376643594c2b152ec1c5d"
990 991 "checksum miniz_oxide 0.4.3 (registry+https://github.com/rust-lang/crates.io-index)" = "0f2d26ec3309788e423cfbf68ad1800f061638098d76a83681af979dc4eda19d"
991 992 "checksum num-traits 0.2.14 (registry+https://github.com/rust-lang/crates.io-index)" = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
992 993 "checksum num_cpus 1.13.0 (registry+https://github.com/rust-lang/crates.io-index)" = "05499f3756671c15885fee9034446956fff3f243d6077b91e5767df161f766b3"
993 994 "checksum output_vt100 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "53cdc5b785b7a58c5aad8216b3dfa114df64b0b06ae6e1501cef91df2fbdf8f9"
994 995 "checksum pkg-config 0.3.19 (registry+https://github.com/rust-lang/crates.io-index)" = "3831453b3449ceb48b6d9c7ad7c96d5ea673e9b470a1dc578c2ce6521230884c"
995 996 "checksum ppv-lite86 0.2.10 (registry+https://github.com/rust-lang/crates.io-index)" = "ac74c624d6b2d21f425f752262f42188365d7b8ff1aff74c82e45136510a4857"
996 997 "checksum pretty_assertions 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "3f81e1644e1b54f5a68959a29aa86cde704219254669da328ecfdf6a1f09d427"
997 998 "checksum proc-macro-hack 0.5.19 (registry+https://github.com/rust-lang/crates.io-index)" = "dbf0c48bc1d91375ae5c3cd81e3722dff1abcf81a30960240640d223f59fe0e5"
998 999 "checksum proc-macro2 1.0.24 (registry+https://github.com/rust-lang/crates.io-index)" = "1e0704ee1a7e00d7bb417d0770ea303c1bccbabf0ef1667dae92b5967f5f8a71"
999 1000 "checksum python27-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "67cb041de8615111bf224dd75667af5f25c6e032118251426fed7f1b70ce4c8c"
1000 1001 "checksum python3-sys 0.4.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90af11779515a1e530af60782d273b59ac79d33b0e253c071a728563957c76d4"
1001 1002 "checksum quick-error 1.2.3 (registry+https://github.com/rust-lang/crates.io-index)" = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
1002 1003 "checksum quote 1.0.7 (registry+https://github.com/rust-lang/crates.io-index)" = "aa563d17ecb180e500da1cfd2b028310ac758de548efdd203e18f283af693f37"
1003 1004 "checksum rand 0.3.23 (registry+https://github.com/rust-lang/crates.io-index)" = "64ac302d8f83c0c1974bf758f6b041c6c8ada916fbb44a609158ca8b064cc76c"
1004 1005 "checksum rand 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)" = "552840b97013b1a26992c11eac34bdd778e464601a4c2054b5f0bff7c6761293"
1005 1006 "checksum rand 0.7.3 (registry+https://github.com/rust-lang/crates.io-index)" = "6a6b1679d49b24bbfe0c803429aa1874472f50d9b363131f0e89fc356b544d03"
1006 1007 "checksum rand_chacha 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f4c8ed856279c9737206bf725bf36935d8666ead7aa69b52be55af369d193402"
1007 1008 "checksum rand_core 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6fdeb83b075e8266dcc8762c22776f6877a63111121f5f8c7411e5be7eed4b"
1008 1009 "checksum rand_core 0.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "9c33a3c44ca05fa6f1807d8e6743f3824e8509beca625669633be0acbdf509dc"
1009 1010 "checksum rand_core 0.5.1 (registry+https://github.com/rust-lang/crates.io-index)" = "90bde5296fc891b0cef12a6d03ddccc162ce7b2aff54160af9338f8d40df6d19"
1010 1011 "checksum rand_distr 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "96977acbdd3a6576fb1d27391900035bf3863d4a16422973a409b488cf29ffb2"
1011 1012 "checksum rand_hc 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ca3129af7b92a17112d59ad498c6f81eaf463253766b90396d39ea7a39d6613c"
1012 1013 "checksum rand_pcg 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "16abd0c1b639e9eb4d7c50c0b8100b0d0f849be2349829c740fe8e6eb4816429"
1013 1014 "checksum rand_xoshiro 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a9fcdd2e881d02f1d9390ae47ad8e5696a9e4be7b547a1da2afbc61973217004"
1014 1015 "checksum rayon 1.5.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8b0d8e0819fadc20c74ea8373106ead0600e3a67ef1fe8da56e39b9ae7275674"
1015 1016 "checksum rayon-core 1.9.0 (registry+https://github.com/rust-lang/crates.io-index)" = "9ab346ac5921dc62ffa9f89b7a773907511cdfa5490c572ae9be1be33e8afa4a"
1016 1017 "checksum rdrand 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "678054eb77286b51581ba43620cc911abf02758c91f93f479767aed0f90458b2"
1017 1018 "checksum redox_syscall 0.1.57 (registry+https://github.com/rust-lang/crates.io-index)" = "41cc0f7e4d5d4544e8861606a285bb08d3e70712ccc7d2b84d7c0ccfaf4b05ce"
1018 1019 "checksum regex 1.4.2 (registry+https://github.com/rust-lang/crates.io-index)" = "38cf2c13ed4745de91a5eb834e11c00bcc3709e773173b2ce4c56c9fbde04b9c"
1019 1020 "checksum regex-syntax 0.6.21 (registry+https://github.com/rust-lang/crates.io-index)" = "3b181ba2dcf07aaccad5448e8ead58db5b742cf85dfe035e2227f137a539a189"
1020 1021 "checksum remove_dir_all 0.5.3 (registry+https://github.com/rust-lang/crates.io-index)" = "3acd125665422973a33ac9d3dd2df85edad0f4ae9b00dafb1a05e43a9f5ef8e7"
1021 1022 "checksum rust-crypto 0.2.36 (registry+https://github.com/rust-lang/crates.io-index)" = "f76d05d3993fd5f4af9434e8e436db163a12a9d40e1a58a726f27a01dfd12a2a"
1022 1023 "checksum rustc-serialize 0.3.24 (registry+https://github.com/rust-lang/crates.io-index)" = "dcf128d1287d2ea9d80910b5f1120d0b8eede3fbf1abe91c40d39ea7d51e6fda"
1023 1024 "checksum same-file 1.0.6 (registry+https://github.com/rust-lang/crates.io-index)" = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502"
1024 1025 "checksum scopeguard 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
1025 1026 "checksum sized-chunks 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)" = "1ec31ceca5644fa6d444cc77548b88b67f46db6f7c71683b0f9336e671830d2f"
1026 1027 "checksum static_assertions 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
1027 1028 "checksum strsim 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
1028 1029 "checksum syn 1.0.54 (registry+https://github.com/rust-lang/crates.io-index)" = "9a2af957a63d6bd42255c359c93d9bfdb97076bd3b820897ce55ffbfbf107f44"
1029 1030 "checksum tempfile 3.1.0 (registry+https://github.com/rust-lang/crates.io-index)" = "7a6e24d9338a0a5be79593e2fa15a648add6138caa803e2d5bc782c371732ca9"
1030 1031 "checksum termcolor 1.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "2dfed899f0eb03f32ee8c6a0aabdb8a7949659e3466561fc0adf54e26d88c5f4"
1031 1032 "checksum textwrap 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
1032 1033 "checksum thread_local 1.0.1 (registry+https://github.com/rust-lang/crates.io-index)" = "d40c6d1b69745a6ec6fb1ca717914848da4b44ae29d9b3080cbee91d72a69b14"
1033 1034 "checksum time 0.1.44 (registry+https://github.com/rust-lang/crates.io-index)" = "6db9e6914ab8b1ae1c260a4ae7a49b6c5611b40328a735b21862567685e73255"
1034 1035 "checksum twox-hash 1.6.0 (registry+https://github.com/rust-lang/crates.io-index)" = "04f8ab788026715fa63b31960869617cba39117e520eb415b0139543e325ab59"
1035 1036 "checksum typenum 1.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "373c8a200f9e67a0c95e62a4f52fbf80c23b4381c05a17845531982fa99e6b33"
1036 1037 "checksum unicode-width 0.1.8 (registry+https://github.com/rust-lang/crates.io-index)" = "9337591893a19b88d8d87f2cec1e73fad5cdfd10e5a6f349f498ad6ea2ffb1e3"
1037 1038 "checksum unicode-xid 0.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "f7fe0bb3479651439c9112f72b6c505038574c9fbb575ed1bf3b797fa39dd564"
1038 1039 "checksum vcpkg 0.2.11 (registry+https://github.com/rust-lang/crates.io-index)" = "b00bca6106a5e23f3eee943593759b7fcddb00554332e856d990c893966879fb"
1039 1040 "checksum vec_map 0.8.2 (registry+https://github.com/rust-lang/crates.io-index)" = "f1bddf1187be692e79c5ffeab891132dfb0f236ed36a43c7ed39f1165ee20191"
1040 1041 "checksum version_check 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "b5a972e5669d67ba988ce3dc826706fb0a8b01471c088cb0b6110b805cc36aed"
1041 1042 "checksum wasi 0.10.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f"
1042 1043 "checksum wasi 0.9.0+wasi-snapshot-preview1 (registry+https://github.com/rust-lang/crates.io-index)" = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519"
1043 1044 "checksum winapi 0.3.9 (registry+https://github.com/rust-lang/crates.io-index)" = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419"
1044 1045 "checksum winapi-i686-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6"
1045 1046 "checksum winapi-util 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "70ec6ce85bb158151cae5e5c87f95a8e97d2c0c4b001223f33a334e3ce5de178"
1046 1047 "checksum winapi-x86_64-pc-windows-gnu 0.4.0 (registry+https://github.com/rust-lang/crates.io-index)" = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
1047 1048 "checksum zstd 0.5.3+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "01b32eaf771efa709e8308605bbf9319bf485dc1503179ec0469b611937c0cd8"
1048 1049 "checksum zstd-safe 2.0.5+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "1cfb642e0d27f64729a639c52db457e0ae906e7bc6f5fe8f5c453230400f1055"
1049 1050 "checksum zstd-sys 1.4.17+zstd.1.4.5 (registry+https://github.com/rust-lang/crates.io-index)" = "b89249644df056b522696b1bb9e7c18c87e8ffa3e2f0dc3b0155875d6498f01b"
@@ -1,32 +1,33 b''
1 1 [package]
2 2 name = "hg-cpython"
3 3 version = "0.1.0"
4 4 authors = ["Georges Racinet <gracinet@anybox.fr>"]
5 5 edition = "2018"
6 6
7 7 [lib]
8 8 name='rusthg'
9 9 crate-type = ["cdylib"]
10 10
11 11 [features]
12 12 default = ["python27"]
13 13 dirstate-tree = ["hg-core/dirstate-tree"]
14 14
15 15 # Features to build an extension module:
16 16 python27 = ["cpython/python27-sys", "cpython/extension-module-2-7"]
17 17 python3 = ["cpython/python3-sys", "cpython/extension-module"]
18 18
19 19 # Enable one of these features to build a test executable linked to libpython:
20 20 # e.g. cargo test --no-default-features --features python27-bin
21 21 python27-bin = ["cpython/python27-sys"]
22 22 python3-bin = ["cpython/python3-sys"]
23 23
24 24 [dependencies]
25 crossbeam-channel = "0.4"
25 26 hg-core = { path = "../hg-core"}
26 27 libc = '*'
27 28 log = "0.4.8"
28 29 env_logger = "0.7.1"
29 30
30 31 [dependencies.cpython]
31 32 version = "0.4.1"
32 33 default-features = false
@@ -1,97 +1,160 b''
1 1 use cpython::ObjectProtocol;
2 2 use cpython::PyBytes;
3 3 use cpython::PyDict;
4 4 use cpython::PyList;
5 5 use cpython::PyModule;
6 6 use cpython::PyObject;
7 7 use cpython::PyResult;
8 8 use cpython::PyTuple;
9 9 use cpython::Python;
10 10
11 11 use hg::copy_tracing::ChangedFiles;
12 12 use hg::copy_tracing::CombineChangesetCopies;
13 13 use hg::Revision;
14 14
15 15 /// Combines copies information contained into revision `revs` to build a copy
16 16 /// map.
17 17 ///
18 18 /// See mercurial/copies.py for details
19 19 pub fn combine_changeset_copies_wrapper(
20 20 py: Python,
21 21 revs: PyList,
22 22 children_count: PyDict,
23 23 target_rev: Revision,
24 24 rev_info: PyObject,
25 multi_thread: bool,
25 26 ) -> PyResult<PyDict> {
26 27 let children_count = children_count
27 28 .items(py)
28 29 .iter()
29 30 .map(|(k, v)| Ok((k.extract(py)?, v.extract(py)?)))
30 31 .collect::<PyResult<_>>()?;
31 32
32 33 /// (Revision number, parent 1, parent 2, copy data for this revision)
33 34 type RevInfo = (Revision, Revision, Revision, Option<PyBytes>);
34 35
35 36 let revs_info = revs.iter(py).map(|rev_py| -> PyResult<RevInfo> {
36 37 let rev = rev_py.extract(py)?;
37 38 let tuple: PyTuple =
38 39 rev_info.call(py, (rev_py,), None)?.cast_into(py)?;
39 40 let p1 = tuple.get_item(py, 0).extract(py)?;
40 41 let p2 = tuple.get_item(py, 1).extract(py)?;
41 42 let opt_bytes = tuple.get_item(py, 2).extract(py)?;
42 43 Ok((rev, p1, p2, opt_bytes))
43 44 });
44 45
45 let mut combine_changeset_copies =
46 CombineChangesetCopies::new(children_count);
46 let path_copies = if !multi_thread {
47 let mut combine_changeset_copies =
48 CombineChangesetCopies::new(children_count);
49
50 for rev_info in revs_info {
51 let (rev, p1, p2, opt_bytes) = rev_info?;
52 let files = match &opt_bytes {
53 Some(bytes) => ChangedFiles::new(bytes.data(py)),
54 // Python None was extracted to Option::None,
55 // meaning there was no copy data.
56 None => ChangedFiles::new_empty(),
57 };
58
59 combine_changeset_copies.add_revision(rev, p1, p2, files)
60 }
61 combine_changeset_copies.finish(target_rev)
62 } else {
63 // Use a bounded channel to provide back-pressure:
64 // if the child thread is slower to process revisions than this thread
65 // is to gather data for them, an unbounded channel would keep
66 // growing and eat memory.
67 //
68 // TODO: tweak the bound?
69 let (rev_info_sender, rev_info_receiver) =
70 crossbeam_channel::bounded::<RevInfo>(1000);
47 71
48 for rev_info in revs_info {
49 let (rev, p1, p2, opt_bytes) = rev_info?;
50 let files = match &opt_bytes {
51 Some(bytes) => ChangedFiles::new(bytes.data(py)),
52 // value was presumably None, meaning they was no copy data.
53 None => ChangedFiles::new_empty(),
54 };
72 // Start a thread that does CPU-heavy processing in parallel with the
73 // loop below.
74 //
75 // If the parent thread panics, `rev_info_sender` will be dropped and
76 // “disconnected”. `rev_info_receiver` will be notified of this and
77 // exit its own loop.
78 let thread = std::thread::spawn(move || {
79 let mut combine_changeset_copies =
80 CombineChangesetCopies::new(children_count);
81 for (rev, p1, p2, opt_bytes) in rev_info_receiver {
82 let gil = Python::acquire_gil();
83 let py = gil.python();
84 let files = match &opt_bytes {
85 Some(raw) => ChangedFiles::new(raw.data(py)),
86 // Python None was extracted to Option::None,
87 // meaning there was no copy data.
88 None => ChangedFiles::new_empty(),
89 };
90 combine_changeset_copies.add_revision(rev, p1, p2, files)
91 }
92
93 combine_changeset_copies.finish(target_rev)
94 });
55 95
56 combine_changeset_copies.add_revision(rev, p1, p2, files)
57 }
58 let path_copies = combine_changeset_copies.finish(target_rev);
96 for rev_info in revs_info {
97 let (rev, p1, p2, opt_bytes) = rev_info?;
98
99 // We’d prefer to avoid the child thread calling into Python code,
100 // but this avoids a potential deadlock on the GIL if it does:
101 py.allow_threads(|| {
102 rev_info_sender.send((rev, p1, p2, opt_bytes)).expect(
103 "combine_changeset_copies: channel is disconnected",
104 );
105 });
106 }
107 // We’d prefer to avoid the child thread calling into Python code,
108 // but this avoids a potential deadlock on the GIL if it does:
109 py.allow_threads(|| {
110 // Disconnect the channel to signal the child thread to stop:
111 // the `for … in rev_info_receiver` loop will end.
112 drop(rev_info_sender);
113
114 // Wait for the child thread to stop, and propagate any panic.
115 thread.join().unwrap_or_else(|panic_payload| {
116 std::panic::resume_unwind(panic_payload)
117 })
118 })
119 };
120
59 121 let out = PyDict::new(py);
60 122 for (dest, source) in path_copies.into_iter() {
61 123 out.set_item(
62 124 py,
63 125 PyBytes::new(py, &dest.into_vec()),
64 126 PyBytes::new(py, &source.into_vec()),
65 127 )?;
66 128 }
67 129 Ok(out)
68 130 }
69 131
70 132 /// Create the module, with `__package__` given from parent
71 133 pub fn init_module(py: Python, package: &str) -> PyResult<PyModule> {
72 134 let dotted_name = &format!("{}.copy_tracing", package);
73 135 let m = PyModule::new(py, dotted_name)?;
74 136
75 137 m.add(py, "__package__", package)?;
76 138 m.add(py, "__doc__", "Copy tracing - Rust implementation")?;
77 139
78 140 m.add(
79 141 py,
80 142 "combine_changeset_copies",
81 143 py_fn!(
82 144 py,
83 145 combine_changeset_copies_wrapper(
84 146 revs: PyList,
85 147 children: PyDict,
86 148 target_rev: Revision,
87 rev_info: PyObject
149 rev_info: PyObject,
150 multi_thread: bool
88 151 )
89 152 ),
90 153 )?;
91 154
92 155 let sys = PyModule::import(py, "sys")?;
93 156 let sys_modules: PyDict = sys.get(py, "modules")?.extract(py)?;
94 157 sys_modules.set_item(py, dotted_name, &m)?;
95 158
96 159 Ok(m)
97 160 }
General Comments 0
You need to be logged in to leave comments. Login now