summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-07-25 07:31:38 (GMT)
committerJunio C Hamano <gitster@pobox.com>2007-07-25 23:06:54 (GMT)
commitb2d2d16af7ff686fb96d344daaf49653fd67366a (patch)
tree6a159df285a58fb73c544eceac9c127a6450de7d /contrib
parent537601ac74db2d93665b20a67ba05851703bb2c3 (diff)
downloadgit-b2d2d16af7ff686fb96d344daaf49653fd67366a.zip
git-b2d2d16af7ff686fb96d344daaf49653fd67366a.tar.gz
git-b2d2d16af7ff686fb96d344daaf49653fd67366a.tar.bz2
git-p4: Fix p4 user cache population on Windows.
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> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/fast-import/git-p43
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: