tbzr code for discussion.

Ian Clatworthy ian.clatworthy at internode.on.net
Thu Jun 12 02:39:16 BST 2008


Mark Hammond wrote:

>> We have ConfigObj for ini-style configuration. You would want per-user
>> configuration, and since this is really win32-only, I don't really see
>> why you wouldn't use the Registry.
> 
> I'm really in 2 minds here.  The registry is obviously the "windows way", but the registry doesn't seem to offer us much more than a config file in a well chosen location (so it will "roam" with the user as they login to different machines on the network).  A config file can be edited in a text file - although is much harder to update programatically if you want to keep user's comments etc in place.  On the other hand, if you are using the registry, the entire concept of comments next to preferences is moot.  We could ask users to send us their preferences file if we suspect something related to user prefs.  The registry offers transactions, fine-grained security, remote access, and much other goodness, but I don't see us taking advantage of any of that.
> 
> If we expect that a tbzr user will ever need to use a text editor to change bazaar.conf, I see advantages in tbzr using the same library and file structure.  If in the distant future we get a GUI editor for the options in bazaar.conf, then we should also get an editor for a tbzr.conf file almost for free.  But a quick glance at config.py indicates it might not be that suitable for reuse.
> 
> As a final random point, although we are targetting win32 only, I am trying to keep it as platform agnostic as possible.  I see real benefit to non-windows users being able to run some of the core tests - if for no better reason that it becomes more practical to enlist non-windows using bzr wizards for help ;)  User-prefs will necessarily need to be involved in the tests.
> 
> So I'm personally leaning towards a file based structure, but more discussion is certainly invited.

I'd like to encourage your approach - target win32 but keep things
as platform agnostic as possible. I'm sure there will be potential
down the track to reuse large parts of tbzr's architecture and code
elsewhere - there are new File Explorers appearing on new platforms
(e.g. Dolphin on KDE4) regularly.

If you do decide to use the registry, please wrap access to it
via an interface that will ease porting to other platforms.

Ian C.



More information about the bazaar mailing list