monotone-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] Directory already exists?


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Directory already exists?
Date: Sun, 16 Dec 2007 17:01:21 -0600

On Thu, 2007-12-13 at 15:54 -0800, J Decker wrote:
> Just a question... has anything been fixed in regard to directories existing?
> 
> It's yet again time to update some other boxes to current versions of
> software.... I have dropped several directories....
> 
> I started an update.. and got a new project directory added (box2d)..
> but then it collided with some other project for which it issues
> 'warning: cannot create direcotyr, already exists' *BOMB*
> 
> okay fine... delete that directory... try an update
[...]

Yeah... what we *should* do is check for blocked adds or renames (or
missing files) before doing anything, so we don't leave stuff all mixed
up in pre-detectable cases (locked files or races with other programs
would still cause issues).

This would actually be fairly similar to the code needed to, say, make
updates undoable/restartable (generate a complete list of adds / drops /
renames to do, in order, and work from that). Not sure how involved that
would be, I haven't looked at that part of the code in a while...

(Hmm, do we know of a good cross-platform library to provide
atomic/durable filesystem transactions?)

> if a file doesn't exist, and it's going to be deleted anyway... why complain?

Because our error handling tends to be "when in doubt, abort".

> if a directory already exists, so what?  presume it was already added
> by a incomplete update and continue....

We currently think of directories as objects, so stomping on an existing
directory is just as bad as stomping on an existing file.

-- 
Timothy

Free (experimental) public monotone hosting: http://mtn-host.prjek.net





reply via email to

[Prev in Thread] Current Thread [Next in Thread]