Bug 223579

Summary: [webkitscmpy] Allow user to force canonicalization for a specific set of commits
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, dewei_zhu, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

Description Jonathan Bedard 2021-03-22 09:03:07 PDT
Allow a user to set the number of commits to be canonicalized regardless of the state of the remote.
Comment 1 Radar WebKit Bug Importer 2021-03-22 09:03:20 PDT
<rdar://problem/75693154>
Comment 2 Jonathan Bedard 2021-03-22 09:07:19 PDT
Created attachment 423894 [details]
Patch
Comment 3 Aakash Jain 2021-03-22 11:45:00 PDT
Comment on attachment 423894 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=423894&action=review

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/__init__.py:80
> +        difference = args.number

difference should be replaced by something which indicate the purpose, e.g.: num_commits_to_canonicalize

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/__init__.py:81
> +        if not args.number:

better to use the above variable here in in condition, e.g.: 'if difference'/'if num_commits_to_canonicalize'

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:213
> +            self.assertEqual(

can consider formatting it in one line.
Comment 4 Jonathan Bedard 2021-03-22 12:05:04 PDT
Committed r274771 (235580@main): <https://commits.webkit.org/235580@main>