i've just run into that 'sh darcs-all' updating darcs-all issue again!-(

while i'm trying to reconstruct my repo once again, i was wondering whether we might do something to avoid this trouble with darcs-all updating itself, which is somewhat dubious anyway, and will fail on systems like windows:

   http://www.haskell.org/pipermail/cvs-ghc/2006-October/031988.html

the failure, in turn, can have nasty consequences for darcs, which does not (yet) support a transactional view of its updates:

   http://bugs.darcs.net/msg1588

since relying on the os to make a safe copy of the script is not
portable, we could make the copy ourselves, so that the copy
updated by darcs-all is not the copy running darcs-all. as before,
one might need to run darcs-all twice, to get whatever the updater
intended, but one might avoid the windows/darcs issues.

attached is a draft idea.

i'm not entirely sure why there is a problem. cygwin shell scripts
can update themselves with sed, for instance, so i don't know who
is doing the file locking that causes darcs to fall over? here is the
error message from my current accident:

   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.

note the '-0' in './darcs-all-0'. i was running this command:

   sh darcs-all pull -av 2>&1 | tee darcs-all.log

claus

Attachment: darcs-all
Description: Binary data

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to