BZR_HOME + HOMESHARE (was: Re: bazaar-ng 0.7 released)

Jari Aalto jari.aalto at cante.net
Wed Jan 25 19:35:51 GMT 2006


John Arbash Meinel <john at arbash-meinel.com> writes:

> Jari Aalto wrote:
>> determines the correct location like this. No automatic use of
>> HOMESHARE, but only IF user has a bazaar directory along it.
>> 
>>     if (environemnt variable is set "BZR_HOME")
>>        then use BZR_HOME
>>     else if (there is directory "$HOMESHARE/.bazaar/bazaar.conf/")
>>        then suppose user is using $HOMESHARE
>>     else if (you can find directory "$HOMEDRIVE + $HOMEPATH/.bazaar/bazaar.conf")
>>        then suppose user is using $HOMEDRIVE + $HOMEPATH
>>     else
>>        use APPDATA
>> 
>
> [the new on is]
> ~/.bazaar/bazaar.conf

Ok. I've updated the if..then..else above.

Btw, I find it confusing to use the name "bazaar" for configuration
file. "bazaar". I understand the official name "Bazaar NG", like
"Mercurical", but I there is logic that is already widely in use:

   <program binary>       <progam config files>
   cvs                    .cvsignore
   svn                    .svnignore
   hg                     .hgrc         (Mercurical)
   
I don't remember, but was was there a reson why Bzaar did not follow
the converion and use:

   bzr                   ~/.bzr/bzr.conf

I just would like to see Bzr to behave similarly to the other
utilities, as much as possible to prevent learning curves for
utilities that "do it differently". 

> I'm not sure what the correct path should be for $HOMESHARE.
> Also, we need a place to *create* the directory if it doesn't exist.

The result of directory that comes out from if..then..else case can be
used. It defaults to APPDATA when none of the above matches.

> I wouldn't be opposed to probing for config directories. 

This would solve installation of Bzr in large corporate/educational
sites where HOME disks are remotedly mounted to windows shares. It
would be very valuable.

User's settings in BZR_HOME would still override.

> But what happens if 2 exist?

You mean this:

     ...
     else if (there is directory "$HOMESHARE/.bazaar/bazaar.conf/")
        then suppose user is using $HOMESHARE

I may not have understood the question you asked, but that "probe" would
then determine that User's configuration directory is there, so use it.

Jari





More information about the bazaar mailing list