Title: [295096] trunk/Tools/Scripts/libraries/webkitscmpy
Revision
295096
Author
[email protected]
Date
2022-06-01 10:41:12 -0700 (Wed, 01 Jun 2022)

Log Message

[git-webkit] Append -- to `git log` commands
https://bugs.webkit.org/show_bug.cgi?id=241161
<rdar://problem/94185199>

Reviewed by Alexey Proskuryakov.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py:
(Git.Cache.populate): Append -- to `git log` command.
(Git.commit): Ditto.
(Git.commits): Ditto.
(Git.checkout): Append -- to `git checkout` command.

Canonical link: https://commits.webkit.org/251191@main

Modified Paths

Diff

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295095 => 295096)


--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-01 17:32:05 UTC (rev 295095)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-01 17:41:12 UTC (rev 295096)
@@ -29,7 +29,7 @@
 
 setup(
     name='webkitscmpy',
-    version='4.15.1',
+    version='4.15.2',
     description='Library designed to interact with git and svn repositories.',
     long_description=readme(),
     classifiers=[

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295095 => 295096)


--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-01 17:32:05 UTC (rev 295095)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-01 17:41:12 UTC (rev 295096)
@@ -46,7 +46,7 @@
         "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
     )
 
-version = Version(4, 15, 1)
+version = Version(4, 15, 2)
 
 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 (295095 => 295096)


--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-06-01 17:32:05 UTC (rev 295095)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py	2022-06-01 17:41:12 UTC (rev 295096)
@@ -129,7 +129,7 @@
                     kwargs = dict(encoding='utf-8')
                 self._last_populated[branch] = time.time()
                 log = subprocess.Popen(
-                    [self.repo.executable(), 'log', branch, '--no-decorate', '--date=unix'],
+                    [self.repo.executable(), 'log', branch, '--no-decorate', '--date=unix', '--'],
                     cwd=self.repo.root_path,
                     stdout=subprocess.PIPE,
                     stderr=subprocess.PIPE,
@@ -592,7 +592,7 @@
             # If the cache managed to convert the identifier to a hash, we can skip some computation
             if hash:
                 log = run(
-                    [self.executable(), 'log', hash] + log_format,
+                    [self.executable(), 'log', hash] + log_format + ['--'],
                     cwd=self.root_path,
                     capture_output=True,
                     encoding='utf-8',
@@ -615,7 +615,7 @@
                 if identifier > base_count:
                     raise self.Exception('Identifier {} cannot be found on the specified branch in the current checkout'.format(identifier))
                 log = run(
-                    [self.executable(), 'log', '{}~{}'.format(branch or 'HEAD', base_count - identifier)] + log_format,
+                    [self.executable(), 'log', '{}~{}'.format(branch or 'HEAD', base_count - identifier)] + log_format + ['--'],
                     cwd=self.root_path,
                     capture_output=True,
                     encoding='utf-8',
@@ -636,7 +636,7 @@
             if branch and tag:
                 raise ValueError('Cannot define both tag and branch')
 
-            log = run([self.executable(), 'log', branch or tag] + log_format, cwd=self.root_path, capture_output=True, encoding='utf-8')
+            log = run([self.executable(), 'log', branch or tag] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8')
             if log.returncode:
                 raise self.Exception("Failed to retrieve commit information for '{}'".format(branch or tag))
 
@@ -643,7 +643,7 @@
         # Determine the `git log` output for a given hash
         else:
             hash = Commit._parse_hash(hash, do_assert=True)
-            log = run([self.executable(), 'log', hash or 'HEAD'] + log_format, cwd=self.root_path, capture_output=True, encoding='utf-8')
+            log = run([self.executable(), 'log', hash or 'HEAD'] + log_format + ['--'], cwd=self.root_path, capture_output=True, encoding='utf-8')
             if log.returncode:
                 raise self.Exception("Failed to retrieve commit information for '{}'".format(hash or 'HEAD'))
 
@@ -744,7 +744,7 @@
         try:
             log = None
             log = subprocess.Popen(
-                [self.executable(), 'log', '--format=fuller', '--no-decorate', '--date=unix', '{}...{}'.format(end.hash, begin.hash)],
+                [self.executable(), 'log', '--format=fuller', '--no-decorate', '--date=unix', '{}...{}'.format(end.hash, begin.hash), '--'],
                 cwd=self.root_path,
                 stdout=subprocess.PIPE,
                 stderr=subprocess.PIPE,
@@ -907,7 +907,7 @@
             ).returncode else self.commit()
 
         return None if run(
-            [self.executable(), 'checkout'] + [self._to_git_ref(argument)] + log_arg,
+            [self.executable(), 'checkout', self._to_git_ref(argument)] + log_arg + ['--'],
             cwd=self.root_path,
         ).returncode else self.commit()
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to