Fixing reporsitory Mercurial + hgsubversion after interrupted commit

170 views Asked by At

I was pushing 3 changesets with TortoisHg to an SVN repository using hgsubversion extension. Because of network interruptions the process hanged for a long time and I closed the TortoiseHg (it asked to interrupt operation, I said yes).

Now the repository seems to be broken somehow. These three changesets seem to be not pushed (phase = draft, no revision number in "converted from" column), but I cannot push them. It says something like "parent SVN revision is not a head revision". I tried all sorts of rebase, and exporting the changes to patch and back, but it didn't help.

Then I found, if I look into SVN repository, 2 of these changesets are actually there. It's just my mercurial repo is not aware of it. Pull doesn't help. So I used MQ->Strip command on all three to remove them, and then I tried to pull to get them from SVN. But mercurial doesn't pull anything, it says no changes detected. So my SVN repository has two more changesets, then mercurial repo.

How can I fix the repository, so it works again?

I have a copy of the whole thing before I made "strip" if it helps, as well as all three changesets exported to *.patch files.

Obviously I don't want to get everything from SVN from scratch, because these are thousands of revisions, and there are some branches which I need but which never went to SVN.

1

There are 1 answers

0
Arek On BEST ANSWER

OK, found the answer. You have to go to terminal and do hg svn rebuildmeta. Then it sees new revisions and is able to pull them.