Extensible initialisation

Ian Clatworthy ian.clatworthy at canonical.com
Tue Jan 12 09:17:05 GMT 2010


Ian Clatworthy wrote:
> Michael Gliwinski wrote:

>> One question that pops up in my mind when thinking about it is, would it be 
>> useful to abstract the workspace organization model, so that it could be 
>> re-used, possibly configurable, etc.?
> 
> That's precisely the direction I'm going. The Initialize dialog in
> Explorer will be based on a registry of workspace models. The available
> models will be sorted alphabetically, e.g. radio buttons of
> 
> [*] Branch in trunk
> [ ] Plain branch
> [ ] Shared repository
> [ ] Shared repository no trees
> [ ] Shared tree
> 
> Plugins (like scmproj) will be able to add their own models so the list
> could easily grow to include:
> 
> [ ] Co-located branch
> [ ] Loom
> [ ] Pipeline
> [ ] SCM project
> 
> The Initialize dialog will simply map to an init-workspace command with
> 'new' as an alias. Command line users will then be able to do stuff like:
> 
>   bzr new --shared-tree
>   bzr new --scm-project

This turned out to be far easier than I expected. Rev 353 of Explorer
now has this functionality. Please test!

If you're a plugin author, you're welcome to try registering your own
workspace model builder. See the code in
http://bazaar.launchpad.net/~bzr-explorer-dev/bzr-explorer/trunk/annotate/head%3A/lib/workspace_models.py
for examples of how to do this. I'd be particularly curious to know
whether this is of benefit to the scmproj and colo plugins.

Ian C.



More information about the bazaar mailing list