Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Hausmann <simon@lst.de>2007-07-25 11:31:38 +0400
committerJunio C Hamano <gitster@pobox.com>2007-07-26 03:06:54 +0400
commitb2d2d16af7ff686fb96d344daaf49653fd67366a (patch)
tree6a159df285a58fb73c544eceac9c127a6450de7d /contrib
parent537601ac74db2d93665b20a67ba05851703bb2c3 (diff)
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')
-rwxr-xr-xcontrib/fast-import/git-p43
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index e3404ca853..1f5a56ee7f 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: