This is an archive of the discontinued Mercurial Phabricator instance.

verify: avoid spurious integrity warnings in verbose mode (issue6172)
ClosedPublic

Authored by mharbison72 on Jan 18 2020, 7:37 PM.

Details

Summary

The issue seems to revolve around renames in filtered commits, and only occurred
in verbose mode. The problem occurs in the # check renames stage, around line

  1. Without using the unfiltered repo, this test would have printed:

    $ hg verify -v repository uses revlog format 1 checking changesets checking manifests crosschecking files in changesets and manifests checking files foo@25: checking rename of 71ec0570c325: filtered revision '25' foobar@26: checking rename of 1b549296015b: filtered revision '26' checked 28 changesets with 16 changes to 11 files 2 integrity errors encountered! (first damaged changeset appears to be 25) [1]

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

mharbison72 created this revision.Jan 18 2020, 7:37 PM
pulkit added a subscriber: pulkit.Jan 20 2020, 11:36 AM

TBH it feels not correct that some code path of hg verify needs unfiltered repository and that too around renames. Reading tests, I first thought it's some bug in unamend and then checked the issue to realize it's a general problem.

TBH it feels not correct that some code path of hg verify needs unfiltered repository and that too around renames. Reading tests, I first thought it's some bug in unamend and then checked the issue to realize it's a general problem.

The verify.verifier class uses an unfiltered repo, which I assume is why sometimes it can stray off into filtered revisions. FWIW, I've got a repo at work that also prints:

subrepo '$subrepo' is hidden in revision $hash

This doesn't purport to fix that (and I struggled coming up with a test repro a few years ago). Just mentioning that there are other filtering problems around verify.

pulkit accepted this revision.Jan 21 2020, 7:03 AM
This revision is now accepted and ready to land.Jan 21 2020, 7:03 AM