Bug 216333 - [webkitscmpy] Add tags, branches queries on local repositories
Summary: [webkitscmpy] Add tags, branches queries on local repositories
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: 2020-09-09 16:20 PDT by Jonathan Bedard
Modified: 2020-09-10 08:28 PDT (History)
3 users (show)

See Also:


Attachments
Patch (11.55 KB, patch)
2020-09-09 16:34 PDT, Jonathan Bedard
no flags Details | Formatted Diff | Diff
Patch (11.64 KB, patch)
2020-09-09 22:35 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 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].