[darcs-devel] [issue434] Darcs grief: Issue 274

Simon Peyton-Jones bugs at darcs.net
Mon Apr 16 06:34:51 PDT 2007


New submission from Simon Peyton-Jones <simonpj at microsoft.com>:

David

This message is about Issue 274, which I raised 6 months ago.

Perhaps it wasn't clear enough from my initial report, but

        this is a repository corruption error

>From my point of view it's very, very serious: I cannot rely on Darcs not to arbitrarily corrupt my working tree, which embodies many, many hours of work.  This is, I think, the third time it has happened, and I am now going to have to spend an unhappy few hours unravelling which are my changes and which are changes from unrelated patches.  (Details below.)

For a source-code control system I believe that fixing repo-corruption errors should be (and I believe is) the highest priority.  But nothing has happened, so far as I know.  I suspect that's because I wasn't clear enough before that it's a serious problem.  Hence this message.

I know that you and the other Darcs developers have a zillion other things to do; and I know from my experience with GHC that you cannot satisfy everyone.   But I do think this one is worth some serious attention.  Please!

Details below

Thanks

Simon

=========================

Here are the details

It's pretty simple.

* I have a Darcs tree.

* I have made quite significant changes, but I have not yet recorded them.

* I do a darcs pull -av (via a shell script called darcs-all), and I get

darcs failed:  user error (Error applying patch to working dir:
./darcs-all-0: renameFile: permission denied (Permission denied))
This may have left your working directory an inconsistent
but recoverable state. If you had no un-recorded changes
by using 'darcs revert' you should be able to make your
working directory consistent again.

* Now "darcs pull -av" says there are no patches to pull

* But "darcs what -s" shows zillions of changes that I have not made.  They presumably came from patches that got put in my repository, but not applied to my working directory.

The result is that my own changes (representing many hours of investment) are now in my working directory inextricably tangled up with all the changes that other people have made.

I can't do 'darcs revert' because that would lose all my changes.

I avoided doing an earlier 'darcs record' because that leads to conflicts, and conflicts cause Darcs to crash, so we go to great lengths to avoid them.

[Simon M tells me that I should do the following
        * Record my changes
        * Pull stuff from the repo
        * If there are conflicts, then unrecord my changes and
                do some other fixing up to avoid having a conflict
                in the HEAD

I didn't do that.  But still the repo should not be corrupted.]

================

My guess as to the problem. I *think* this might have happened because the 'pull' modifies the 'darcs-all' script, which is in the midst of being executed.  On Windows a shell-script file is locked during execution, so the 'pull' can't modify it.  That crashes the pull.

But rather than fixing this (which may be Windows-specific) I submit that there should be some end-to-end guarantee that my repo will not be corrupted, regardless of what happens in the middle.

----------
messages: 1588
nosy: EricKow, beschmi, droundy, igloo, simonmar, simonpj, tommy
status: unread
title: Darcs grief: Issue 274

____________________________________
Darcs issue tracker <bugs at darcs.net>
<http://bugs.darcs.net/issue434>
____________________________________


More information about the darcs-devel mailing list