Bug 226980 - [webkitscmpy] Return remote objects from remote() function
Summary: [webkitscmpy] Return remote objects from remote() function
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-06-14 11:36 PDT by Jonathan Bedard
Modified: 2021-07-29 12:47 PDT (History)
4 users (show)

See Also:


Attachments
Patch (8.10 KB, patch)
2021-06-14 11:40 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch for landing (9.41 KB, patch)
2021-06-14 14:52 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (9.34 KB, patch)
2021-07-29 12:16 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-06-14 11:36:48 PDT
In Svn, this is easy, because "remote" objects are always of the type remote.Svn. In Git, this is a bit more complicated, because we support both GitHub and BitBucket. With a bit of parsing of the origin URL, though, it's possible to figure out which (if any) remote we have.
Comment 1 Radar WebKit Bug Importer 2021-06-14 11:37:11 PDT
<rdar://problem/79299760>
Comment 2 Jonathan Bedard 2021-06-14 11:40:39 PDT
Created attachment 431347 [details]
Patch
Comment 3 Dean Johnson 2021-06-14 13:28:41 PDT
Comment on attachment 431347 [details]
Patch

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

Unofficial r+ w/ the memoization comment.

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:140
> +    def remote(self, name=None):

Would be nice to memoize this function to keep git annotations speedy.
Comment 4 dewei_zhu 2021-06-14 13:51:51 PDT
Comment on attachment 431347 [details]
Patch

r=me
Comment 5 Jonathan Bedard 2021-06-14 14:52:02 PDT
Created attachment 431368 [details]
Patch for landing
Comment 6 EWS 2021-06-14 16:38:44 PDT
Found 1 new test failure: imported/w3c/web-platform-tests/webrtc-extensions/transfer-datachannel-service-worker.https.html
Comment 7 Jonathan Bedard 2021-07-29 12:16:46 PDT
Created attachment 434556 [details]
Patch
Comment 8 EWS 2021-07-29 12:47:55 PDT
Committed r280440 (240078@main): <https://commits.webkit.org/240078@main>

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