From: Simon Hausmann Date: Wed, 25 Jul 2007 07:31:38 +0000 (+0200) Subject: git-p4: Fix p4 user cache population on Windows. X-Git-Tag: v1.5.3-rc4~64 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=b2d2d16af7ff686fb96d344daaf49653fd67366a;p=git.git git-p4: Fix p4 user cache population on Windows. Fall back to USERPROFILE if HOME isn't set. Signed-off-by: Simon Hausmann Signed-off-by: Marius Storm-Olsen Signed-off-by: Junio C Hamano --- diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index e3404ca85..1f5a56ee7 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: