[PATCH] Re: FEATURE REQ: Add option --dry-run to 'add'
michael at ellerman.id.au
Mon Sep 19 03:20:26 BST 2005
On Mon, 19 Sep 2005 11:29, Robert Collins wrote:
> 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.
No add_reporter_null() is replaced with add_action_add(), which does the add
but doesn't print anything.
-def smart_add(file_list, recurse=True, reporter=add_reporter_null):
+def smart_add(file_list, recurse=True, action=add_action_add):
> That said, I think that a better approach here is actually to make dry
> run something like ...
Yeah, that's the sexy way to do it. I guess I chose what I saw as the path of
phone: +61 2 6212 1183 (tie line 70 21183)
We do not inherit the earth from our ancestors,
we borrow it from our children. - S.M.A.R.T Person
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20050919/d4bca04b/attachment.pgp
More information about the bazaar