Bug 242176
| Summary: | [GLib] Tools/glib/apply-build-revision-to-files.py fails on Git worktrees | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Adrian Perez <aperez> |
| Component: | Tools / Tests | Assignee: | Adrian Perez <aperez> |
| Status: | RESOLVED FIXED | ||
| Severity: | Normal | CC: | webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Local Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 242191 | ||
Adrian Perez
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
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
Pull request: https://github.com/WebKit/WebKit/pull/1942
EWS
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
<rdar://problem/96212219>