[RFC] Conditionalize format warnings

Matthew D. Fuller fullermd at over-yonder.net
Tue Apr 17 04:42:50 BST 2007


On Mon, Apr 16, 2007 at 10:59:11PM -0400 I heard the voice of
Aaron Bentley, and lo! it spake thus:
> 
> Well, you can still use locations.conf to configure it.  That's
> where we tend to stuff config information for repositories.

Oh, yes.  It just seems a little asymmetrical that we have a local
config in the branch for the branch, but none in the WT for the WT.


> It is typical to invoke branch.get_config(), which allows the branch
> to further customize the class if desired.

Whoops, didn't notice that.  Changed.


> > +            else:
> > +                fwarn = config.GlobalConfig().get_format_warning()
> 
> I don't think it's worth considering the case where there's a
> working tree but no branch.  Such a construct is useless to Bazaar,
> and is exceedingly rare.

Well, only one of the _check_supported() calls in the tree even passes
in the basedir, so we need to do something where one isn't passed.

And while WT's are the only case that currently has a
recommend_upgrade=True, presumably some day branches or repos will too
(of course, they may start passing in the location then too, but...)


> Also, we'll need some test cases before this request can be
> accepted.

Well, that's why I'm RFC'ing, not MERGE'ing   :).  I want to make sure
the implementation is (a) sound, and (b) what's desired.

I noticed another issue after I sent the last mail, which is that the
error for invalid values wouldn't work right from the BranchConfig
side.  Updated diff attached.  If this meets with general approval,
I'll add test-writing to my todo for it, but that may take me a while
to do as well as a while to get to (Real Work(tm) must get done,
alas), so anybody who already understands the test suite as has some
time to kill is quite welcome to beat me to it   ;)


-- 
Matthew Fuller     (MF4839)   |  fullermd at over-yonder.net
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fmt.diff
Type: text/x-diff
Size: 3590 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070416/c26977ba/attachment-0001.bin 


More information about the bazaar mailing list