{"thread":{"id":"8515","subject":"[PATCH] git-p4import.py: handle paths with symlinks","startedAt":"2007-06-08T22:33:00Z","lastAt":"2007-06-08T22:33:00Z","messageCount":1,"participants":["Kevin Green"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"44393","messageId":"20070608223300.GL25093@menevado.ms.com","threadId":"8515","inReplyTo":null,"subject":"[PATCH] git-p4import.py: handle paths with symlinks","fromName":"Kevin Green","fromEmail":"kevin.green@morganstanley.com","sentAt":"2007-06-08T22:33:00Z","receivedAt":"2007-06-08T22:33:00Z","isPatch":true,"sender":{"key":"kevin.green@morganstanley.com","avatar":null},"body":"Need to expand symlinks when checking if the p4 client is misconfigured\nfor the local git dir.\n\nSigned-off-by: Kevin Green <Kevin.Green@morganstanley.com>\n---\n git-p4import.py |    2 +-\n 1 files changed, 1 insertions(+), 1 deletions(-)\n\ndiff --git a/git-p4import.py b/git-p4import.py\nindex 0f3d97b..ad15708 100644\n--- a/git-p4import.py\n+++ b/git-p4import.py\n@@ -312,7 +312,7 @@ for o, a in opts:\n         p4.authors(a)\n\n localdir = git.basedir()\n-if p4.where()[:len(localdir)] != localdir:\n+if os.path.realpath(os.path.dirname(p4.where())) != os.path.realpath(localdir):\n     report(1, \"**WARNING** Appears p4 client is misconfigured\")\n     report(1, \"   for sync from %s to %s\" % (p4.repopath, localdir))\n     if ignore_warnings != True:\n--\n1.5.2.1\n"}]}