Diff
Modified: trunk/Tools/ChangeLog (285001 => 285002)
--- trunk/Tools/ChangeLog 2021-10-28 21:01:00 UTC (rev 285001)
+++ trunk/Tools/ChangeLog 2021-10-28 21:04:37 UTC (rev 285002)
@@ -1,3 +1,18 @@
+2021-10-28 Jonathan Bedard <[email protected]>
+
+ [webkitscmpy] Fix commits set on branch
+ https://bugs.webkit.org/show_bug.cgi?id=232443
+ <rdar://problem/84763432>
+
+ Reviewed by Darin Adler.
+
+ * Scripts/libraries/webkitscmpy/setup.py: Bump version.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
+ (Git.commits): We are appending to list of commits, not pre-pending.
+ * Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
+ (TestGitHub.test_commits_branch_ref):
+
2021-10-28 Andres Gonzalez <[email protected]>
Isolated tree mode: Dispatch all calls to [WebAccessibilityObjectWrapper accessibilityAttributeValue] in WTR::AccessibilityUIElement to the AX thread.
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (285001 => 285002)
--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2021-10-28 21:01:00 UTC (rev 285001)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py 2021-10-28 21:04:37 UTC (rev 285002)
@@ -29,7 +29,7 @@
setup(
name='webkitscmpy',
- version='2.2.18',
+ version='2.2.19',
description='Library designed to interact with git and svn repositories.',
long_description=readme(),
classifiers=[
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (285001 => 285002)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2021-10-28 21:01:00 UTC (rev 285001)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py 2021-10-28 21:04:37 UTC (rev 285002)
@@ -46,7 +46,7 @@
"Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
)
-version = Version(2, 2, 18)
+version = Version(2, 2, 19)
AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
AutoInstall.register(Package('jinja2', Version(2, 11, 3)))
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py (285001 => 285002)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py 2021-10-28 21:01:00 UTC (rev 285001)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py 2021-10-28 21:04:37 UTC (rev 285002)
@@ -688,10 +688,10 @@
while line:
if not line.startswith('commit '):
raise OSError('Failed to parse `git log` format')
- branch_point = previous[0].branch_point
- identifier = previous[0].identifier
+ branch_point = previous[-1].branch_point
+ identifier = previous[-1].identifier
hash = line.split(' ')[-1].rstrip()
- if hash != previous[0].hash:
+ if hash != previous[-1].hash:
identifier -= 1
if not identifier:
@@ -715,12 +715,12 @@
)
# Ensure that we don't duplicate the first and last commits
- if commit.hash == previous[0].hash:
- previous[0] = commit
+ if commit.hash == previous[-1].hash:
+ previous[-1] = commit
# If we share a timestamp with the previous commit, that means that this commit has an order
# less than the set of commits cached in previous
- elif commit.timestamp == previous[0].timestamp:
+ elif commit.timestamp == previous[-1].timestamp:
for cached in previous:
cached.order += 1
previous.append(commit)
Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py (285001 => 285002)
--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py 2021-10-28 21:01:00 UTC (rev 285001)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py 2021-10-28 21:04:37 UTC (rev 285002)
@@ -628,7 +628,16 @@
git.commit(hash='9b8311f2'),
]), Commit.Encoder().default(list(git.commits(begin=dict(argument='9b8311f2'), end=dict(argument='621652ad')))))
+ def test_commits_branch_ref(self):
+ self.maxDiff = None
+ with mocks.remote.GitHub():
+ git = remote.GitHub(self.remote)
+ self.assertEqual(
+ ['2.3@branch-b', '2.2@branch-b', '2.1@branch-b'],
+ [str(commit) for commit in git.commits(begin=dict(argument='a30ce849'), end=dict(argument='branch-b'))],
+ )
+
class TestBitBucket(testing.TestCase):
remote = 'https://bitbucket.example.com/projects/WEBKIT/repos/webkit'