git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] git-p4: Fix error message crash in P4Sync.commit.
@ 2011-02-08 12:20 Tor Arvid Lund
  2011-02-11 13:44 ` Pete Wyckoff
  0 siblings, 1 reply; 2+ messages in thread
From: Tor Arvid Lund @ 2011-02-08 12:20 UTC (permalink / raw)
  To: git; +Cc: Tor Arvid Lund

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.
---
 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 ca3cea0..29b9e32 100755
--- a/contrib/fast-import/git-p4
+++ b/contrib/fast-import/git-p4
@@ -1086,7 +1086,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

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] git-p4: Fix error message crash in P4Sync.commit.
  2011-02-08 12:20 [PATCH] git-p4: Fix error message crash in P4Sync.commit Tor Arvid Lund
@ 2011-02-11 13:44 ` Pete Wyckoff
  0 siblings, 0 replies; 2+ messages in thread
From: Pete Wyckoff @ 2011-02-11 13:44 UTC (permalink / raw)
  To: Tor Arvid Lund; +Cc: git

torarvid@gmail.com wrote on Tue, 08 Feb 2011 13:20 +0100:
> 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.

Needs signoff.

Acked-by: Pete Wyckoff <pw@padd.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 ca3cea0..29b9e32 100755
> --- a/contrib/fast-import/git-p4
> +++ b/contrib/fast-import/git-p4
> @@ -1086,7 +1086,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
> 
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-02-11 13:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-02-08 12:20 [PATCH] git-p4: Fix error message crash in P4Sync.commit Tor Arvid Lund
2011-02-11 13:44 ` Pete Wyckoff

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).