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

[PATCH] git-p4import.py: handle paths with symlinks

From
KGKevin Green <kevin.green@morganstanley.com>
Date
Jun 8, 2007, 22:33 UTC
Message-ID
<20070608223300.GL25093@menevado.ms.com>

Need to expand symlinks when checking if the p4 client is misconfigured for the local git dir.

Signed-off-by: Kevin Green <Kevin.Green@morganstanley.com>
---
 git-p4import.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-p4import.py b/git-p4import.py
index 0f3d97b..ad15708 100644
--- a/git-p4import.py
+++ b/git-p4import.py
@@ -312,7 +312,7 @@ for o, a in opts:
         p4.authors(a)

 localdir = git.basedir()
-if p4.where()[:len(localdir)] != localdir:
+if os.path.realpath(os.path.dirname(p4.where())) != os.path.realpath(localdir):
     report(1, "**WARNING** Appears p4 client is misconfigured")
     report(1, "   for sync from %s to %s" % (p4.repopath, localdir))
     if ignore_warnings != True:
--
1.5.2.1
Message 1 of 1 in “git-p4import.py: handle paths with symlinks”
  1. git-p4import.py: handle paths with symlinksKevin Green, Jun 8, 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.