summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Simon Hausmann <simon@lst.de>2007-07-25 09:31:38 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-07-25 16:06:54 -0700
commitb2d2d16af7ff686fb96d344daaf49653fd67366a (patch)
tree6a159df285a58fb73c544eceac9c127a6450de7d
parentgit-submodule module_name: avoid using unwieldy "value_regexp" feature. (diff)
downloadtgif-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>
-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 e3404ca853..1f5a56ee7f 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: