1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-05-22 05:06:09 +02:00

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>
This commit is contained in:
Simon Hausmann 2007-07-25 09:31:38 +02:00 committed by Junio C Hamano
parent 537601ac74
commit b2d2d16af7

View File

@ -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: