Skip to content

Commit

Permalink
Properly represent binary files in patches when using git-svn.
Browse files Browse the repository at this point in the history
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/
  • Loading branch information
chipx86 committed Nov 5, 2009
1 parent 3bd73dd commit 62dd213
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Lead Developers:

Contributors:

* Anthony Cruz
* Chris Clark
* Dan Savilonis
* Dana Lacoste
Expand Down
7 changes: 7 additions & 0 deletions rbtools/postreview.py
Original file line number Diff line number Diff line change
Expand Up @@ -2138,6 +2138,13 @@ def make_svn_diff(self, parent_branch, diff_lines):
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

Expand Down

0 comments on commit 62dd213

Please sign in to comment.