[MERGE] fix add in view-aware trees

Robert Collins robert.collins at canonical.com
Wed Mar 18 22:36:43 GMT 2009


On Thu, 2009-03-19 at 08:01 +1000, Ian Clatworthy wrote:
> Robert Collins wrote:
> > On Thu, 2009-03-19 at 06:18 +1000, Ian Clatworthy wrote:
> >> By design, most of the view handling is done
> >> in the UI level (builtins.py) so this test multiplication is required
> >> at that level and not just at the API level.
> > 
> > Is it possible to move the view handling out of the UI? bzr-gtk, qbzr
> > etc will all have to duplicate it as it stands. blackbox tests test the
> > entire stack so I'm rather uncomfortable with needing to multiply them,
> > and that makes me uncomfortable about the design making it necessary for
> > us to do that.
> 
> Not in the short term. I like the idea of the UI layer being a thin veneer
> over API calls but that simply isn't the case for most commands, and
> therefore testing 99% of the app just at API level isn't currently realistic.

I think we currently have that. Most UI commands are concerned purely
with user input translation - something that GUI's reasonably need to do
differently, and things like merge etc are also already factored into
API and UI.

> The entry points for view handling are thin: builtins.tree_files() and
> builtins.tree_files_for_add(). Perhaps we need to move those out of
> builtins.py into their own module and have explicit tests for them.
> Even then, I don't think we should underestimate the value of
> end-to-end black-box testing.

Oh, I don't. If tree_files_for_add() is doing a scan of disk, it means
that 'add' in a view capable tree will be roughly twice as long as add
in a non-smart capable tree. View support should be integrated deep into
smart_add, as that is the workhorse for 'bzr add'.

Let me ask again - what will it take to push the stuff that was broken
down into the tree object so that add wouldn't have broken at all - so
the bug isn't a UI bug.

As it stands, it sounds like *every* UI will break with views, and thats
quite undesirable. How can I help us avoid that problem?

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20090319/b66dd915/attachment.pgp 


More information about the bazaar mailing list