<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>242176</bug_id>
          
          <creation_ts>2022-06-30 04:43:15 -0700</creation_ts>
          <short_desc>[GLib] Tools/glib/apply-build-revision-to-files.py fails on Git worktrees</short_desc>
          <delta_ts>2022-06-30 07:48:17 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Tools / Tests</component>
          <version>WebKit Local Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords>InRadar</keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          <blocked>242191</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Adrian Perez">aperez</reporter>
          <assigned_to name="Adrian Perez">aperez</assigned_to>
          <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1879318</commentid>
    <comment_count>0</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-30 04:43:15 -0700</bug_when>
    <thetext>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 &quot;/app/webkit/Tools/glib/apply-build-revision-to-files.py&quot;, line 106, in &lt;module&gt;
    sys.exit(main(sys.argv[1:]))
  File &quot;/app/webkit/Tools/glib/apply-build-revision-to-files.py&quot;, line 78, in main
    build_revision = get_build_revision()
  File &quot;/app/webkit/Tools/glib/apply-build-revision-to-files.py&quot;, line 73, in get_build_revision
    revision = &quot;r%s&quot; % subprocess.check_output((&quot;svnversion&quot;), stderr=devnull).decode(&apos;utf-8&apos;).strip()
  File &quot;/usr/lib/python3.9/subprocess.py&quot;, line 424, in check_output
    return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
  File &quot;/usr/lib/python3.9/subprocess.py&quot;, line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File &quot;/usr/lib/python3.9/subprocess.py&quot;, line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File &quot;/usr/lib/python3.9/subprocess.py&quot;, line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: &apos;svnversion&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879319</commentid>
    <comment_count>1</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-30 04:44:55 -0700</bug_when>
    <thetext>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.)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879321</commentid>
    <comment_count>2</comment_count>
    <who name="Adrian Perez">aperez</who>
    <bug_when>2022-06-30 04:52:47 -0700</bug_when>
    <thetext>Pull request: https://github.com/WebKit/WebKit/pull/1942</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879333</commentid>
    <comment_count>3</comment_count>
    <who name="EWS">ews-feeder</who>
    <bug_when>2022-06-30 05:37:32 -0700</bug_when>
    <thetext>Committed 251991@main (56353fd580f3): &lt;https://commits.webkit.org/251991@main&gt;

Reviewed commits have been landed. Closing PR #1942 and removing active labels.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1879334</commentid>
    <comment_count>4</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-06-30 05:38:13 -0700</bug_when>
    <thetext>&lt;rdar://problem/96212219&gt;</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>