Title: [295288] trunk/Tools/Scripts
Revision
295288
Author
jbed...@apple.com
Date
2022-06-06 08:53:17 -0700 (Mon, 06 Jun 2022)

Log Message

`git webkit setup` hard codes the path to Xcode in .git/hooks/pre-commit
https://bugs.webkit.org/show_bug.cgi?id=241284
<rdar://problem/94435371>

Reviewed by Tim Horton.

* Tools/Scripts/libraries/webkitscmpy/setup.py: Bump version.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg:
* Tools/Scripts/hooks/pre-commit: Use `git` instead of git path.
* Tools/Scripts/hooks/prepare-commit-msg: Ditto.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py:
(Setup.git): Remove `git` executable path.

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

Modified Paths

Diff

Modified: trunk/Tools/Scripts/hooks/pre-commit (295287 => 295288)


--- trunk/Tools/Scripts/hooks/pre-commit	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/hooks/pre-commit	2022-06-06 15:53:17 UTC (rev 295288)
@@ -12,7 +12,7 @@
     try:
         lines = []
         for line in subprocess.check_output(
-            ['{{ git }}', 'diff', '--name-only'] + (['--staged'] if staged else []),
+            ['git', 'diff', '--name-only'] + (['--staged'] if staged else []),
             encoding='utf-8',
         ).splitlines():
             if line:
@@ -33,6 +33,6 @@
 if project_files:
     code = subprocess.run([os.path.join(SCRIPTS, 'sort-Xcode-project-file')] + project_files).returncode
     if staged:
-        code += subprocess.run(['{{ git }}', 'add'] + project_files).returncode
+        code += subprocess.run(['git', 'add'] + project_files).returncode
     sys.exit(code)
 sys.exit(0)

Modified: trunk/Tools/Scripts/hooks/prepare-commit-msg (295287 => 295288)


--- trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/hooks/prepare-commit-msg	2022-06-06 15:53:17 UTC (rev 295288)
@@ -13,7 +13,7 @@
 
 def message_from_staged_changelogs():
     try:
-        diff = subprocess.check_output(['{{ git }}', 'diff', '--staged'])
+        diff = subprocess.check_output(['git', 'diff', '--staged'])
     except subprocess.CalledProcessError:
         return ''
 
@@ -84,7 +84,7 @@
     with open(file_name, 'w') as commit_message_file:
         if sha:
             commit_message_file.write(subprocess.check_output(
-                ['{{ git }}', 'log', 'HEAD', '-1', '--pretty=format:%B'],
+                ['git', 'log', 'HEAD', '-1', '--pretty=format:%B'],
                 **(dict(encoding='utf-8') if sys.version_info > (3, 5) else dict())
             ))
         else:
@@ -100,7 +100,7 @@
                 commit_message_file.write('# {}\n'.format(line))
             commit_message_file.write('\n')
         for line in subprocess.check_output(
-            ['{{ git }}', 'status'],
+            ['git', 'status'],
             **(dict(encoding='utf-8') if sys.version_info > (3, 5) else dict())
         ).splitlines():
             commit_message_file.write('# {}\n'.format(line))

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/setup.py (295287 => 295288)


--- trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/setup.py	2022-06-06 15:53:17 UTC (rev 295288)
@@ -29,7 +29,7 @@
 
 setup(
     name='webkitscmpy',
-    version='4.15.2',
+    version='4.15.3',
     description='Library designed to interact with git and svn repositories.',
     long_description=readme(),
     classifiers=[

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py (295287 => 295288)


--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/__init__.py	2022-06-06 15:53:17 UTC (rev 295288)
@@ -46,7 +46,7 @@
         "Please install webkitcorepy with `pip install webkitcorepy --extra-index-url <package index URL>`"
     )
 
-version = Version(4, 15, 2)
+version = Version(4, 15, 3)
 
 AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
 AutoInstall.register(Package('jinja2', Version(2, 11, 3)))

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py (295287 => 295288)


--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/setup.py	2022-06-06 15:53:17 UTC (rev 295288)
@@ -279,7 +279,6 @@
                 with open(source_path, 'r') as f:
                     from jinja2 import Template
                     contents = Template(f.read()).render(
-                        git=local.Git.executable(),
                         location=source_path,
                         python=os.path.basename(sys.executable),
                     )

Modified: trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg (295287 => 295288)


--- trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg	2022-06-06 15:22:21 UTC (rev 295287)
+++ trunk/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/hooks/prepare-commit-msg	2022-06-06 15:53:17 UTC (rev 295288)
@@ -16,7 +16,7 @@
     with open(file_name, 'w') as commit_message_file:
         if sha:
             commit_message_file.write(subprocess.check_output(
-                ['{{ git }}', 'log', 'HEAD', '-1', '--pretty=format:%B'],
+                ['/usr/bin/git', 'log', 'HEAD', '-1', '--pretty=format:%B'],
                 **(dict(encoding='utf-8') if sys.version_info > (3, 5) else dict())
             ))
         else:
@@ -32,7 +32,7 @@
                 commit_message_file.write('# {}\n'.format(line))
             commit_message_file.write('\n')
         for line in subprocess.check_output(
-            ['{{ git }}', 'status'],
+            ['/usr/bin/git', 'status'],
             **(dict(encoding='utf-8') if sys.version_info > (3, 5) else dict())
         ).splitlines():
             commit_message_file.write('# {}\n'.format(line))
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to