This website requires JavaScript.
Explore
Help
Sign in
revi-archive
/
phorge-arcanist
Watch
1
Star
0
Fork
You've already forked phorge-arcanist
0
mirror of
https://we.phorge.it/source/arcanist.git
synced
2024-11-09 16:32:39 +01:00
Code
Issues
Releases
Wiki
Activity
97056a3b85
phorge-arcanist
/
scripts
/
repository
/
binary_safe_diff.sh
9 lines
80 B
Bash
Raw
Normal View
History
Unescape
Escape
Use binary safe diff in arc diff Summary: Otherwise svn diff fails when the file is binary but the "svn:mime-type = application/x-shellscript" is missing in it. Test Plan: arc diff succeeded against deleting a binary file which doesn't have svn:mime-type = application/x-shellscript. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2915
2012-07-03 22:25:49 +02:00
#!/bin/sh
diff
"
$@
"
Preserve the exit code of the diff command in binary_safe_diff.sh Summary: Some versions of Subversion (1.9 in any case, maybe others) will duplicate diff headers, if the diff command run through --diff-cmd returns 0. This lead to T9970, where the addition of a new file with properties only shows the properties themselves in the review, not the content of the new file. Test Plan: This is a trivial change, is a test needed at all? Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: stevenh, Korvin, eadler Differential Revision: https://secure.phabricator.com/D14755
2015-12-13 11:21:43 +01:00
RES
=
"
$?
"
if
[
"
$RES
"
=
"2"
]
;
then
Use binary safe diff in arc diff Summary: Otherwise svn diff fails when the file is binary but the "svn:mime-type = application/x-shellscript" is missing in it. Test Plan: arc diff succeeded against deleting a binary file which doesn't have svn:mime-type = application/x-shellscript. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D2915
2012-07-03 22:25:49 +02:00
exit
1
fi
Preserve the exit code of the diff command in binary_safe_diff.sh Summary: Some versions of Subversion (1.9 in any case, maybe others) will duplicate diff headers, if the diff command run through --diff-cmd returns 0. This lead to T9970, where the addition of a new file with properties only shows the properties themselves in the review, not the content of the new file. Test Plan: This is a trivial change, is a test needed at all? Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley, #blessed_reviewers Subscribers: stevenh, Korvin, eadler Differential Revision: https://secure.phabricator.com/D14755
2015-12-13 11:21:43 +01:00
exit
"
$RES
"
Copy permalink