@matheusbsbs / matheus-bagliano / commits / afa1dd9a46
Fork 0

git-p4: Fix error message crash in P4Sync.commit.

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> Acked-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Tor Arvid Lund committed Mar 15, 2011 at 13:08 UTC afa1dd9a46d02a2a893840427e06fe847c8a531a
1 file changed +1 -1
contrib/fast-import/git-p4
+1 -1
@@ -1160,7 +1160,7 @@ class P4Sync(Command):
1160 if [p for p in branchPrefixes if p4PathStartsWith(f['path'], p)]:
1161 new_files.append (f)
1162 else:
1163 - sys.stderr.write("Ignoring file outside of prefix: %s\n" % path)
1163 + sys.stderr.write("Ignoring file outside of prefix: %s\n" % f['path'])
1164
1165 self.gitStream.write("commit %s\n" % branch)
1166 # gitStream.write("mark :%s\n" % details["change"])