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:
parent
537601ac74
commit
b2d2d16af7
@ -901,7 +901,8 @@ class P4Sync(Command):
|
|||||||
% (labelDetails["label"], change))
|
% (labelDetails["label"], change))
|
||||||
|
|
||||||
def getUserCacheFilename(self):
|
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):
|
def getUserMapFromPerforceServer(self):
|
||||||
if self.userMapFromPerforceServer:
|
if self.userMapFromPerforceServer:
|
||||||
|
Loading…
Reference in New Issue
Block a user