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: Mon, 26 Feb 2007 11:51:04 +0100
User-agent: Icedove 1.5.0.9 (X11/20061220)

Hi,

William Uther wrote:
  I've just finished a patch to make --execute the default.

Cool.

Actually, it entirely removes the --execute option, and adds a new option --bookkeep-only which is approximately the inverse of -e. This also adds some checks to the drop implementation so that if you try to drop a changed file (or a dir that isn't empty when it gets to it) then it noisily falls back to --bookkeep-only. This patch also changes rename so that it warns when you're moving something and the source is missing but the destination exists - it used to just silently fall back to --bookkeep-only in that case.

Uhm... I recall talking about that on the summit. I didn't exactly follow the complete recent thread...

Did you consider all corner cases? Does monotone now act consistently for all commands? I.e.:

mtn drop ${STH}:
 - file ${STH} exists
 - dir ${STH} exists and is empty
 - dir ${STH} exists and is not empty
 - dir ${STH} does not exist

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?)

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

Please elaborate on those corner cases.

Do we want to call that argument '--bookkeep-only'? That seems ugly to me. And I don't recall naming what monotone does 'bookkeeping', anywhere else.

I've also fixed all the tests to make this work. ugh. They all pass now (except for ws_ops_with_wrong_node_type which didn't pass before and probably shouldn't be passing. I think changing monotone so it passed would be a mistake - the broken part of the test should be removed). In most cases I did the simple fix of just removing "-e" or adding "--bookkeep-only", even when there was a move with "--bookkeep-only" followed immediately by a rename. I wanted to be conservative with the test suite.

That sounds good.

The test restrictions_with_renames_and_adds was also failing before this patch. I fixed it so it passes.

I tried sending the patch to the list, but it was too large (the meat of the patch is fairly small, but there were a lot of tests to fix up). I've put it on the web (with my other monotone patches) here:

Why don't you simply get a monotone key? Send the public key to Nathaniel, he will happily give you push access to venge.net...

Regards

Markus





reply via email to

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