aboutsummaryrefslogtreecommitdiff
path: root/contrib/fast-import
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-07-25 09:31:38 +0200
committerJunio C Hamano <gitster@pobox.com>2007-07-25 16:06:54 -0700
commitb2d2d16af7ff686fb96d344daaf49653fd67366a (patch)
tree6a159df285a58fb73c544eceac9c127a6450de7d /contrib/fast-import
parent537601ac74db2d93665b20a67ba05851703bb2c3 (diff)
downloadgit-b2d2d16af7ff686fb96d344daaf49653fd67366a.tar.gz
git-b2d2d16af7ff686fb96d344daaf49653fd67366a.tar.xz
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/fast-import')
-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 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: