Use --relative git parameter when applicable to generate WPT patch
Created attachment 335934 [details]
webkitpy results are failing with the patch.
You can run them using Tools/Scripts/test-webkitpy.
Comment on attachment 335934 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=335934&action=review
> + test_file_path = test_dir + '/test_file'
I am not sure about slash, since we might at some point move away from Cygwin.
Given that this is done extensively in this file, this might be ok...
> + patch = patch.replace(relative + '/', '')
In that general context, it is not sure that it will do exactly what we want.
This is fine in the context of the exporter.
I would add a comment here stating that the relative parameter should be chosen carefully or a better svn-specific approach be taken.
> + patch_data = self._host.scm().create_patch(git_commit, [WEBKIT_WPT_DIR], relative=WEBKIT_WPT_DIR)
You might need to update Tools/Scripts/webkitpy/w3c/test_exporter_unittest.py as well
Created attachment 336040 [details]
Created attachment 336041 [details]
Comment on attachment 336041 [details]
View in context: https://bugs.webkit.org/attachment.cgi?id=336041&action=review
r- because SVN implementation is inadequate.
> + relative_path = relative if relative.endswith('/') else relative + '/'
> + patch = patch.replace(relative_path, '')
This would replace any string which contains this string. That could be problematic inside Source.
Do a regex match against file names protruded in lines 392-395 in ./Tools/Scripts/svn-create-patch
But a better fix is to add an option to svn-create-patch to specify a relative path as you've done to git.