← Back to team overview

bzr-windows team mailing list archive

Re: Progress and help configuring bzr-email-notifier for Windows

 

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Nicholas Allen wrote:
> Hi John,
> 
> Thanks for the suggestion but a few things are not clear to me due to
> the lack of type information in the code. Must the config object passed
> in be a bzrlib.config.Config object? I don't want to read or write any
> settings in a branch's config files as they may be read only to the
> email notifier. Also I want one config file that can be used for all
> branches so that if a new branch is created under the directory being
> monitored no new config settings need to be set for it.
> 
> If I'm not mistaken then the bzlib.smtp_connection needs a branch config
> file and can't work with my master config file (that has nothing to do
> with a branch). Is that correct? If so then I would like to just copy
> the fix into the existing code.
> 
> Thanks,
> 
> Nick
> 

I'm guessing the config is used because you can specify a custom smtp
username for every branch. But that doesn't mean you *have* to.

I would guess that a LocationConfig would be sufficient, or just a
GlobalConfig.

If you look at the code, the only things we use it for are:

self._config_smtp_server = config.get_user_option('smtp_server')
self._smtp_username = config.get_user_option('smtp_username')
self._smtp_password = config.get_user_option('smtp_password')

I know for my case, those are all set in the global location, and then
picked up for every branch. But some people may have private versus
public branches, and want to use different email servers for each.

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkrmFn0ACgkQJdeBCYSNAAPUkQCfRK2ehXd1cwrZ9Iiij7PGNxHv
qBoAoL3Ml+W/eKqNsxB7tpAHC/GJqJvT
=Foz/
-----END PGP SIGNATURE-----



References