Skip to content

Commit

Permalink
[git-webkit] Prefer radar over bugzilla when cherry-picking
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=246361
rdar://101046976

Reviewed by Dewei Zhu.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/cherry_pick.py:
(CherryPick.main):

Canonical link: https://commits.webkit.org/255403@main
  • Loading branch information
JonWBedard committed Oct 11, 2022
1 parent 7eea313 commit 4f14442
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Tools/Scripts/libraries/webkitscmpy/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def readme():

setup(
name='webkitscmpy',
version='5.6.16',
version='5.6.17',
description='Library designed to interact with git and svn repositories.',
long_description=readme(),
classifiers=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def _maybe_add_webkitcorepy_path():
"Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
)

version = Version(5, 6, 16)
version = Version(5, 6, 17)

AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
AutoInstall.register(Package('jinja2', Version(2, 11, 3)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

from .branch import Branch
from .command import Command
from webkitbugspy import Tracker
from webkitbugspy import Tracker, radar
from webkitcorepy import run
from webkitscmpy import local

Expand Down Expand Up @@ -52,14 +52,22 @@ def main(cls, args, repository, **kwargs):
return 1

try:
commit = repository.find(args.argument[0], include_log=False)
commit = repository.find(args.argument[0], include_log=True)
except (local.Scm.Exception, TypeError, ValueError) as exception:
# ValueErrors and Scm exceptions usually contain enough information to be displayed
# to the user as an error
sys.stderr.write(str(exception) + '\n')
return 1

issue = Tracker.from_string(args.issue) if args.issue else None
if not issue and commit.issues:
issue = commit.issues[0]
if radar.Tracker.radarclient():
for candidate in commit.issues:
if isinstance(candidate.tracker, radar.Tracker):
issue = candidate
break

if str(commit) == commit.hash[:commit.HASH_LABEL_SIZE]:
cherry_pick_string = str(commit)
else:
Expand Down

0 comments on commit 4f14442

Please sign in to comment.