Summary: | Use --relative git parameter when applicable to generate WPT patch | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Brendan McLoughlin <brendan> | ||||||||
Component: | New Bugs | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | NEW --- | ||||||||||
Severity: | Normal | CC: | ews-watchlist, fred.wang, glenn, gsnedders, rniwa, youennf | ||||||||
Priority: | P2 | ||||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | Unspecified | ||||||||||
OS: | Unspecified | ||||||||||
Attachments: |
|
Description
Brendan McLoughlin
2018-03-16 07:25:54 PDT
Created attachment 335934 [details]
Patch
webkitpy results are failing with the patch. You can run them using Tools/Scripts/test-webkitpy. Comment on attachment 335934 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=335934&action=review > Tools/Scripts/webkitpy/common/checkout/scm/scm_unittest.py:553 > + 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... > Tools/Scripts/webkitpy/common/checkout/scm/svn.py:302 > + 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. > Tools/Scripts/webkitpy/w3c/test_exporter.py:211 > + 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]
Patch
Created attachment 336041 [details]
Patch
Comment on attachment 336041 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=336041&action=review r- because SVN implementation is inadequate. > Tools/Scripts/webkitpy/common/checkout/scm/svn.py:303 > + 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. |