bazaar-ng 0.7 released
Jari Aalto
jari.aalto at cante.net
Mon Jan 23 20:55:12 GMT 2006
John Arbash Meinel <john at arbash-meinel.com> writes:
> Jari Aalto wrote:
>
>> Martin Pool <mbp at sourcefrog.net> writes:
>>
>> I assume that under Cygwin it searches as expected: BZR_HOME, HOME, APPDATA.
>> and not in order: BZR_HOME, APPDATA, HOME.
>
> I don't know that it should search APPDATA for cygwin. It doesn't right
> now. The current check is
> BZR_HOME
> if sys.platform == 'win32':
> APPDATA
> HOME
> else:
> os.path.expanduser('~')
HOME is not automatic variable under Cygwin.
It would be good if bzr complained under Cygwin if HOME is not set.
It's almost mandatory for whole Cygwin functionality.
> I'm not sure that HOME should trump that. In fact, I know that *I* don't
> want it to. Because when I'm in a cygwin shell, I have $HOME set to
> cygwin home, but I might be running the Windows native version of bzr.
> Which means that paths would be incorrect. Since C:/cygwin/home/jameinel
> has stuff like /cygdrive/c/dev/bzr/bzr.dev, while $APPDATA would have
> stuff like C:/dev/bzr/bzr.dev
>
> I'm willing to make changes if the general belief is that HOME trumps
> APPDATA. I wrote it, and I have a use case that says APPDATA should
> trump. I can always play with aliases to get BZR_HOME to point to the
> right place when I invoke bzr. (The native windows version is ~50%
> faster than the cygwin version for filesystem operations, so I want to
> use it as much as possible).
Hm. Good points. What about:
1) native Win32 bzr
=> Use BZR_HOME, APPDATA
2) Cygwin bzr
=> Use BZR_HOME, HOME
Would that work in general? Win32 native bzr would skips that HOME
test, whereas Cygwin bzr would use HOME.
> I know I've seen domains which mount a network share to something like
> 'H:' and then set $HOME to point to that share.
Yes. In large organisation the (e.g. H:) home disk points to
somewhere else. I'm not that familiar with Windows logon scripts, but
bzr should also check these environment variables before APPDATA:
http://www.windowsitlibrary.com/Content/435/06/6.html
HOMEPATH, HOMEDRIVE, HOMESHARE: These three environment variables are
set based on the value of the home directory. The user's home
directory is specified in User Manager (in the Profile section). If
the home directory uses universal naming conventions (UNC), then they
will have the following values: HOMESHARE=\\<server name>\<share
name>, HOMEPATH=\<path>, and HOMEDRIVE=<drive letter>:
Which would suggest case (1) becoming:
=> $BZR_HOME, $HOMESHARE, $HOMEDRIVE + $HOMEPATH, APPDATA
Jari
More information about the bazaar
mailing list