summaryrefslogtreecommitdiff
path: root/rbtools
diff options
context:
space:
mode:
authorChristian Hammond <chipx86@chipx86.com>2009-11-04 22:47:02 -0800
committerChristian Hammond <chipx86@chipx86.com>2009-11-04 22:48:41 -0800
commit62dd2130e5e510b8cbb90d827bc5ec8e332d3817 (patch)
treecd047afae498a20bb447fb1354277a9dca3bfc14 /rbtools
parent3bd73dda33fb0669627b642cec6bf1d26b966263 (diff)
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/
Diffstat (limited to 'rbtools')
-rwxr-xr-xrbtools/postreview.py7
1 files changed, 7 insertions, 0 deletions
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