Subject: Re: [PATCH] git-p4: chdir now properly sets PWD environment variable in msysGit

From: Han-Wen Nienhuys <[email-masked]>
Date: Mon, 04 Aug 2008 00:06:07 -0300

Robert Blum escreveu:
> P4 on Windows expects the PWD environment variable to be set to the
> current working dir, but os.chdir in python doesn't do that by default

> +if os.name == 'nt':
> +    def os_chdir(dir):
> +        os.environ['PWD']=dir
> +        os.chdir(dir)
> +else:
> +    os_chdir = os.chdir
> +

Stylistic:

I think the naming is a bit ugly (os_); I would write

  def chdir(d):
     if os.name == 'nt': .. 
     os.chdir(dir)

for the rest: looks good to me.
	
-- 
 Han-Wen Nienhuys - [email-masked] - http://www.xs4all.nl/~hanwen