git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH] git-p4: Fix p4 user cache population on Windows.

From
Simon Hausmann <simon@lst.de>
Date
Jul 25, 2007, 07:31 UTC
Message-ID
<200707250931.41414.simon@lst.de>
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>
---
 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 e3404ca..1f5a56e 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:
-- 
1.5.3.rc0.63.gc956
Next: Junio C Hamano
Message 1 of 2 in “git-p4: Fix p4 user cache population on Windows.”
  1. git-p4: Fix p4 user cache population on Windows.Simon Hausmann, Jul 25, 2007
  2. Junio C HamanoJul 25, 2007

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.