Show More
@@ -4655,8 +4655,11 b' def push(ui, repo, dest=None, **opts):' | |||
|
4655 | 4655 | |
|
4656 | 4656 | return result |
|
4657 | 4657 | |
|
4658 | @command('recover', [], helpcategory=command.CATEGORY_MAINTENANCE) | |
|
4659 | def recover(ui, repo): | |
|
4658 | @command('recover', | |
|
4659 | [('','verify', True, "run `hg verify` after succesful recover"), | |
|
4660 | ], | |
|
4661 | helpcategory=command.CATEGORY_MAINTENANCE) | |
|
4662 | def recover(ui, repo, **opts): | |
|
4660 | 4663 | """roll back an interrupted transaction |
|
4661 | 4664 | |
|
4662 | 4665 | Recover from an interrupted commit or pull. |
@@ -4667,8 +4670,15 b' def recover(ui, repo):' | |||
|
4667 | 4670 | |
|
4668 | 4671 | Returns 0 if successful, 1 if nothing to recover or verify fails. |
|
4669 | 4672 | """ |
|
4670 |
|
|
|
4671 | return hg.verify(repo) | |
|
4673 | ret = repo.recover() | |
|
4674 | if ret: | |
|
4675 | if opts['verify']: | |
|
4676 | return hg.verify(repo) | |
|
4677 | else: | |
|
4678 | msg = _("(verify step skipped, run `hg verify` to check your " | |
|
4679 | "repository content)\n") | |
|
4680 | ui.warn(msg) | |
|
4681 | return 0 | |
|
4672 | 4682 | return 1 |
|
4673 | 4683 | |
|
4674 | 4684 | @command('remove|rm', |
@@ -829,6 +829,7 b' def debugdiscovery(ui, repo, remoteurl="' | |||
|
829 | 829 | data['nb-common'] = len(common) |
|
830 | 830 | data['nb-common-local'] = len(common & lheads) |
|
831 | 831 | data['nb-common-remote'] = len(common & rheads) |
|
832 | data['nb-common-both'] = len(common & rheads & lheads) | |
|
832 | 833 | data['nb-local'] = len(lheads) |
|
833 | 834 | data['nb-local-missing'] = data['nb-local'] - data['nb-common-local'] |
|
834 | 835 | data['nb-remote'] = len(rheads) |
@@ -843,6 +844,7 b' def debugdiscovery(ui, repo, remoteurl="' | |||
|
843 | 844 | ui.write((" total common heads: %(nb-common)9d\n") % data) |
|
844 | 845 | ui.write((" also local heads: %(nb-common-local)9d\n") % data) |
|
845 | 846 | ui.write((" also remote heads: %(nb-common-remote)9d\n") % data) |
|
847 | ui.write((" both: %(nb-common-both)9d\n") % data) | |
|
846 | 848 | ui.write((" local heads: %(nb-local)9d\n") % data) |
|
847 | 849 | ui.write((" common: %(nb-common-local)9d\n") % data) |
|
848 | 850 | ui.write((" missing: %(nb-local-missing)9d\n") % data) |
@@ -332,7 +332,7 b' Show all commands + options' | |||
|
332 | 332 | phase: public, draft, secret, force, rev |
|
333 | 333 | pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure |
|
334 | 334 | push: force, rev, bookmark, branch, new-branch, pushvars, publish, ssh, remotecmd, insecure |
|
335 | recover: | |
|
335 | recover: verify | |
|
336 | 336 | remove: after, force, subrepos, include, exclude, dry-run |
|
337 | 337 | rename: after, force, include, exclude, dry-run |
|
338 | 338 | resolve: all, list, mark, unmark, no-status, re-merge, tool, include, exclude, template |
@@ -21,6 +21,33 b'' | |||
|
21 | 21 | checking files |
|
22 | 22 | checked 1 changesets with 1 changes to 1 files |
|
23 | 23 | |
|
24 | recover, explicite verify | |
|
25 | ||
|
26 | $ touch .hg/store/journal | |
|
27 | $ hg ci -Am0 | |
|
28 | abort: abandoned transaction found! | |
|
29 | (run 'hg recover' to clean up transaction) | |
|
30 | [255] | |
|
31 | $ hg recover --verify | |
|
32 | rolling back interrupted transaction | |
|
33 | checking changesets | |
|
34 | checking manifests | |
|
35 | crosschecking files in changesets and manifests | |
|
36 | checking files | |
|
37 | checked 1 changesets with 1 changes to 1 files | |
|
38 | ||
|
39 | recover, no verify | |
|
40 | ||
|
41 | $ touch .hg/store/journal | |
|
42 | $ hg ci -Am0 | |
|
43 | abort: abandoned transaction found! | |
|
44 | (run 'hg recover' to clean up transaction) | |
|
45 | [255] | |
|
46 | $ hg recover --no-verify | |
|
47 | rolling back interrupted transaction | |
|
48 | (verify step skipped, run `hg verify` to check your repository content) | |
|
49 | ||
|
50 | ||
|
24 | 51 | Check that zero-size journals are correctly aborted: |
|
25 | 52 | |
|
26 | 53 | #if unix-permissions no-root |
@@ -48,6 +48,7 b' Small superset:' | |||
|
48 | 48 | total common heads: 2 |
|
49 | 49 | also local heads: 2 |
|
50 | 50 | also remote heads: 1 |
|
51 | both: 1 | |
|
51 | 52 | local heads: 2 |
|
52 | 53 | common: 2 |
|
53 | 54 | missing: 0 |
@@ -69,6 +70,7 b' Small superset:' | |||
|
69 | 70 | total common heads: 2 |
|
70 | 71 | also local heads: 2 |
|
71 | 72 | also remote heads: 1 |
|
73 | both: 1 | |
|
72 | 74 | local heads: 2 |
|
73 | 75 | common: 2 |
|
74 | 76 | missing: 0 |
@@ -90,6 +92,7 b' Small superset:' | |||
|
90 | 92 | total common heads: 1 |
|
91 | 93 | also local heads: 1 |
|
92 | 94 | also remote heads: 0 |
|
95 | both: 0 | |
|
93 | 96 | local heads: 2 |
|
94 | 97 | common: 1 |
|
95 | 98 | missing: 1 |
@@ -110,6 +113,7 b' Small superset:' | |||
|
110 | 113 | total common heads: 2 |
|
111 | 114 | also local heads: 1 |
|
112 | 115 | also remote heads: 2 |
|
116 | both: 1 | |
|
113 | 117 | local heads: 3 |
|
114 | 118 | common: 1 |
|
115 | 119 | missing: 2 |
@@ -131,6 +135,7 b' Small superset:' | |||
|
131 | 135 | total common heads: 2 |
|
132 | 136 | also local heads: 1 |
|
133 | 137 | also remote heads: 2 |
|
138 | both: 1 | |
|
134 | 139 | local heads: 3 |
|
135 | 140 | common: 1 |
|
136 | 141 | missing: 2 |
@@ -152,6 +157,7 b' Small superset:' | |||
|
152 | 157 | total common heads: 2 |
|
153 | 158 | also local heads: 1 |
|
154 | 159 | also remote heads: 2 |
|
160 | both: 1 | |
|
155 | 161 | local heads: 3 |
|
156 | 162 | common: 1 |
|
157 | 163 | missing: 2 |
@@ -179,6 +185,7 b' Many new:' | |||
|
179 | 185 | total common heads: 1 |
|
180 | 186 | also local heads: 1 |
|
181 | 187 | also remote heads: 0 |
|
188 | both: 0 | |
|
182 | 189 | local heads: 2 |
|
183 | 190 | common: 1 |
|
184 | 191 | missing: 1 |
@@ -203,6 +210,7 b' Many new:' | |||
|
203 | 210 | total common heads: 1 |
|
204 | 211 | also local heads: 1 |
|
205 | 212 | also remote heads: 0 |
|
213 | both: 0 | |
|
206 | 214 | local heads: 2 |
|
207 | 215 | common: 1 |
|
208 | 216 | missing: 1 |
@@ -227,6 +235,7 b' Many new:' | |||
|
227 | 235 | total common heads: 1 |
|
228 | 236 | also local heads: 0 |
|
229 | 237 | also remote heads: 0 |
|
238 | both: 0 | |
|
230 | 239 | local heads: 2 |
|
231 | 240 | common: 0 |
|
232 | 241 | missing: 2 |
@@ -247,6 +256,7 b' Many new:' | |||
|
247 | 256 | total common heads: 1 |
|
248 | 257 | also local heads: 0 |
|
249 | 258 | also remote heads: 1 |
|
259 | both: 0 | |
|
250 | 260 | local heads: 1 |
|
251 | 261 | common: 0 |
|
252 | 262 | missing: 1 |
@@ -271,6 +281,7 b' Many new:' | |||
|
271 | 281 | total common heads: 1 |
|
272 | 282 | also local heads: 0 |
|
273 | 283 | also remote heads: 1 |
|
284 | both: 0 | |
|
274 | 285 | local heads: 1 |
|
275 | 286 | common: 0 |
|
276 | 287 | missing: 1 |
@@ -295,6 +306,7 b' Many new:' | |||
|
295 | 306 | total common heads: 1 |
|
296 | 307 | also local heads: 0 |
|
297 | 308 | also remote heads: 1 |
|
309 | both: 0 | |
|
298 | 310 | local heads: 1 |
|
299 | 311 | common: 0 |
|
300 | 312 | missing: 1 |
@@ -321,6 +333,7 b' Both sides many new with stub:' | |||
|
321 | 333 | total common heads: 1 |
|
322 | 334 | also local heads: 1 |
|
323 | 335 | also remote heads: 0 |
|
336 | both: 0 | |
|
324 | 337 | local heads: 2 |
|
325 | 338 | common: 1 |
|
326 | 339 | missing: 1 |
@@ -345,6 +358,7 b' Both sides many new with stub:' | |||
|
345 | 358 | total common heads: 1 |
|
346 | 359 | also local heads: 1 |
|
347 | 360 | also remote heads: 0 |
|
361 | both: 0 | |
|
348 | 362 | local heads: 2 |
|
349 | 363 | common: 1 |
|
350 | 364 | missing: 1 |
@@ -369,6 +383,7 b' Both sides many new with stub:' | |||
|
369 | 383 | total common heads: 1 |
|
370 | 384 | also local heads: 0 |
|
371 | 385 | also remote heads: 0 |
|
386 | both: 0 | |
|
372 | 387 | local heads: 2 |
|
373 | 388 | common: 0 |
|
374 | 389 | missing: 2 |
@@ -389,6 +404,7 b' Both sides many new with stub:' | |||
|
389 | 404 | total common heads: 1 |
|
390 | 405 | also local heads: 0 |
|
391 | 406 | also remote heads: 1 |
|
407 | both: 0 | |
|
392 | 408 | local heads: 1 |
|
393 | 409 | common: 0 |
|
394 | 410 | missing: 1 |
@@ -413,6 +429,7 b' Both sides many new with stub:' | |||
|
413 | 429 | total common heads: 1 |
|
414 | 430 | also local heads: 0 |
|
415 | 431 | also remote heads: 1 |
|
432 | both: 0 | |
|
416 | 433 | local heads: 1 |
|
417 | 434 | common: 0 |
|
418 | 435 | missing: 1 |
@@ -437,6 +454,7 b' Both sides many new with stub:' | |||
|
437 | 454 | total common heads: 1 |
|
438 | 455 | also local heads: 0 |
|
439 | 456 | also remote heads: 1 |
|
457 | both: 0 | |
|
440 | 458 | local heads: 1 |
|
441 | 459 | common: 0 |
|
442 | 460 | missing: 1 |
@@ -464,6 +482,7 b' Both many new:' | |||
|
464 | 482 | total common heads: 1 |
|
465 | 483 | also local heads: 0 |
|
466 | 484 | also remote heads: 0 |
|
485 | both: 0 | |
|
467 | 486 | local heads: 1 |
|
468 | 487 | common: 0 |
|
469 | 488 | missing: 1 |
@@ -488,6 +507,7 b' Both many new:' | |||
|
488 | 507 | total common heads: 1 |
|
489 | 508 | also local heads: 0 |
|
490 | 509 | also remote heads: 0 |
|
510 | both: 0 | |
|
491 | 511 | local heads: 1 |
|
492 | 512 | common: 0 |
|
493 | 513 | missing: 1 |
@@ -512,6 +532,7 b' Both many new:' | |||
|
512 | 532 | total common heads: 1 |
|
513 | 533 | also local heads: 0 |
|
514 | 534 | also remote heads: 0 |
|
535 | both: 0 | |
|
515 | 536 | local heads: 1 |
|
516 | 537 | common: 0 |
|
517 | 538 | missing: 1 |
@@ -532,6 +553,7 b' Both many new:' | |||
|
532 | 553 | total common heads: 1 |
|
533 | 554 | also local heads: 0 |
|
534 | 555 | also remote heads: 0 |
|
556 | both: 0 | |
|
535 | 557 | local heads: 1 |
|
536 | 558 | common: 0 |
|
537 | 559 | missing: 1 |
@@ -556,6 +578,7 b' Both many new:' | |||
|
556 | 578 | total common heads: 1 |
|
557 | 579 | also local heads: 0 |
|
558 | 580 | also remote heads: 0 |
|
581 | both: 0 | |
|
559 | 582 | local heads: 1 |
|
560 | 583 | common: 0 |
|
561 | 584 | missing: 1 |
@@ -580,6 +603,7 b' Both many new:' | |||
|
580 | 603 | total common heads: 1 |
|
581 | 604 | also local heads: 0 |
|
582 | 605 | also remote heads: 0 |
|
606 | both: 0 | |
|
583 | 607 | local heads: 1 |
|
584 | 608 | common: 0 |
|
585 | 609 | missing: 1 |
@@ -607,6 +631,7 b' Both many new skewed:' | |||
|
607 | 631 | total common heads: 1 |
|
608 | 632 | also local heads: 0 |
|
609 | 633 | also remote heads: 0 |
|
634 | both: 0 | |
|
610 | 635 | local heads: 1 |
|
611 | 636 | common: 0 |
|
612 | 637 | missing: 1 |
@@ -631,6 +656,7 b' Both many new skewed:' | |||
|
631 | 656 | total common heads: 1 |
|
632 | 657 | also local heads: 0 |
|
633 | 658 | also remote heads: 0 |
|
659 | both: 0 | |
|
634 | 660 | local heads: 1 |
|
635 | 661 | common: 0 |
|
636 | 662 | missing: 1 |
@@ -655,6 +681,7 b' Both many new skewed:' | |||
|
655 | 681 | total common heads: 1 |
|
656 | 682 | also local heads: 0 |
|
657 | 683 | also remote heads: 0 |
|
684 | both: 0 | |
|
658 | 685 | local heads: 1 |
|
659 | 686 | common: 0 |
|
660 | 687 | missing: 1 |
@@ -675,6 +702,7 b' Both many new skewed:' | |||
|
675 | 702 | total common heads: 1 |
|
676 | 703 | also local heads: 0 |
|
677 | 704 | also remote heads: 0 |
|
705 | both: 0 | |
|
678 | 706 | local heads: 1 |
|
679 | 707 | common: 0 |
|
680 | 708 | missing: 1 |
@@ -699,6 +727,7 b' Both many new skewed:' | |||
|
699 | 727 | total common heads: 1 |
|
700 | 728 | also local heads: 0 |
|
701 | 729 | also remote heads: 0 |
|
730 | both: 0 | |
|
702 | 731 | local heads: 1 |
|
703 | 732 | common: 0 |
|
704 | 733 | missing: 1 |
@@ -723,6 +752,7 b' Both many new skewed:' | |||
|
723 | 752 | total common heads: 1 |
|
724 | 753 | also local heads: 0 |
|
725 | 754 | also remote heads: 0 |
|
755 | both: 0 | |
|
726 | 756 | local heads: 1 |
|
727 | 757 | common: 0 |
|
728 | 758 | missing: 1 |
@@ -750,6 +780,7 b' Both many new on top of long history:' | |||
|
750 | 780 | total common heads: 1 |
|
751 | 781 | also local heads: 0 |
|
752 | 782 | also remote heads: 0 |
|
783 | both: 0 | |
|
753 | 784 | local heads: 1 |
|
754 | 785 | common: 0 |
|
755 | 786 | missing: 1 |
@@ -777,6 +808,7 b' Both many new on top of long history:' | |||
|
777 | 808 | total common heads: 1 |
|
778 | 809 | also local heads: 0 |
|
779 | 810 | also remote heads: 0 |
|
811 | both: 0 | |
|
780 | 812 | local heads: 1 |
|
781 | 813 | common: 0 |
|
782 | 814 | missing: 1 |
@@ -804,6 +836,7 b' Both many new on top of long history:' | |||
|
804 | 836 | total common heads: 1 |
|
805 | 837 | also local heads: 0 |
|
806 | 838 | also remote heads: 0 |
|
839 | both: 0 | |
|
807 | 840 | local heads: 1 |
|
808 | 841 | common: 0 |
|
809 | 842 | missing: 1 |
@@ -824,6 +857,7 b' Both many new on top of long history:' | |||
|
824 | 857 | total common heads: 1 |
|
825 | 858 | also local heads: 0 |
|
826 | 859 | also remote heads: 0 |
|
860 | both: 0 | |
|
827 | 861 | local heads: 1 |
|
828 | 862 | common: 0 |
|
829 | 863 | missing: 1 |
@@ -851,6 +885,7 b' Both many new on top of long history:' | |||
|
851 | 885 | total common heads: 1 |
|
852 | 886 | also local heads: 0 |
|
853 | 887 | also remote heads: 0 |
|
888 | both: 0 | |
|
854 | 889 | local heads: 1 |
|
855 | 890 | common: 0 |
|
856 | 891 | missing: 1 |
@@ -878,6 +913,7 b' Both many new on top of long history:' | |||
|
878 | 913 | total common heads: 1 |
|
879 | 914 | also local heads: 0 |
|
880 | 915 | also remote heads: 0 |
|
916 | both: 0 | |
|
881 | 917 | local heads: 1 |
|
882 | 918 | common: 0 |
|
883 | 919 | missing: 1 |
@@ -957,6 +993,7 b' One with >200 heads, which used to use u' | |||
|
957 | 993 | total common heads: 1 |
|
958 | 994 | also local heads: 0 |
|
959 | 995 | also remote heads: 0 |
|
996 | both: 0 | |
|
960 | 997 | local heads: 260 |
|
961 | 998 | common: 0 |
|
962 | 999 | missing: 260 |
@@ -983,6 +1020,7 b' One with >200 heads, which used to use u' | |||
|
983 | 1020 | total common heads: 1 |
|
984 | 1021 | also local heads: 0 |
|
985 | 1022 | also remote heads: 0 |
|
1023 | both: 0 | |
|
986 | 1024 | local heads: 260 |
|
987 | 1025 | common: 0 |
|
988 | 1026 | missing: 260 |
General Comments 0
You need to be logged in to leave comments.
Login now