Bug 223579 - [webkitscmpy] Allow user to force canonicalization for a specific set of commits
Summary: [webkitscmpy] Allow user to force canonicalization for a specific set of commits
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Jonathan Bedard
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-03-22 09:03 PDT by Jonathan Bedard
Modified: 2021-03-22 16:18 PDT (History)
3 users (show)

See Also:


Attachments
Patch (6.12 KB, patch)
2021-03-22 09:07 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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>