monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] monotone update overwrites local changes


From: Derek Scherger
Subject: Re: [Monotone-devel] monotone update overwrites local changes
Date: Sat, 14 May 2005 22:21:32 -0600
User-agent: Mozilla Thunderbird 1.0.2 (X11/20050403)

Nathaniel Smith wrote:
> On Wed, May 11, 2005 at 08:47:56PM -0600, Derek Scherger wrote:
>>How about just skip the file and keep going, perhaps with a warning like
>>"preserving existing file ...".
> 
> This violates "refuse the temptation to guess".
> 
> I suggest, check for such files; if they exist, tell the user what's
> up and refuse to go on.  Then the user can investigate and take

at which point half of my tree has been updated. I now have an old value
in MT/revision, no idea what changes have been applied and no record of
what revision those changes came from.

even better, a bunch of my files are probably now in MT/tmp, named with
their tids rather than their former/real names, so it seems like it's
going to be rather hard to reconstruct things.

(note that this is all speculation on my part at the moment, but it does
seem like this is indeed what might happen. I'll have a look at the
stomp test and see about adding something for this case if it's not
already there)

> whatever action they decide is appropriate.  It's easy enough to move
> them aside or whatever, if that's what the user wants to do, and it's
> not going to shoot anyone in the foot...

I think it just did.

so, apply_rearrangement_to_filesystem should probably check to make sure
it's likely to succeed and not fail on something silly. looking at it
though, kind of gives me the heebies. I wonder if there's a less drastic
way of rearranging things that might fail a little more gracefully.

I'm not sure I agree with the "refuse the temptation to guess" assesment
either. if I've set a hook to say, don't update pre-existing files but
don't quit either, then there's no guessing involved.

it seems to me that there are three settings for such a hook

- fail on pre-existing files
  (cvs, svn, etc. do this)

- preserve pre-existing files but continue
  (which I think would be useful occasionally)

- clobber pre-existing files
  (what monotone does now)

fail and clobber seem like the extremes and preserve seems like it might
actually be a nice compromise.

Cheers,
Derek




reply via email to

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