@@ -456,83 +456,6 @@ def _shared_test_diff_for_revision(self):
456456 self .assertRegexpMatches (r3_patch , b'test2' )
457457 self .assertRegexpMatches (self .scm .diff_for_revision (3 ), b'test2' )
458458
459- def _shared_test_svn_apply_git_patch (self ):
460- self ._setup_webkittools_scripts_symlink (self .scm )
461- git_binary_addition = """diff --git a/fizzbuzz7.gif b/fizzbuzz7.gif
462- new file mode 100644
463- index 0000000000000000000000000000000000000000..64a9532e7794fcd791f6f12157406d90
464- 60151690
465- GIT binary patch
466- literal 512
467- zcmZ?wbhEHbRAx|MU|?iW{Kxc~?KofD;ckY;H+&5HnHl!!GQMD7h+sU{_)e9f^V3c?
468- zhJP##HdZC#4K}7F68@!1jfWQg2daCm-gs#3|JREDT>c+pG4L<_2;w##WMO#ysPPap
469- zLqpAf1OE938xAsSp4!5f-o><?VKe(#0jEcwfHGF4%M1^kRs14oVBp2ZEL{E1N<-zJ
470- zsfLmOtKta;2_;2c#^S1-8cf<nb!QnGl>c!Xe6RXvrEtAWBvSDTgTO1j3vA31Puw!A
471- zs(87q)j_mVDTqBo-P+03-P5mHCEnJ+x}YdCuS7#bCCyePUe(ynK+|4b-3qK)T?Z&)
472- zYG+`tl4h?GZv_$t82}X4*DTE|$;{DEiPyF@)U-1+FaX++T9H{&%cag`W1|zVP@`%b
473- zqiSkp6{BTpWTkCr!=<C6Q=?#~R8^JfrliAF6Q^gV9Iup8RqCXqqhqC`qsyhk<-nlB
474- z00f{QZvfK&|Nm#oZ0TQl`Yr$BIa6A@16O26ud7H<QM=xl`toLKnz-3h@9c9q&wm|X
475- z{89I|WPyD!*M?gv?q`;L=2YFeXrJQNti4?}s!zFo=5CzeBxC69xA<zrjP<wUcCRh4
476- ptUl-ZG<%a~#LwkIWv&q!KSCH7tQ8cJDiw+|GV?MN)RjY50RTb-xvT&H
477-
478- literal 0
479- HcmV?d00001
480-
481- """
482- self .checkout .apply_patch (self ._create_patch (git_binary_addition ))
483- added = read_from_path ('fizzbuzz7.gif' , encoding = None )
484- self .assertEqual (512 , len (added ))
485- self .assertTrue (added .startswith (b'GIF89a' ))
486- self .assertIn ('fizzbuzz7.gif' , self .scm .changed_files ())
487-
488- # The file already exists.
489- self .assertRaises (ScriptError , self .checkout .apply_patch , self ._create_patch (git_binary_addition ))
490-
491- git_binary_modification = """diff --git a/fizzbuzz7.gif b/fizzbuzz7.gif
492- index 64a9532e7794fcd791f6f12157406d9060151690..323fae03f4606ea9991df8befbb2fca7
493- GIT binary patch
494- literal 7
495- OcmYex&reD$;sO8*F9L)B
496-
497- literal 512
498- zcmZ?wbhEHbRAx|MU|?iW{Kxc~?KofD;ckY;H+&5HnHl!!GQMD7h+sU{_)e9f^V3c?
499- zhJP##HdZC#4K}7F68@!1jfWQg2daCm-gs#3|JREDT>c+pG4L<_2;w##WMO#ysPPap
500- zLqpAf1OE938xAsSp4!5f-o><?VKe(#0jEcwfHGF4%M1^kRs14oVBp2ZEL{E1N<-zJ
501- zsfLmOtKta;2_;2c#^S1-8cf<nb!QnGl>c!Xe6RXvrEtAWBvSDTgTO1j3vA31Puw!A
502- zs(87q)j_mVDTqBo-P+03-P5mHCEnJ+x}YdCuS7#bCCyePUe(ynK+|4b-3qK)T?Z&)
503- zYG+`tl4h?GZv_$t82}X4*DTE|$;{DEiPyF@)U-1+FaX++T9H{&%cag`W1|zVP@`%b
504- zqiSkp6{BTpWTkCr!=<C6Q=?#~R8^JfrliAF6Q^gV9Iup8RqCXqqhqC`qsyhk<-nlB
505- z00f{QZvfK&|Nm#oZ0TQl`Yr$BIa6A@16O26ud7H<QM=xl`toLKnz-3h@9c9q&wm|X
506- z{89I|WPyD!*M?gv?q`;L=2YFeXrJQNti4?}s!zFo=5CzeBxC69xA<zrjP<wUcCRh4
507- ptUl-ZG<%a~#LwkIWv&q!KSCH7tQ8cJDiw+|GV?MN)RjY50RTb-xvT&H
508-
509- """
510- self .checkout .apply_patch (self ._create_patch (git_binary_modification ))
511- modified = read_from_path ('fizzbuzz7.gif' , encoding = None )
512- self .assertEqual (b'foobar\n ' , modified )
513- self .assertIn ('fizzbuzz7.gif' , self .scm .changed_files ())
514-
515- # Applying the same modification should fail.
516- self .assertRaises (ScriptError , self .checkout .apply_patch , self ._create_patch (git_binary_modification ))
517-
518- git_binary_deletion = """diff --git a/fizzbuzz7.gif b/fizzbuzz7.gif
519- deleted file mode 100644
520- index 323fae0..0000000
521- GIT binary patch
522- literal 0
523- HcmV?d00001
524-
525- literal 7
526- OcmYex&reD$;sO8*F9L)B
527-
528- """
529- self .checkout .apply_patch (self ._create_patch (git_binary_deletion ))
530- self .assertFalse (os .path .exists ('fizzbuzz7.gif' ))
531- self .assertNotIn ('fizzbuzz7.gif' , self .scm .changed_files ())
532-
533- # Cannot delete again.
534- self .assertRaises (ScriptError , self .checkout .apply_patch , self ._create_patch (git_binary_deletion ))
535-
536459 def _shared_test_add_recursively (self ):
537460 os .mkdir ("added_dir" )
538461 write_into_file_at_path ("added_dir/added_file" , "new stuff" )
@@ -609,100 +532,6 @@ def _set_date_and_reviewer(changelog_entry):
609532 with TimezoneOverride ('PST8PDT' ):
610533 return changelog_entry .replace ('DATE_HERE' , date .today ().isoformat ())
611534
612- @slow
613- @xfail
614- def test_svn_apply (self ):
615- first_entry = """2009-10-26 Eric Seidel <eric@webkit.org>
616-
617- Reviewed by Foo Bar.
618-
619- Most awesome change ever.
620-
621- * scm_unittest.py:
622- """
623- intermediate_entry = """2009-10-27 Eric Seidel <eric@webkit.org>
624-
625- Reviewed by Baz Bar.
626-
627- A more awesomer change yet!
628-
629- * scm_unittest.py:
630- """
631- one_line_overlap_patch = """Index: ChangeLog
632- ===================================================================
633- --- ChangeLog (revision 5)
634- +++ ChangeLog (working copy)
635- @@ -1,5 +1,13 @@
636- 2009-10-26 Eric Seidel <eric@webkit.org>
637- %(whitespace)s
638- + Reviewed by NOBODY (OOPS!).
639- +
640- + Second most awesome change ever.
641- +
642- + * scm_unittest.py:
643- +
644- +2009-10-26 Eric Seidel <eric@webkit.org>
645- +
646- Reviewed by Foo Bar.
647- %(whitespace)s
648- Most awesome change ever.
649- """ % {'whitespace' : ' ' }
650- one_line_overlap_entry = """DATE_HERE Eric Seidel <eric@webkit.org>
651-
652- Reviewed by REVIEWER_HERE.
653-
654- Second most awesome change ever.
655-
656- * scm_unittest.py:
657- """
658- two_line_overlap_patch = """Index: ChangeLog
659- ===================================================================
660- --- ChangeLog (revision 5)
661- +++ ChangeLog (working copy)
662- @@ -2,6 +2,14 @@
663- %(whitespace)s
664- Reviewed by Foo Bar.
665- %(whitespace)s
666- + Second most awesome change ever.
667- +
668- + * scm_unittest.py:
669- +
670- +2009-10-26 Eric Seidel <eric@webkit.org>
671- +
672- + Reviewed by Foo Bar.
673- +
674- Most awesome change ever.
675- %(whitespace)s
676- * scm_unittest.py:
677- """ % {'whitespace' : ' ' }
678- two_line_overlap_entry = """DATE_HERE Eric Seidel <eric@webkit.org>
679-
680- Reviewed by Foo Bar.
681-
682- Second most awesome change ever.
683-
684- * scm_unittest.py:
685- """
686- write_into_file_at_path ('ChangeLog' , first_entry )
687- run_command (['svn' , 'add' , 'ChangeLog' ])
688- run_command (['svn' , 'commit' , '--quiet' , '--message' , 'ChangeLog commit' ])
689-
690- # Patch files were created against just 'first_entry'.
691- # Add a second commit to make svn-apply have to apply the patches with fuzz.
692- changelog_contents = "%s\n %s" % (intermediate_entry , first_entry )
693- write_into_file_at_path ('ChangeLog' , changelog_contents )
694- run_command (['svn' , 'commit' , '--quiet' , '--message' , 'Intermediate commit' ])
695-
696- self ._setup_webkittools_scripts_symlink (self .scm )
697- self .checkout .apply_patch (self ._create_patch (one_line_overlap_patch ))
698- expected_changelog_contents = "%s\n %s" % (self ._set_date_and_reviewer (one_line_overlap_entry ), changelog_contents )
699- self .assertEqual (read_from_path ('ChangeLog' ), expected_changelog_contents )
700-
701- self .scm .revert_files (['ChangeLog' ])
702- self .checkout .apply_patch (self ._create_patch (two_line_overlap_patch ))
703- expected_changelog_contents = "%s\n %s" % (self ._set_date_and_reviewer (two_line_overlap_entry ), changelog_contents )
704- self .assertEqual (read_from_path ('ChangeLog' ), expected_changelog_contents )
705-
706535 def setUp (self ):
707536 SVNTestRepository .setup (self )
708537 os .chdir (self .svn_checkout_path )
@@ -902,10 +731,6 @@ def test_reverse_diff(self):
902731 def test_diff_for_revision (self ):
903732 self ._shared_test_diff_for_revision ()
904733
905- @slow
906- def test_svn_apply_git_patch (self ):
907- self ._shared_test_svn_apply_git_patch ()
908-
909734 @slow
910735 def test_changed_files (self ):
911736 self ._shared_test_changed_files ()
@@ -1287,29 +1112,6 @@ def test_remote_merge_base(self):
12871112 self .assertNotRegexpMatches (diff_to_common_base , b'foo' )
12881113 self .assertRegexpMatches (diff_to_merge_base , b'foo' )
12891114
1290- @xfail
1291- @slow
1292- def test_rebase_in_progress (self ):
1293- svn_test_file = os .path .join (self .svn_checkout_path , 'test_file' )
1294- write_into_file_at_path (svn_test_file , "svn_checkout" )
1295- run_command (['svn' , 'commit' , '--message' , 'commit to conflict with git commit' ], cwd = self .svn_checkout_path )
1296-
1297- git_test_file = os .path .join (self .git_checkout_path , 'test_file' )
1298- write_into_file_at_path (git_test_file , "git_checkout" )
1299- run_command (['git' , 'commit' , '-a' , '-m' , 'commit to be thrown away by rebase abort' ])
1300-
1301- # --quiet doesn't make git svn silent, so use run_silent to redirect output
1302- self .assertRaises (ScriptError , run_silent , ['git' , 'svn' , '--quiet' , 'rebase' ]) # Will fail due to a conflict leaving us mid-rebase.
1303-
1304- self .assertTrue (self .scm .rebase_in_progress ())
1305-
1306- # Make sure our cleanup works.
1307- self .scm .discard_working_directory_changes ()
1308- self .assertFalse (self .scm .rebase_in_progress ())
1309-
1310- # Make sure cleanup doesn't throw when no rebase is in progress.
1311- self .scm .discard_working_directory_changes ()
1312-
13131115 @slow
13141116 def test_commitish_parsing (self ):
13151117 # Multiple revisions are cherry-picked.
@@ -1519,11 +1321,6 @@ def test_reverse_diff(self):
15191321 def test_diff_for_revision (self ):
15201322 self ._shared_test_diff_for_revision ()
15211323
1522- @slow
1523- @xfail
1524- def test_svn_apply_git_patch (self ):
1525- self ._shared_test_svn_apply_git_patch ()
1526-
15271324 @slow
15281325 @xfail
15291326 def test_create_patch_local_plus_working_copy (self ):
0 commit comments