Skip to content
Permalink
Browse files
[webkitscmpy] Do not query remotes when determining branches containi…
…ng commit

https://bugs.webkit.org/show_bug.cgi?id=233700
<rdar://problem/85920569>

Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.branches_for): Remove -a from --contains check.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:


Canonical link: https://commits.webkit.org/244732@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@286373 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard committed Dec 1, 2021
1 parent 6586825 commit 504aecca1742151df9e8c6e9e10b2c07b147c068
@@ -1,3 +1,17 @@
2021-12-01 Jonathan Bedard <jbedard@apple.com>

[webkitscmpy] Do not query remotes when determining branches containing commit
https://bugs.webkit.org/show_bug.cgi?id=233700
<rdar://problem/85920569>

Reviewed by Stephanie Lewis.

* Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.branches_for): Remove -a from --contains check.
* Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:

2021-12-01 Tim Horton <timothy_horton@apple.com>

REGRESSION (r286346): ResourceLoadDelegate.LoadInfo fails
@@ -29,7 +29,7 @@ def readme():

setup(
name='webkitscmpy',
version='3.0.4',
version='3.0.5',
description='Library designed to interact with git and svn repositories.',
long_description=readme(),
classifiers=[
@@ -46,7 +46,7 @@ def _maybe_add_webkitcorepy_path():
"Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
)

version = Version(3, 0, 4)
version = Version(3, 0, 5)

AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
AutoInstall.register(Package('jinja2', Version(2, 11, 3)))
@@ -461,7 +461,7 @@ def _commit_count(self, native_parameter):

def branches_for(self, hash=None, remote=True):
branch = run(
[self.executable(), 'branch', '-a'] + (['--contains', hash] if hash else []),
[self.executable(), 'branch'] + (['--contains', hash] if hash else ['-a']),
cwd=self.root_path,
capture_output=True,
encoding='utf-8',
@@ -340,12 +340,12 @@ def __init__(
)
) if self.find(args[4]) else mocks.ProcessCompletion(returncode=128),
), mocks.Subprocess.Route(
self.executable, 'branch', '-a', '--contains', re.compile(r'.+'),
self.executable, 'branch', '--contains', re.compile(r'.+'),
cwd=self.path,
generator=lambda *args, **kwargs: mocks.ProcessCompletion(
returncode=0,
stdout='\n'.join(sorted(self.branches_on(args[4]))) + '\n',
) if self.find(args[4]) else mocks.ProcessCompletion(returncode=128),
stdout='\n'.join(sorted(self.branches_on(args[3]))) + '\n',
) if self.find(args[3]) else mocks.ProcessCompletion(returncode=128),
), mocks.Subprocess.Route(
self.executable, 'checkout', '-b', re.compile(r'.+'),
cwd=self.path,

0 comments on commit 504aecc

Please sign in to comment.