monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] [PATCH] Make --execute default


From: Markus Schiltknecht
Subject: Re: [Monotone-devel] [PATCH] Make --execute default
Date: Tue, 27 Feb 2007 07:34:17 +0100
User-agent: Icedove 1.5.0.9 (X11/20061220)

Hi,

William Uther wrote:
mtn drop ${STH}:
 - file ${STH} exists

File exists and is under version control and is unchanged:
deleted with message about dropping from manifest (as currently - maybe should change?)

No, that's fine, IMO.

File exists and is under version control and is changed:
  dropped but not deleted - warning given

Okay.

File exists and is not under version control:
  not deleted - warning given

File doesn't exist and but is under version control:
  dropped from manifest with message

File doesn't exist and is not under version control:
  Warning given

Perfect.

 - dir ${STH} exists and is empty

exists and is empty and under version control.
deleted with message about dropping from manifest (as currently - maybe should change?)

I don't think this should be changed. With mtn revert one can easily revert the change.

exists and is empty and NOT under version control
  not deleted - warning given

 - dir ${STH} exists and is not empty

dir exists and has a child that is under version control (and -R not given)
  Not removed or dropped and a warning given.

dir exists and has a child that is not under version control (and -R not given)
  dir is dropped but not removed and a warning given.

Wow! Again, perfect!

dir exists, and is not empty, but is tracked and only has tracked, unchanged, files in it and --recursive is given
  deleted and message about each object being dropped from manifest

Yup!

dir exists, and has tracked, changed files in it and --recursive is given
  changed file is dropped but not deleted with warning
  dir is dropped but not deleted with warning

Good.

dir exists, but has untracked children and -R is given
  dir dropped but not deleted and warning given

 - dir ${STH} does not exist

same as missing file above (how do you tell between a missing file and a missing dir?)

Uhm.. right, you cannot tell them apart ;-)

mtn add (--bookkeep-only)?  ${STH}:
 - file ${STH} exists
 - dir ${STH} exists
- no 'something' exists - here, monotone currently bails out correctly. But do we want to support 'add --bookkeep-only'? How do we know if ${STH} is going to be a directory or a file? (Probably we don't want to support that?)

I didn't think that made any sense, so I didn't add that option there.

After thinking about that, I probably agree. Again, it's the issue of how to tell if ${STH} is a file or a dir which monotone should add.

The only slightly intelligent variant we could do is add a file if ${STH} contains one or more dots, add a dir if not. And warn the user.... but it's really not an issue.

mtn rename S{SOURCE} ${TARGET}:
- uff... any combination of ${SOURCE} exists or not and ${TARGET} exists or not.

I didn't really touch the rename code. It seemed to handle all these cases already. I did turn one silent log message into a non-silent warning. The thing about rename is that it never actually removes anything so your data is safe... hence my less stringent testing.

Even with former --execute? Okay, good. Just wanted to make sure.

I'm more than happy to have a better name. I didn't want "--no-execute" because, as Nathaniel pointed out, that is confusing. While clunky, I think this name is clear.

In the meantime, I can agree to that, too.

Cool, good work!

Regards

Markus




reply via email to

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