threads / patch / 8515

patchgit-p4import.py: handle paths with symlinks

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

## tl;dr

One message between Jun 8, 2007 and Jun 8, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Kevin Green· Jun 8, 2007, 22:33 UTC · lore

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(-)
Show changes to git-p4import.py +1 −2
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

← back to recent threads