Changeset 58478 in webkit
- Timestamp:
- Apr 28, 2010 11:19:24 PM (14 years ago)
- Location:
- trunk/WebKitTools
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/WebKitTools/ChangeLog
r58473 r58478 1 2010-04-28 Chris Jerdonek <cjerdonek@webkit.org> 2 3 Reviewed by Eric Seidel. 4 5 Added to VCSUtils's parseDiffHeader() support for binary patches. 6 7 https://bugs.webkit.org/show_bug.cgi?id=38094 8 9 The parseDiffHeader() function is part of new patch-parsing code 10 for svn-apply and svn-unapply that will go live in a subsequent 11 revision. 12 13 * Scripts/VCSUtils.pm: 14 - Added logic to parseDiffHeader() to recognize the ending of 15 the header portion of a binary diff. 16 17 * Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl: 18 - Added unit test cases for SVN and Git binary diffs. 19 1 20 2010-04-28 Eric Seidel <eric@webkit.org> 2 21 -
trunk/WebKitTools/Scripts/VCSUtils.pm
r58464 r58478 457 457 } 458 458 } 459 } elsif (s/^\+\+\+ \S+/+++ $indexPath/) { 459 } elsif (s/^\+\+\+ \S+/+++ $indexPath/ || 460 /^Cannot display: file marked as a binary type.$/ || # SVN binary 461 /^GIT binary patch$/) { 460 462 # +++ 461 463 $foundHeaderEnding = 1; -
trunk/WebKitTools/Scripts/webkitperl/VCSUtils_unittest/parseDiffHeader.pl
r58464 r58478 222 222 nextLine => "+<html>\n", 223 223 }, 224 { 225 # New test 226 diffName => "SVN: binary file", 227 inputText => <<'END', 228 Index: test_file.swf 229 =================================================================== 230 Cannot display: file marked as a binary type. 231 svn:mime-type = application/octet-stream 232 233 Property changes on: test_file.swf 234 ___________________________________________________________________ 235 Name: svn:mime-type 236 + application/octet-stream 237 238 239 Q1dTBx0AAAB42itg4GlgYJjGwMDDyODMxMDw34GBgQEAJPQDJA== 240 END 241 # Header keys to check 242 svnConvertedText => <<'END', 243 Index: test_file.swf 244 =================================================================== 245 Cannot display: file marked as a binary type. 246 END 247 copiedFromPath => undef, 248 indexPath => "test_file.swf", 249 sourceRevision => undef, 250 # Other values to check 251 lastReadLine => "svn:mime-type = application/octet-stream\n", 252 nextLine => "\n", 253 }, 254 { 255 # New test 256 diffName => "Git: binary addition", 257 inputText => <<'END', 258 diff --git a/foo.gif b/foo.gif 259 new file mode 100644 260 index 0000000000000000000000000000000000000000..64a9532e7794fcd791f6f12157406d9060151690 261 GIT binary patch 262 literal 512 263 zcmZ?wbhEHbRAx|MU|?iW{Kxc~?KofD;ckY;H+&5HnHl!!GQMD7h+sU{_)e9f^V3c? 264 zhJP##HdZC#4K}7F68@!1jfWQg2daCm-gs#3|JREDT>c+pG4L<_2;w##WMO#ysPPap 265 zLqpAf1OE938xAsSp4!5f-o><?VKe(#0jEcwfHGF4%M1^kRs14oVBp2ZEL{E1N<-zJ 266 zsfLmOtKta;2_;2c#^S1-8cf<nb!QnGl>c!Xe6RXvrEtAWBvSDTgTO1j3vA31Puw!A 267 zs(87q)j_mVDTqBo-P+03-P5mHCEnJ+x}YdCuS7#bCCyePUe(ynK+|4b-3qK)T?Z&) 268 zYG+`tl4h?GZv_$t82}X4*DTE|$;{DEiPyF@)U-1+FaX++T9H{&%cag`W1|zVP@`%b 269 zqiSkp6{BTpWTkCr!=<C6Q=?#~R8^JfrliAF6Q^gV9Iup8RqCXqqhqC`qsyhk<-nlB 270 z00f{QZvfK&|Nm#oZ0TQl`Yr$BIa6A@16O26ud7H<QM=xl`toLKnz-3h@9c9q&wm|X 271 z{89I|WPyD!*M?gv?q`;L=2YFeXrJQNti4?}s!zFo=5CzeBxC69xA<zrjP<wUcCRh4 272 ptUl-ZG<%a~#LwkIWv&q!KSCH7tQ8cJDiw+|GV?MN)RjY50RTb-xvT&H 273 274 literal 0 275 HcmV?d00001 276 277 END 278 # Header keys to check 279 svnConvertedText => <<'END', 280 Index: foo.gif 281 new file mode 100644 282 index 0000000000000000000000000000000000000000..64a9532e7794fcd791f6f12157406d9060151690 283 GIT binary patch 284 END 285 copiedFromPath => undef, 286 indexPath => "foo.gif", 287 sourceRevision => undef, 288 # Other values to check 289 lastReadLine => "literal 512\n", 290 nextLine => "zcmZ?wbhEHbRAx|MU|?iW{Kxc~?KofD;ckY;H+&5HnHl!!GQMD7h+sU{_)e9f^V3c?\n", 291 }, 292 { 293 # New test 294 diffName => "Git: binary deletion", 295 inputText => <<'END', 296 diff --git a/foo.gif b/foo.gif 297 deleted file mode 100644 298 index 323fae0..0000000 299 GIT binary patch 300 literal 0 301 HcmV?d00001 302 303 literal 7 304 OcmYex&reD$;sO8*F9L)B 305 306 END 307 # Header keys to check 308 svnConvertedText => <<'END', 309 Index: foo.gif 310 deleted file mode 100644 311 index 323fae0..0000000 312 GIT binary patch 313 END 314 copiedFromPath => undef, 315 indexPath => "foo.gif", 316 sourceRevision => undef, 317 # Other values to check 318 lastReadLine => "literal 0\n", 319 nextLine => "HcmV?d00001\n", 320 }, 224 321 ); 225 322
Note: See TracChangeset
for help on using the changeset viewer.