Show More
@@ -4655,8 +4655,11 b' def push(ui, repo, dest=None, **opts):' | |||||
4655 |
|
4655 | |||
4656 | return result |
|
4656 | return result | |
4657 |
|
4657 | |||
4658 | @command('recover', [], helpcategory=command.CATEGORY_MAINTENANCE) |
|
4658 | @command('recover', | |
4659 | def recover(ui, repo): |
|
4659 | [('','verify', True, "run `hg verify` after succesful recover"), | |
|
4660 | ], | |||
|
4661 | helpcategory=command.CATEGORY_MAINTENANCE) | |||
|
4662 | def recover(ui, repo, **opts): | |||
4660 | """roll back an interrupted transaction |
|
4663 | """roll back an interrupted transaction | |
4661 |
|
4664 | |||
4662 | Recover from an interrupted commit or pull. |
|
4665 | Recover from an interrupted commit or pull. | |
@@ -4667,8 +4670,15 b' def recover(ui, repo):' | |||||
4667 |
|
4670 | |||
4668 | Returns 0 if successful, 1 if nothing to recover or verify fails. |
|
4671 | Returns 0 if successful, 1 if nothing to recover or verify fails. | |
4669 | """ |
|
4672 | """ | |
4670 |
|
|
4673 | ret = repo.recover() | |
4671 | return hg.verify(repo) |
|
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 | return 1 |
|
4682 | return 1 | |
4673 |
|
4683 | |||
4674 | @command('remove|rm', |
|
4684 | @command('remove|rm', |
@@ -332,7 +332,7 b' Show all commands + options' | |||||
332 | phase: public, draft, secret, force, rev |
|
332 | phase: public, draft, secret, force, rev | |
333 | pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure |
|
333 | pull: update, force, rev, bookmark, branch, ssh, remotecmd, insecure | |
334 | push: force, rev, bookmark, branch, new-branch, pushvars, publish, ssh, remotecmd, insecure |
|
334 | push: force, rev, bookmark, branch, new-branch, pushvars, publish, ssh, remotecmd, insecure | |
335 | recover: |
|
335 | recover: verify | |
336 | remove: after, force, subrepos, include, exclude, dry-run |
|
336 | remove: after, force, subrepos, include, exclude, dry-run | |
337 | rename: after, force, include, exclude, dry-run |
|
337 | rename: after, force, include, exclude, dry-run | |
338 | resolve: all, list, mark, unmark, no-status, re-merge, tool, include, exclude, template |
|
338 | resolve: all, list, mark, unmark, no-status, re-merge, tool, include, exclude, template |
@@ -21,6 +21,33 b'' | |||||
21 | checking files |
|
21 | checking files | |
22 | checked 1 changesets with 1 changes to 1 files |
|
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 | Check that zero-size journals are correctly aborted: |
|
51 | Check that zero-size journals are correctly aborted: | |
25 |
|
52 | |||
26 | #if unix-permissions no-root |
|
53 | #if unix-permissions no-root |
General Comments 0
You need to be logged in to leave comments.
Login now