admin-command: add verify command
Start using the 'admin' namespace by adding a 'verify' command.
Invocation is 'admin::verify'.
The idea is to progressively add more focused checks than the existing
verify command.
To do so we need an advanced way to express what we want to check.
The first check for admin::verify is 'working-copy.dirstate' which has
no options, because it was an easy first check to implement, which
verifies the integrity of the dirstate.
This changeset was created with the help of Franck Bret.
Test issue2761
$ hg init repo
$ cd repo
$ touch to-be-deleted
$ hg add
adding to-be-deleted
$ hg ci -m first
$ echo a > to-be-deleted
$ hg ci -m second
$ rm to-be-deleted
$ hg diff -r 0
Same issue, different code path
$ hg up -C
1 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ touch does-not-exist-in-1
$ hg add
adding does-not-exist-in-1
$ hg ci -m third
$ rm does-not-exist-in-1
$ hg diff -r 1