[PATCH] Re: FEATURE REQ: Add option --dry-run to 'add'

Robert Collins robertc at robertcollins.net
Mon Sep 19 02:29:25 BST 2005


On Sat, 2005-09-17 at 19:02 +1000, Michael Ellerman wrote:
> Hi guys,
> 
> Here's a patch to do --dry-run for add. It's a bit busy, as I've changed the 
> API for smart_add() and hence all it's callers have to be updated, but I 
> think this is the cleanest way to implement this. Otherwise we end up with 
> smart_add() taking 15 parameters.
> 
> It includes tests for the action callbacks, as well as a blackbox test of "bzr 
> add --dry-run ."

At first glance it seems to have introduced a regression - you appear to
have removed the ability to have an add that adds the files but doesn't
tell anyone - the null reporter.

That said, I think that a better approach here is actually to make dry
run something like:

branch.lock()
smart_add_branch(...)
branch.unlock()

and normal add:

branch.lock()
smart_add_branch(...)
branch.commit()

Rob

-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050919/27fdadf1/attachment.pgp 


More information about the bazaar mailing list