Browse Source

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>
maint
Simon Hausmann 18 years ago committed by Junio C Hamano
parent
commit
b2d2d16af7
  1. 3
      contrib/fast-import/git-p4

3
contrib/fast-import/git-p4

@ -901,7 +901,8 @@ class P4Sync(Command): @@ -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:

Loading…
Cancel
Save