[darcs-users] Broken Repo fix problem (left as an exercise to the reader)

Tommy Pettersson ptp at lysator.liu.se
Tue Sep 27 18:49:21 UTC 2005


On Mon, Sep 26, 2005 at 03:39:44PM -0500, Richard Smith wrote:
> Reciently I started letting some other users of darcs begin to push up
> to where we are trying to keep a master copy.
> 
> Now my master copy of the the repo seems to have an issue.
> 
> I get the following when I try to push a particular patch.
> 
> =========
> darcs failed:  Error applying patch to recorded!
> Running 'darcs repair' on the target repo may help.
> ./src/winp.c: openBinaryFile: does not exist (No such file or directory)
> =========
> 
> And then I have to go do a darcs repair on the repo.

If darcs actually succeeds repairing the repo and the patch
still fails the same way each time, it sounds very much like a
bug in darcs.

(Just before sending this I saw Zooko has filed bug report #525,
which seems to be the same error.)

> However, I'd like to go though the steps of recovering this repo back to
> a good state and making it current as an excercise for any future
> problems that may happen.  Sharpen my darcs tools.  As the lead
> developer and RCS manager I'm supposed to be the guru for this type of
> stuff. :)
> 
> So I'm looking for a plan of action here.

Well, (pretending there was no failure on darcs' part) I wonder,
perhaps this situation is a job for the rollback command? If
lucky, just issue 'darcs rollback' and select the offending
patch. Now you can push/pull this rollback patch to each and
every repo, where it will neutralize the offending patch; it
would ideally just be a matter of pushing it to the master repo
and wait for everyone to eventually sync from there. If some
patches depend on the offending patch, it can't be rollbacked
directly, but you can make a branch up to the offending patch
and make a rollback there. The rollback patch will then maybe,
but not necessarily, cause some conflicts with the depending
patches. It can of course conflict so badly that it's not an
option. Then it might be better to just restore what's missing
in the current version and record an "ooops, put this back"
patch.

If there are many patches depending on the offending patch it is
most likely not an option to remove it, since you'd also have to
remove and manually (e.g., with diff'n'patch) reconstruct and
record anew all its depending patches.


-- 
Tommy Pettersson <ptp at lysator.liu.se>




More information about the darcs-users mailing list