From 62dd2130e5e510b8cbb90d827bc5ec8e332d3817 Mon Sep 17 00:00:00 2001 From: Christian Hammond Date: Wed, 4 Nov 2009 22:47:02 -0800 Subject: Properly represent binary files in patches when using git-svn. When adding/changing binary files against a git-svn repository, the binary files would be filtered out of the diff. We now represent binary files properly by faking the information in a diff. Patch by Anthony Cruz. Reviewed at http://reviews.reviewboard.org/r/1194/ --- AUTHORS | 1 + rbtools/postreview.py | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/AUTHORS b/AUTHORS index c018726..765c328 100644 --- a/AUTHORS +++ b/AUTHORS @@ -6,6 +6,7 @@ Lead Developers: Contributors: + * Anthony Cruz * Chris Clark * Dan Savilonis * Dana Lacoste diff --git a/rbtools/postreview.py b/rbtools/postreview.py index 567e891..5045df8 100755 --- a/rbtools/postreview.py +++ b/rbtools/postreview.py @@ -2138,6 +2138,13 @@ class GitClient(SCMClient): else: # We already printed the "--- " line. diff_data += "+++ %s\t(working copy)\n" % filename + elif line.startswith("new file mode"): + # Filter this out. + pass + elif line.startswith("Binary files "): + # Add the following so that we know binary files were added/changed + diff_data += "Cannot display: file marked as a binary type.\n" + diff_data += "svn:mime-type = application/octet-stream\n" else: diff_data += line -- cgit v1.2.3