BZR_HOME + HOMESHARE

John A Meinel john at arbash-meinel.com
Thu Jan 26 16:12:25 GMT 2006


Jari Aalto wrote:
> 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*"

I would tend to use ~/.bzrrc over ~/.bzr.d
In my experience, the *.d directories are filled with files that get
loaded "dynamically".
Like /etc/cron.d, /etc/httpd/conf.d/, etc.
*.d directories are used when you want people to be able to add just a
new file, rather than editing a file that is in there.

> 
> 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

I think we should always warn if there are multiple locations. We don't
really have a global verbose flag (though we have a global quiet flag).

I would also look for APPDATA/Bazaar/2.0/bazaar.conf, and I'm not sure
about the HOMESHARE and HOMEDRIVE ones.
I really would like to avoid dot files on windows, since they don't play
well with windows.
Which is part of the problem with using $HOMESHARE, because if you don't
make it a dot file, then it looks like something for users to look at.
And when they don't recognize it, they might just delete it.

So until there is a really strong reason not to use $APPDATA, (as in
someone wants it right now for their situation), I would prefer that we
stick with APPDATA.
I suppose we could get rid of $HOME, if you think that is the wrong
place to be looking.

John
=:->

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060126/a4b74dda/attachment.pgp 


More information about the bazaar mailing list