Skip to content
Snippets Groups Projects
Commit a93e60ebea09 authored by Raphaël Gomès's avatar Raphaël Gomès
Browse files

admin-verify: expect a number of errors to be returned

It's the responsibility of the check to handle errors, we only care about
the total count to sum up the check's work.

We use `admin::verify -c dirstate` to test this path at least somewhat.
parent 2a27b921cd91
No related branches found
No related tags found
3 merge requests!854Merge stable into default,!852Dirstate-v2: catch corruption before writing it to disk,!851admin-verify: pass p1 down to the dirstate function
...@@ -47,4 +47,4 @@ ...@@ -47,4 +47,4 @@
ui.status(_(b"running %s\n") % name) ui.status(_(b"running %s\n") % name)
errors = func() errors = func()
if errors: if errors:
ui.warn(_(b"found %d errors\n") % len(errors)) ui.warn(_(b"found %d errors\n") % errors)
...@@ -132,6 +132,16 @@ ...@@ -132,6 +132,16 @@
dirstate inconsistent with current parent's manifest dirstate inconsistent with current parent's manifest
1 dirstate errors 1 dirstate errors
[1] [1]
We can check the dirstate in isolation
$ hg admin::verify -c dirstate
running 1 checks
running working-copy.dirstate
checking dirstate
warning: ignoring unknown working parent c5ddb05ab828!
file marked as tracked in p1 (000000000000) but not in manifest1
found 1 errors
$ cp -R .hg/store-full/. .hg/store $ cp -R .hg/store-full/. .hg/store
Entire changelog and filelog missing Entire changelog and filelog missing
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment