I've used "hg convert" for months with no problem but I just noticed a specific case where it seems to corrupt repositories. Using Mercurial 1.9+10-e9264b45237d "hg verify" on the original repository returns: checking changesets checking manifests crosschecking files in changesets and manifests checking files 183 files, 43 changesets, 436 total revisions I invoke "hg convert --authormap authors.txt jperipheral jperipheral.new". This completes without any warnings or errors. "hg verify" on the new repository returns: checking changesets checking manifests crosschecking files in changesets and manifests 0: changeset refers to unknown manifest 000000000000 checking files 183 files, 43 changesets, 436 total revisions 1 integrity errors encountered! (first damaged changeset appears to be 0) The first changeset is pretty big (15MB). The entire repository is around 40MB. Please let me know what I can do to help you reproduce this bug. Are there any extra logs I can enable?
Correction, the entire .hg directory is 16MB.
The authormap is not relevant. Invoking "hg convert jperipheral jperipheral.new" is enough to corrupt the repository.
I've posted a copy of the repository here: http://hotfile.com/dl/123953371/b30f9d9/jperipheral.zip.html Please let me know when you're done downloading it so I can delete it.
I've got the repository and can reproduce. Feel free to take that link down, I can share this with other hg devs as-needed if someone else beats me to this.
I suspect this is related to the first revision having no files, and our manifest-reuse code.
This is harmless and is a bug in verify. The 00000000 revision (aka the empty revision) is implicitly present in all revlogs. Degrading to bug. $ hg init a $ cd a $ hg branch foo # make a nearly-empty commit marked working directory as branch foo $ hg ci -Am0 $ echo b > b $ hg ci -Am1 $ hg verify checking changesets checking manifests crosschecking files in changesets and manifests 0: changeset refers to unknown manifest 000000000000 checking files 1 files, 2 changesets, 1 total revisions 1 integrity errors encountered! (first damaged changeset appears to be 0)
Matt, Just curious, why then does "hg verify" work on the original repository?
Not sure. Does hg log -vr 0 report no files in the original?
Yes, because it's a conversion from svn.
Unless I've missed something, you haven't answered my question as to why "hg verify" works on the original repository. Yes, the converted repository is a conversion from SVN, but so is the original.
Again, does hg log -vr 0 report no files in the original? There are multiple ways to represent "the empty manifest with no parents". One is with the null revision, which is what convert produced. Your source repository managed to use another. Unless the -contents- of the conversion are wrong, the question is purely academic.
Okay, I understand. Thanks Matt.
Fixed by http://selenic.com/repo/hg/rev/eb914541a950 Matt Mackall <mpm@selenic.com> verify: filter messages about missing null manifests (issue2900) (please test the fix)
Fixed by http://selenic.com/repo/hg/rev/15afa4984a94 Matt Mackall <mpm@selenic.com> verify: filter messages about missing null manifests (issue2900) (please test the fix)
I tested verify with a pull from today of hg. It still returns an error when a 0-length manifest is encountered. version 1.9.2+73-ff26712a0c50 paulnath@paulnathlinux:~/temp/empty-repo-issues $ ~/hg/hg init paulnath@paulnathlinux:~/temp/empty-repo-issues $ ~/hg/hg branch release marked working directory as branch release paulnath@paulnathlinux:~/temp/empty-repo-issues $ ~/hg/hg commit -m "new branch" paulnath@paulnathlinux:~/temp/empty-repo-issues $ ~/hg/hg verify checking changesets checking manifests 0: empty or missing manifest crosschecking files in changesets and manifests checking files 0 files, 1 changesets, 0 total revisions 1 integrity errors encountered! (first damaged changeset appears to be 0) paulnath@paulnathlinux:~/temp/empty-repo-issues $ ~/hg/hg version Mercurial Distributed SCM (version 1.9.2+73-ff26712a0c50) (see http://mercurial.selenic.com for more information) Copyright (C) 2005-2011 Matt Mackall and others This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
Yeah, I've known about that, but haven't had a chance to bug mpm about it in irc.
Yes, that portion of the bug still exists, but only for trivial repos that contain no files at all.
--- Bug imported by bugzilla@serpentine.com 2012-05-12 09:21 EDT --- This bug was previously known as _bug_ 2900 at http://mercurial.selenic.com/bts/issue2900
Bulk close: no activity for >2 years -> WONTFIX
Bulk change recent WONTFIX -> new, more descriptive ARCHIVED state (sorry for the spam)
Fixed by https://selenic.com/repo/hg/rev/334a3aa677fb Martin von Zweigbergk <martinvonz@google.com> verify: drop unnecessary check for nullid In eb914541a950 (verify: filter messages about missing null manifests (issue2900), 2011-07-13), we started ignoring nullid in the list of manifest nodeids to check. Then, in b32a30da608d (verify: do not choke on valid changelog without manifest, 2012-08-21), we stopped adding nullid to the list to start with. So let's drop the left-over check now. (please test the fix)
Who are we expecting to test the fix? Does anyone still have a copy of the testcase?
If you could test it this would be great.
I tested version 3.7.1 and it works fine. Is this the correct version to be testing?
Ignore this, this is just the BTS robot noting a stray mention of an ancient issue number in a much later cleanup.