Skip to content

Commit

Permalink
git-p4: Fix p4 user cache population on Windows.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Simon Hausmann authored and Junio C Hamano committed Jul 25, 2007
1 parent 537601a commit b2d2d16
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion contrib/fast-import/git-p4
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit b2d2d16

Please sign in to comment.