git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tor Arvid Lund <torarvid@gmail.com>
To: git@vger.kernel.org, Pete Wyckoff <pw@padd.com>
Cc: Tor Arvid Lund <torarvid@gmail.com>
Subject: [PATCH 3/3] git-p4: Fix error message crash in P4Sync.commit.
Date: Tue, 15 Mar 2011 13:08:03 +0100	[thread overview]
Message-ID: <1300190883-31833-3-git-send-email-torarvid@gmail.com> (raw)
In-Reply-To: <1300190883-31833-1-git-send-email-torarvid@gmail.com>

There is an error message that crashes the script because of an invalid ref
to the non-existing "path" variable. It is almost never printed, which
would explain why nobody encountered this problem before... But anyway,
this oneliner fixes it.

Signed-off-by: Tor Arvid Lund <torarvid@gmail.com>
---
 contrib/fast-import/git-p4 |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/contrib/fast-import/git-p4 b/contrib/fast-import/git-p4
index d47596f..47ba7ad 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1160,7 +1160,7 @@ class P4Sync(Command):
             if [p for p in branchPrefixes if p4PathStartsWith(f['path'], p)]:
                 new_files.append (f)
             else:
-                sys.stderr.write("Ignoring file outside of prefix: %s\n" % path)
+                sys.stderr.write("Ignoring file outside of prefix: %s\n" % f['path'])
 
         self.gitStream.write("commit %s\n" % branch)
 #        gitStream.write("mark :%s\n" % details["change"])
-- 
1.7.3.1.68.g06779.dirty

  parent reply	other threads:[~2011-03-15 13:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-15 12:08 [PATCH 1/3] git-p4: Teach gitConfig method about arguments Tor Arvid Lund
2011-03-15 12:08 ` [PATCH 2/3] Teach git-p4 to ignore case in perforce filenames if configured Tor Arvid Lund
2011-03-15 12:08 ` Tor Arvid Lund [this message]
2011-03-15 21:44 ` [PATCH 1/3] git-p4: Teach gitConfig method about arguments Pete Wyckoff

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1300190883-31833-3-git-send-email-torarvid@gmail.com \
    --to=torarvid@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=pw@padd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).