i think ive managed to corrupt one of mercurial repositories, is there anyway to recover the damage? the message i get when attempting to update the repo to my default branch is:
PS C:\wco\projects\ims\code> hg up -C default
abort: data/Trunk/application/models/priority_model.php.i#83dbdfb60981: no match found!
when i run hg verify, i get the following report:
PS C:\wco\projects\ims\code> hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
data/.buildpath.i#0: missing revlog!
0: empty or missing .buildpath
.buildpath#0: daf15acb5273 in manifests not found
data/.project.i#0: missing revlog!
0: empty or missing .project
.project#0: e8b25997d6d1 in manifests not found
Rawlings IMS/index.html#3: empty or missing copy source revlog index.html:b8b2b36a6eea
Rawlings IMS/index.php#3: empty or missing copy source revlog index.php:a5f76bf232e9
Rawlings IMS/index_backup.php#3: empty or missing copy source revlog index_backup.php:a5f76bf232e9
Rawlings IMS/index_this_hold.html#3: empty or missing copy source revlog index_this_hold.html:b8b2b36a6eea
Rawlings IMS/testera.php#3: empty or missing copy source revlog testera.php:6e9e3666c1bc
Trunk/application/models/priority_model.php#32: 83dbdfb60981 in manifests not found
data/index.html.i#0: missing revlog!
0: empty or missing index.html
index.html#0: b8b2b36a6eea in manifests not found
data/index.php.i#0: missing revlog!
0: empty or missing index.php
index.php#0: a5f76bf232e9 in manifests not found
data/index_backup.php.i#0: missing revlog!
0: empty or missing index_backup.php
index_backup.php#0: a5f76bf232e9 in manifests not found
data/index_this_hold.html.i#0: missing revlog!
0: empty or missing index_this_hold.html
index_this_hold.html#0: b8b2b36a6eea in manifests not found
data/nbproject/project.properties.i#14: missing revlog!
14: empty or missing nbproject/project.properties
nbproject/project.properties#14: 1efa3074378b in manifests not found
data/nbproject/project.xml.i#14: missing revlog!
14: empty or missing nbproject/project.xml
nbproject/project.xml#14: 52689bf2b35a in manifests not found
data/rcrawley/.buildpath.i#9: missing revlog!
9: empty or missing rcrawley/.buildpath
rcrawley/.buildpath#9: 2c6411d4fcff in manifests not found
data/rcrawley/.project.i#9: missing revlog!
9: empty or missing rcrawley/.project
rcrawley/.project#9: cb4b1495acab in manifests not found
data/rcrawley/assets/images/ajax-loader.gif.i#9: missing revlog!
9: empty or missing rcrawley/assets/images/ajax-loader.gif
rcrawley/assets/images/ajax-loader.gif#9: 8ef26516c7da in manifests not found
data/rcrawley/index.html.i#9: missing revlog!
9: empty or missing rcrawley/index.html
rcrawley/index.html#9: 545246299dee in manifests not found
data/rcrawley/index.php.i#9: missing revlog!
9: empty or missing rcrawley/index.php
rcrawley/index.php#9: 66eac798ed6d in manifests not found
data/rcrawley/index_backup.php.i#9: missing revlog!
9: empty or missing rcrawley/index_backup.php
rcrawley/index_backup.php#9: 93971228fbf5 in manifests not found
data/rcrawley/system/index.html.i#9: missing revlog!
9: empty or missing rcrawley/system/index.html
rcrawley/system/index.html#9: 17360d3b566e in manifests not found
data/rcrawley/testera.php.i#9: missing revlog!
9: empty or missing rcrawley/testera.php
rcrawley/testera.php#9: 7d9bd5196740 in manifests not found
data/testera.php.i#0: missing revlog!
0: empty or missing testera.php
testera.php#0: 6e9e3666c1bc in manifests not found
1646 files, 59 changesets, 1897 total revisions
57 integrity errors encountered!
(first damaged changeset appears to be 0)
since the first damaged changeset is 0, this would appear to be pretty terminal. Is there anyway around this?
any help would be appreciated.
hg.ignoreerrors also let missing revlog errors to be ignored when reading the source, which may be useful to fix a repository with a damaged store. Set this option to True and convert from Mercurial to Mercurial.
https://www.mercurial-scm.org/wiki/ConvertExtension
Read this section (trying hg convert).
Your repo appears fried - and post this as a bug report to the Mercurial bug tracker & talk to mpm on the mercurial irc chatroom, he's very helpful.
Related
We have too large Mercurial repo's in which following error has occured few times during a year when trying to clone:
$ hg clone --rev develop --noupdate http://url.to.repository
adding changesets
adding manifests
adding file changes
transaction abort!
rollback completed
abort: data/.../Result.Database.nuspec.i#03b180f4076b: unknown parent!
All goes well if I don't specify a revision in clone command.
Hg verify doesn't show any error:
$ hg verify
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
3427 files, 913 changesets, 5406 total revisions
How can I fix this error?
What is causing this error? I would like to fix the root cause to prevent this happening anymore in future.
I'm trying to get Mercurial to show me all changesets in phase secret. According to the docs, I should execute the command hg log -r "secret()", but if I do that, it tells me hg: parse error at 9: invalid token. I'm running Mercurial 2.8
Is it possible to find the changesets I'm looking for?
The solution turned out to be that I copied the command from somewhere, but that somewhere used quote characters that my command line didn't recognize.
I have a local Mercurial repository that I am managing using TortoiseHg. Being new to Mercurial, I deleted some compiled files in the bin and obj folder of my project from the local file system. Now the repository is corrupt and gives me the message of missing files in the commit dialog. Verify also fails with the list of missing files.
Here is the tail of the log ...
data/ApplicationServices/bin/Common.DataServices.Oracle.xml.i#56: missing revlog!
56: empty or missing ApplicationServices/bin/Common.DataServices.Oracle.xml
ApplicationServices/bin/Common.DataServices.Oracle.xml#56: 01e844a32962 in manifests not found
data/ApplicationServices/bin/Common.DataServices.xml.i#56: missing revlog!
56: empty or missing ApplicationServices/bin/Common.DataServices.xml
ApplicationServices/bin/Common.DataServices.xml#56: baa0e6eb9bca in manifests not found
data/ApplicationServices/bin/Common.Entities.xml.i#56: missing revlog!
56: empty or missing ApplicationServices/bin/Common.Entities.xml
ApplicationServices/bin/Common.Entities.xml#56: 1e7cf00250c0 in manifests not found
data/ApplicationServices/obj/Debug/ApplicationServices.csproj.FileListAbsolute.txt.i#56: missing revlog!
56: empty or missing ApplicationServices/obj/Debug/ApplicationServices.csproj.FileListAbsolute.txt
ApplicationServices/obj/Debug/ApplicationServices.csproj.FileListAbsolute.txt#56: fd28009f3e6e in manifests not found
data/Entities/obj/Debug/Entities.csproj.FileListAbsolute.txt.i#56: missing revlog!
56: empty or missing Entities/obj/Debug/Entities.csproj.FileListAbsolute.txt
Entities/obj/Debug/Entities.csproj.FileListAbsolute.txt#56: e2ba293498ed in manifests not found
Entities/obj/Debug/Entities.csproj.FileListAbsolute.txt#60: dd903e8946a9 in manifests not found
Entities/obj/Debug/Entities.csproj.FileListAbsolute.txt#61: 7d60f0cd952f in manifests not found
data/UnitTests/obj/Debug/UnitTests.csproj.FileListAbsolute.txt.i#56: missing revlog!
56: empty or missing UnitTests/obj/Debug/UnitTests.csproj.FileListAbsolute.txt
UnitTests/obj/Debug/UnitTests.csproj.FileListAbsolute.txt#56: c0c8cbccba02 in manifests not found
3999 files, 62 changesets, 5710 total revisions
1266 integrity errors encountered!
Any chance of removing the missing files from the repository?
Thanks
I'm receiving a "missing revlog" error when using Mercurial (via TortoiseHg). Does anybody know how to fix this repo?
% hg --repository C:\Source\Project verify --verbose
repository uses revlog format 1
checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
data/MyProject.Class.Library.Tests/Part/FileName.cs.orig.i#1: missing revlog!
1: empty or missing MyProject.Class.Library.Tests/Part/FileName.cs.orig
MyProject.Class.Library.Tests/Part/FileName.cs.orig#1: fb25dd9d5f41 in manifests not found
4384 files, 1354 changesets, 12803 total revisions
3 integrity errors encountered!
(first damaged changeset appears to be 1)
[command returned code 1 Wed May 11 13:31:14 2011]
You can try to use convert extension with convert.hg.ignoreerrors set to True, as described on the wiki. Keep in mind that this will modify the hashes, and damaged files will probably be lost completely.
The Mercurial wiki has a page on Repository Corruption. If the solution suggested by #Cat Plus Plus does not work for you, then you may attempt to reconstruct the revlog.
There is a section with step-by-step instructions for reconstructing missing revlogs. However, you must have a copy o the problem file as it existed in the "bad" revision.
In your case, you would need an exact copy of data/MyProject.Class.Library.Tests/Part/FileName.cs.orig as it existed in revision 1 of the repo.
I have a strange problem with updating Mercurial. Everytime when I add a file to my repository and then update another location of the repository (for example with in CI process), the error "no match found" occures. Then when I remove to whole folder and clone it again there are no problems and the new added file(s) are there. Updating and removing doesnt give problems
When I do "a" Verify the following is shown:
data/test.txt.i#54: missing revlog!
54: empty or missing test.txt
test.txt#54: b80de5d13875 in manifests
not found 3 integrity errors
encountered! (first damaged changeset
appears to be 54)
Any idea what could be causing this?
EDIT
The complete trace:
ThoughtWorks.CruiseControl.Core.CruiseControlException:
Source control operation failed:
abort: data/test.txt.i#b80de5d13875:
no match found! . Process command: hg
update --noninteractive at
ThoughtWorks.CruiseControl.Core.Sourcecontrol.ProcessSourceControl.Execute(ProcessInfo
processInfo) at
ThoughtWorks.CruiseControl.Core.Sourcecontrol.Mercurial.Mercurial.GetSource(IIntegrationResult
result) at
ThoughtWorks.CruiseControl.Core.IntegrationRunner.Build(IIntegrationResult
result) at
ThoughtWorks.CruiseControl.Core.IntegrationRunner.Integrate(IntegrationRequest
request)
The "repository corruption" is not patent here, since you can clone again, and retrieve the all content (old and newly added).
So the different points to check are:
1/ process conflict of some kind (something preventing data/test.txt.i#b80de5d13875 to be written, even so the file content is recorded)
2/ hg revlog and hg debugindex, to check out the versions actually recorded in your repo.
3/ hg verify to rule out any repo corruption.
4/ check the integrity of your repo