Bug 216333

Summary: [webkitscmpy] Add tags, branches queries on local repositories
Product: WebKit Reporter: Jonathan Bedard <jbedard>
Component: Tools / TestsAssignee: Jonathan Bedard <jbedard>
Status: RESOLVED FIXED    
Severity: Normal CC: dewei_zhu, jlewis3, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=215862
Attachments:
Description Flags
Patch
none
Patch none

Description Jonathan Bedard 2020-09-09 16:20:08 PDT
Add a set of functions to list all branches and tags for a local repository.
Comment 1 Radar WebKit Bug Importer 2020-09-09 16:20:44 PDT
<rdar://problem/68603047>
Comment 2 Jonathan Bedard 2020-09-09 16:34:52 PDT
Created attachment 408384 [details]
Patch
Comment 3 dewei_zhu 2020-09-09 17:16:19 PDT
Comment on attachment 408384 [details]
Patch

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

> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:60
> +        with mocks.local.Git(self.path, branches=('branch-1', 'branch-2')):
> +            self.assertEqual(
> +                local.Git(self.path).branches,
> +                ['main', 'branch-1', 'branch-2'],
> +            )

Maybe add `remotes/origin/HEAD -> origin/main`to the test case and expect it to be excluded?
Comment 4 dewei_zhu 2020-09-09 17:17:52 PDT
Comment on attachment 408384 [details]
Patch

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

>> Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:60
>> +            )
> 
> Maybe add `remotes/origin/HEAD -> origin/main`to the test case and expect it to be excluded?

Maybe also include `* current-bench` to expect it to be 'current-branch' in the output.
Comment 5 Jonathan Bedard 2020-09-09 22:35:44 PDT
Created attachment 408413 [details]
Patch
Comment 6 EWS 2020-09-10 08:28:49 PDT
Committed r266826: <https://trac.webkit.org/changeset/266826>

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