WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
242176
[GLib] Tools/glib/apply-build-revision-to-files.py fails on Git worktrees
https://bugs.webkit.org/show_bug.cgi?id=242176
Summary
[GLib] Tools/glib/apply-build-revision-to-files.py fails on Git worktrees
Adrian Perez
Reported
2022-06-30 04:43:15 PDT
When used from a Git worktree, after a fresh clone from the GitHub repository, it tries to fall back to using Subversion for guessing the revision; but we do not use Subversion anymore: Traceback (most recent call last): File "/app/webkit/Tools/glib/apply-build-revision-to-files.py", line 106, in <module> sys.exit(main(sys.argv[1:])) File "/app/webkit/Tools/glib/apply-build-revision-to-files.py", line 78, in main build_revision = get_build_revision() File "/app/webkit/Tools/glib/apply-build-revision-to-files.py", line 73, in get_build_revision revision = "r%s" % subprocess.check_output(("svnversion"), stderr=devnull).decode('utf-8').strip() File "/usr/lib/python3.9/subprocess.py", line 424, in check_output return run(*popenargs, stdout=PIPE, timeout=timeout, check=True, File "/usr/lib/python3.9/subprocess.py", line 505, in run with Popen(*popenargs, **kwargs) as process: File "/usr/lib/python3.9/subprocess.py", line 951, in __init__ self._execute_child(args, executable, preexec_fn, close_fds, File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child raise child_exception_type(errno_num, err_msg, err_filename) FileNotFoundError: [Errno 2] No such file or directory: 'svnversion'
Attachments
Add attachment
proposed patch, testcase, etc.
Adrian Perez
Comment 1
2022-06-30 04:44:55 PDT
This happens because in a worktree the “.git” path is NOT a directory, but instead a regular text file which contains the path of the actual repository location: % cat .git gitdir: /home/aperez/devel/WebKit/.git/worktrees/WebKit-2.36 (This is how worktrees manage to share blobs, refs, branches and all with their “parent” repository and be more disk-space efficient.)
Adrian Perez
Comment 2
2022-06-30 04:52:47 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/1942
EWS
Comment 3
2022-06-30 05:37:32 PDT
Committed
251991@main
(56353fd580f3): <
https://commits.webkit.org/251991@main
> Reviewed commits have been landed. Closing PR #1942 and removing active labels.
Radar WebKit Bug Importer
Comment 4
2022-06-30 05:38:13 PDT
<
rdar://problem/96212219
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug