From: Han-Wen Nienhuys <hanwen@xs4all.nl>
To: git@vger.kernel.org
Subject: Re: [PATCH] git-p4: chdir now properly sets PWD environment variable in msysGit
Date: Mon, 04 Aug 2008 00:06:07 -0300 [thread overview]
Message-ID: <g75ror$uav$1@ger.gmane.org> (raw)
In-Reply-To: <bad7471c0808011250v569ffaaby9e20a5ba1f971927@mail.gmail.com>
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@xs4all.nl - http://www.xs4all.nl/~hanwen
next prev parent reply other threads:[~2008-08-04 3:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-01 19:50 [PATCH] git-p4: chdir now properly sets PWD environment variable in msysGit Robert Blum
2008-08-03 21:13 ` Junio C Hamano
[not found] ` <bad7471c0808040601y10cceb44idcde5a4a8f415769@mail.gmail.com>
2008-08-04 13:04 ` Fwd: " Robert Blum
2008-08-16 5:44 ` Junio C Hamano
2008-08-16 5:56 ` Junio C Hamano
2008-08-05 8:24 ` Simon Hausmann
2008-08-04 3:06 ` Han-Wen Nienhuys [this message]
2008-08-05 22:23 ` Alex Riesen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='g75ror$uav$1@ger.gmane.org' \
--to=hanwen@xs4all.nl \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.