Skip to content
Permalink
Browse files
[git-webkit] Incorrect common directory when not in checkout root
https://bugs.webkit.org/show_bug.cgi?id=241487
<rdar://problem/95327557>

Patch by Jonathan Bedard <JonWBedard@gmail.com> on 2022-06-19
Reviewed by Michael Catanzaro.

* 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.common_directory): Run command from root_path.

Canonical link: https://commits.webkit.org/251667@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@295662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
JonWBedard authored and webkit-commit-queue committed Jun 19, 2022
1 parent 2327237 commit c34fd7f268f738a28b797a1b162db7c129f7db1f
Showing 3 changed files with 4 additions and 4 deletions.
@@ -29,7 +29,7 @@ def readme():

setup(
name='webkitscmpy',
version='5.0.2',
version='5.0.3',
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(5, 0, 2)
version = Version(5, 0, 3)

AutoInstall.register(Package('fasteners', Version(0, 15, 0)))
AutoInstall.register(Package('jinja2', Version(2, 11, 3)))
@@ -421,10 +421,10 @@ def root_path(self):
@property
@decorators.Memoize()
def common_directory(self):
result = run([self.executable(), 'rev-parse', '--git-common-dir'], cwd=self.path, capture_output=True, encoding='utf-8')
result = run([self.executable(), 'rev-parse', '--git-common-dir'], cwd=self.root_path, capture_output=True, encoding='utf-8')
if result.returncode:
return os.path.join(self.root_path, '.git')
return os.path.join(self.root_path, result.stdout.rstrip())
return os.path.abspath(os.path.join(self.root_path, result.stdout.rstrip()))

@property
@decorators.Memoize()

0 comments on commit c34fd7f

Please sign in to comment.