Bug 225889 - [webkitscmpy] Support branch queries in mock git log
Summary: [webkitscmpy] Support branch queries in mock git log
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-05-17 14:34 PDT by Jonathan Bedard
Modified: 2021-06-16 15:41 PDT (History)
5 users (show)

See Also:


Attachments
Patch (8.74 KB, patch)
2021-05-17 14:37 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (8.90 KB, patch)
2021-05-17 16:49 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (8.91 KB, patch)
2021-05-17 16:57 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (8.19 KB, patch)
2021-05-19 12:14 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (9.11 KB, patch)
2021-06-08 13:27 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (8.00 KB, patch)
2021-06-16 11:09 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (9.39 KB, patch)
2021-06-16 15:15 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-05-17 14:34:10 PDT
Our `git log` mocks do not support branches, which has some major downsides when developing additional git tooling.
Comment 1 Radar WebKit Bug Importer 2021-05-17 14:34:26 PDT
<rdar://problem/78122705>
Comment 2 Jonathan Bedard 2021-05-17 14:37:37 PDT
Created attachment 428873 [details]
Patch
Comment 3 Jonathan Bedard 2021-05-17 16:49:11 PDT
Created attachment 428891 [details]
Patch
Comment 4 Jonathan Bedard 2021-05-17 16:57:37 PDT
Created attachment 428894 [details]
Patch
Comment 5 Jonathan Bedard 2021-05-19 12:14:57 PDT
Created attachment 429084 [details]
Patch
Comment 6 Jonathan Bedard 2021-06-08 13:27:34 PDT
Created attachment 430883 [details]
Patch
Comment 7 Dean Johnson 2021-06-08 13:36:03 PDT
LGTM; unofficial r+.
Comment 8 Jonathan Bedard 2021-06-16 11:09:18 PDT
Created attachment 431568 [details]
Patch
Comment 9 Stephanie Lewis 2021-06-16 13:49:26 PDT
Comment on attachment 431568 [details]
Patch

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

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:532
> +                if commit.hash.startswith(end) or end == branch:

is it ever passible that the first commit will be in the middle of the range? This code would treat it as out of range
Comment 10 Jonathan Bedard 2021-06-16 14:23:52 PDT
Comment on attachment 431568 [details]
Patch

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

>> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:532
>> +                if commit.hash.startswith(end) or end == branch:
> 
> is it ever passible that the first commit will be in the middle of the range? This code would treat it as out of range

Not if tests are well constructed. This change is entirely in unit testing code, so if begin is older than end, this function shouldn't return anything.
Comment 11 Jonathan Bedard 2021-06-16 15:15:55 PDT
Created attachment 431612 [details]
Patch for landing
Comment 12 EWS 2021-06-16 15:41:43 PDT
Committed r278963 (238890@main): <https://commits.webkit.org/238890@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 431612 [details].