1

When trying a

hg commit

or

hg status

I'm getting the error

abort: invalid subrepository revision specifier in .hgsubstate line 3

This is probably why:

f322ee070c467d1e517564d679f150693739d186 buildtools
2e68a7e2306704c8dc98802c73897c6c43bf96bc dzlivetemplates
 libs/dxgettext
 libs/dzlib
 libs/jcl
 libs/jvcl
 libs/tregexpr

The first two lines look OK, but starting from the 3rd line there is no GUID for the subrepository revision.

I have no idea how this happened (but I probably caused it myself).

How do I recover from this? Can I just delete the .hgsubstate file and have hg recrate it from the current state of the subrepositories? If yes, how?

dummzeuch
  • 10,975
  • 4
  • 51
  • 158

1 Answers1

3

OK, deleting the file (actually I renamed it to be able to restore it) seems to solve the issue.

hg update
hg commit

restored it.

Now I'm back with the original problem: Getting rid of the unintentionally created second head. But that's a different story.

dummzeuch
  • 10,975
  • 4
  • 51
  • 158
  • 1
    Check out http://stackoverflow.com/questions/7475634/mercurial-any-way-to-merge-and-discard-changes for merging the 2 heads while discarding the bad one. – Vince Apr 13 '14 at 19:44
  • Thanks @Vince, that might have been helpful, but I have resolved the issue with brute force: I deleted the hg repository and crated a new one. This of course lost my change log but that wasn't a big issue in this case. – dummzeuch Apr 14 '14 at 14:28