Unknown parent error in Mercurial
Asked Answered
E

3

20

I am getting a error that is preventing me to pull, even force pull.

hg command error:
transaction abort!
rollback completed
abort: data/assets/images/skins/file/skin.jpg.i@0727c4489edc: unknown parent!

Is there anyway to remove, revert or fix just this file, its not even used, and it's preventing any pulling.

UPDATE After Running hg verify

checking changesets
checking manifests
crosschecking files in changesets and manifests
checking files
 assets/images/skins/hein/Heineken-skin.jpg@236: 0727c4489edc in manifests not found
 assets/images/skins/vw/VW_10_Revive_Website_Takeover.jpg@153: 877324921450 in manifests not found
 assets/images/skins/vw/VW_10_Revive_Website_Takeover.jpg@171: 45e8aee1c524 in manifests not found
warning: orphan revlog 'data/assets/images/skins/hein/Heineken-skin.jpg.d'
warning: orphan revlog 'data/assets/images/skins/vw/VW_10_Revive_Website_Takeover.jpg.d'
1268 files, 256 changesets, 2101 total revisions
2 warnings encountered!
3 integrity errors encountered!

(first damaged changeset appears to be 153)

Seems to be 2 images, How can I fix this?

Expectancy answered 28/4, 2010 at 21:24 Comment(7)
If you put store/00changelog.i/d store/00manifest.i/d and the two orphan .d online, I can try to fix them for you. Otherwise you might be able to create a new repository using hg convert from hg to hg with a filemap excluding this two files: mercurial.selenic.com/wiki/RepositoryCorruptionHornback
btw are those two files the only files starting with an uppercase letter?Hornback
I was able to pull a clone, do a merge and get it all up, but integrity still has a issue with one of the files, it might be because of the uppercase.Expectancy
you shouldn't use a repo with integrity errors.Hornback
True, however I am not sure what the problem with the image is exactlyExpectancy
@Expectancy the problem is that somehow you or something deleted the in-repo history of those files. So you need to remove it from the history, or try to repair it (for example by posting the file I talked about earlier online). If you want realtime help, #mercurial on freenode might be better.Hornback
@Expectancy just ping me on IRC, on #mercurial when you can.Hornback
N
12

Try running hg verify on your repository and see if that helps.

Nadabus answered 29/4, 2010 at 0:17 Comment(1)
It will not directly help, it can only help find us what's going on.Hornback
M
2

I am having the same problem but in my case hg verify returns no errors. Maybe this will help you:

You could try recloning and reindexing. This will fetch a fresh clone from the remote repository and reindex the repository

Source:

https://answers.atlassian.com/questions/59049/fisheye-cannot-pull-from-mercurial

Mariannemariano answered 17/1, 2014 at 13:56 Comment(0)
C
0

I had a very similar problem with Mercurial reporting an unknown parent but instead was subsequently throwing a ValueError in dirstate

Running hg verify appeared to complete successfully but did not fix the issue.

Reading the contents of the dirstate file, it contained strings referencing a different and unrelated project so to me it was corrupt, the resolution was to copy the backup dirstate file over the top of the corrupt dirstate, i.e., (Windows flavour command)

ren .hg\dirstate .hg\dirstate.corrupt
copy .hg\undo.backup.dirstate .hg\dirstate

This got Mercurial running again and allowed a simple repair to the previous changes.

The corrupt dirstate seems likely to have been caused by syncing software (OneDrive you know who you are)

Chemash answered 30/1, 2021 at 11:12 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.