[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Monotone-devel] bug report ver 0.16, on windows

From: Nathaniel Smith
Subject: Re: [Monotone-devel] bug report ver 0.16, on windows
Date: Mon, 21 Feb 2005 15:37:44 -0800
User-agent: Mutt/1.5.6+20040907i

On Mon, Feb 21, 2005 at 11:20:04PM +0100, Jon Bright wrote:
> Hi,
> Nathaniel Smith wrote:
> >
> >The current logic on Windows is:
> > -- if HOMEDRIVE and HOMEPATH are defined, your homedir is 
> > -- otherwise, error out and whine at the user
> For my bog-standard Cygwin install, HOMEDRIVE and HOMEPATH are 
> defined... but to ...Documents and Settings....  HOME is also defined 
> within the Cygwin shell, to /home/jbright.  Under the normal Windows 
> command shell, only HOMEDRIVE and HOMEPATH are defined, HOME is absent. 
>  USERPROFILE is defined in both Cygwin and the Windows command shell, 
> but points at ...Documents and Settings... in both places.
> I'd suggest:
> 1. If OSTYPE is defined and $OSTYPE=="cygwin", and HOME is defined, use 
> $HOME.
> 1a. Maybe take USERPROFILE instead of HOMEDRIVE and HOMEPATH.  I'm 
> guessing USERPROFILE is probably an NTism, but I don't know for sure.
> 2. If HOMEDRIVE and HOMEPATH are defined, do as currently
> 3. Otherwise, whine at user.

Man, what a mess. has some
research on this.  It doesn't make it less of a mess, exactly; more
confirms that it really is a mess...

AFAICT, there is no right answer.  USERPROFILE and HOMEDRIVE/HOMEPATH
mean two different things.
seems to argue that USERPROFILE is the one we want, but, eh, the whole
system doesn't make much sense...

I've just implemented:
  1) if MONOTONE_HOME is defined, use it
  2) if HOME is defined, use it
  3) if USERPROFILE is defined, use it
  4) if HOMEDRIVE+HOMEPATH are defined, use them
  5) whine at user

Is that good enough to make people happy?

-- Nathaniel

Eternity is very long, especially towards the end.
  -- Woody Allen

reply via email to

[Prev in Thread] Current Thread [Next in Thread]