[darcs-users] darcs convert

Max Brown max.e.brown at gmail.com
Thu Aug 13 14:07:08 UTC 2009


>> You will likely have to rewrite history, yes. Probably in a text editor, too.

I tried to rewrite the history manually.

> The right thing to do is to get a copy of the repo up to the bad patch. Then
> taking a diff of the bad patch and trying to apply it by hand. That should
> fail, and you should be able to find out why. Then you should rewrite the diff
> so that it applies, and afterwards you should (in a old-fashioned copy of the
> repo) find the same patch in _darcs/patches, do the same edit and then make a
> new hashed copy. There may be some difficulty in obtaining the old-fashioned
> copy, since get fails. I'd think that it *may* populate _darcs/patches first --
> if that's the case, you should be able to edit the patch, then darcs repair
> (which should pass now) and then get the "fixed" copy.

Here is what I did in the end, and this seems to have worked:
1) I pulled patches until I got to the patch that was failing.
2) I tried to apply the patch manually to see why it was failing (it
replaced a line, where the text to be replaced in the actual file was
different from the text that the patch wanted to replace...? I don't
know how I managed to create that confusion in the first place.)
3) I then edited the corresponding patch in _darcs/patches so that it
would not fail (gunzip, then edit, then gzip).
4) I then did a 'darcs get' to get a new copy of the fixed repository.
This now worked.
5) I did a 'darcs convert' on the new copy, which now worked.

Question: What did you mean by "make a new hashed copy"? is this step 4?

Thanks for all your help.

Max


More information about the darcs-users mailing list