[darcs-users] When darcs fails...

Tommy Pettersson ptp at lysator.liu.se
Wed Jan 5 19:09:32 UTC 2005


On Wed, Jan 05, 2005 at 04:57:52PM +0100, tnorth at bluewin.ch wrote:
> When launching darcs record after changes without having writing rights on
> the folder, I got an evident error from 'inventory'. Ok.

What folder is without writing rights?  If I remove writing
rights from the repo root folder I get:

  Fail: Failed to create temporary file darcs: permission denied

If I remove writing rights from the _darcs folder I get:

  Fail: takeLock /home/tommy/tmp/foo/_darcs/lock: permission denied

In neither case does darcs make anything change at all.

When I removed writing rights from the _darcs/inventory file
darcs managed to update _darcs/current and put a new patch
in _darcs/patches before it halted with:

  Fail: ./_darcs/inventory: openBinaryFile: permission denied

and that made 'darcs whatsnew' show "No changes", but 'darcs
changes' did not show any trace of a recorded patch.

> But after corrections of rights with chmod, darcs record only says : No changes
> !

For me 'darcs record' says no such thing, but let me record
an empty patch.

> Which means that last patches are lost ?

In my case (with unwritable _darcs/inventory) the patch
was (almost) recorded; there is a XXXXXXXX.gz file in
_darcs/patches with the recording, and _darcs/current has
been updated (this is why 'darcs whatsnew' says "No changes").
But the inventory doesn't know about the patch.  The inventory
is the "real" repo content (this is why 'darcs changes' doesn't
show the patch); _darcs/current is just a cache to speed up
'darcs whatsnew' (and other things), and in this case they
do not agree.  'darcs check' will therefore complain that the
repo is inconsistent, and :-) 'darcs repair' will reconstruct
_darcs/current without the half-way recorded changes, so
'darcs whatsnew' will show them again and 'darcs record'
can record them again -- all the way this time.

I can't tell if your case is the same, but you can 'darcs get'
a copy of the repo and try 'darcs repair' in that.


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




More information about the darcs-users mailing list