diff options
author | Simon Hausmann <simon@lst.de> | 2007-07-25 09:31:38 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-07-25 16:06:54 -0700 |
commit | b2d2d16af7ff686fb96d344daaf49653fd67366a (patch) | |
tree | 6a159df285a58fb73c544eceac9c127a6450de7d /contrib/fast-import | |
parent | 537601ac74db2d93665b20a67ba05851703bb2c3 (diff) | |
download | git-b2d2d16af7ff686fb96d344daaf49653fd67366a.tar.gz git-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>
Diffstat (limited to 'contrib/fast-import')
-rwxr-xr-x | contrib/fast-import/git-p4 | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4 index e3404ca85..1f5a56ee7 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: |