HG integrity errors

I got tangled in an ugly situation with a repository that wouldn't merge in changes. So I cloned from Bitbucket, moved over some dev files and got things going again. Sort of...

Now hg status and verify are complaining about corruption from a hundred commits ago. The file in question caused some problems way back, but I added it to .hgignore and things have moved forward. I know now the importance of keeping .zip files out of respositories.

Here is the output of hg status:

abort: data/public_html/obs_offline/CalStateTEACH Offline Observation.zip.i@e709
07e4b5fe: no match found!

Here is the output of hg verify:

checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
 data/public_html/obs_offline/CalStateTEACH Offline Observation.zip.i@71: missin
g revlog!
 71: empty or missing public_html/obs_offline/CalStateTEACH Offline Observation.
zip
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@71: b7fa838c0a8d
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@73: 5c53d97a18ed
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@75: 12feacb3aa5d
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@76: 580a82aafc51
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@78: 627f10f55a67
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@79: 55d79b568120
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@81: 8bfe0ee5c011
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@82: 3c6863e325ad
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@84: 34c6752fdca2
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@87: c09bef8f3f12
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@90: 672a9d10f4d5
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@92: cd43d8e23384
in manifests not found
 public_html/obs_offline/CalStateTEACH Offline Observation.zip@98: e70907e4b5fe
in manifests not found
1034 files, 224 changesets, 1653 total revisions
15 integrity errors encountered!
(first damaged changeset appears to be 71)

The .zip file isn't important--I can delete it without any issues. How can I purge this file from the repository permanently? I'd prefer to avoid the "big gun" solution of rebuilding the whole repository and starting over.

Thanks in advance for any help you can provide.

1 answer

1 accepted

Hi there,

It looks like you may have removed the .zip file from the .hg directories. This won't work. You absolutely must rewrite ALL history from the time this was introduced to be able to remove it without corrupting your repository. This is by design of Mercurial to prevent history changes without everyone knowing things have changed. You'll want to get that file back in place, or clone a fresh, unaffected copy and then run hg convert to basically recreate a repository without that file.

The Mercurial guide has instructions here: http://mercurial.selenic.com/wiki/ConvertExtension

This will be the ONLY way to remove a file historically from your repository.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published 8 hours ago in Jira Software

How large do you think Jira Software can grow?

Hi Atlassian Community! My name is Shana, and I’m on the Jira Software team. One of the many reasons this Community exists is to connect you to others on similar product journeys or with comparabl...

104 views 4 5
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you