* [PATCH] git-p4: Fix p4 user cache population on Windows.
@ 2007-07-25 7:31 Simon Hausmann
2007-07-25 23:07 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Simon Hausmann @ 2007-07-25 7:31 UTC (permalink / raw)
To: Junio C Hamano; +Cc: Git Mailing List
Fall back to USERPROFILE if HOME isn't set.
Signed-off-by: Simon Hausmann <shausman@trolltech.com>
Signed-off-by: Marius Storm-Olsen <marius@trolltech.com>
---
contrib/fast-import/git-p4 | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index e3404ca..1f5a56e 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -901,7 +901,8 @@ class P4Sync(Command):
% (labelDetails["label"], change))
def getUserCacheFilename(self):
- return os.environ["HOME"] + "/.gitp4-usercache.txt"
+ home = os.environ.get("HOME", os.environ.get("USERPROFILE"))
+ return home + "/.gitp4-usercache.txt"
def getUserMapFromPerforceServer(self):
if self.userMapFromPerforceServer:
--
1.5.3.rc0.63.gc956
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] git-p4: Fix p4 user cache population on Windows.
2007-07-25 7:31 [PATCH] git-p4: Fix p4 user cache population on Windows Simon Hausmann
@ 2007-07-25 23:07 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2007-07-25 23:07 UTC (permalink / raw)
To: Simon Hausmann; +Cc: Git Mailing List
Thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2007-07-25 23:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-25 7:31 [PATCH] git-p4: Fix p4 user cache population on Windows Simon Hausmann
2007-07-25 23:07 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).