BZR_HOME + HOMESHARE

Jari Aalto jari.aalto at cante.net
Wed Jan 25 21:55:27 GMT 2006


John A Meinel <john at arbash-meinel.com> writes:
>>>>     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
>
>> I don't remember, but was was there a reson why Bzaar did not follow
>> the converion and use:
>> 
>>    bzr                   ~/.bzr/bzr.conf
>
> The #1 reason not to use ~/.bzr is for people who want to version
> control their home directories. Would would have the path conflict. (And
> you couldn't version control your bzr settings)

Silly me. I knew that, I just forgot where bazaar puts the revisions.
Hm, stay with me a while. Linux uses convention *.d/ for configuration
directories. Take for example:

   /etc/rc.d
   ...
   /etc/xinetd.d 

This translates to programs as well. Iknow one that have moved to use
it:

   ~/.emacs.d/

As I happen to like standards that already exists, I would like

   ~/.bzr.d/

to be in par with the situation where ~/.bzr is already reserved.
It would also nicely fit into the:

   find . -name ".bzr*"

and not needing to search for different names. The common name "bzr"
will also work in Windows => Search

I'm sorry I didn't notice the discussion when it took place - or I may
have been occupied elsewhere. Is there any chance to change this, when
we're not at 1.0 yet :-)

>>      ...
>>      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
>> 
>
> It is possible to have both $HOMESHARE/.bazaar/bazaar.conf, as well as
> $APPDATA/bazaar/2.0/bazaar.conf and $HOME/.bazaar/bazaar.conf
>
> If we are going to support lots of locations, we should at least alert
> the user if we find more than one. Rather than having behavior change
> wildly without explanation.

Good idea. Then it might be (pseudo code):

       for i in "BZR_HOME"
                "$HOMESHARE/.bazaar/bazaar.conf/"
                "$HOMEDRIVE + $HOMEPATH/.bazaar/bazaar.conf"
                APPDATA/.bazaar/bazaar.conf 
       do
          if (!base   &&  found )
             base = found               # use it
          fi

          # ... Collect information if any of the above exists
       done

       if (--verbose flag is on)
          notify user about other locations that exists.
       fi

How's that sound?

Jari





More information about the bazaar mailing list