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

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

 



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 - hanwen@xxxxxxxxx - http://www.xs4all.nl/~hanwen

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux