<?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>240533</bug_id>
          
          <creation_ts>2022-05-17 12:44:03 -0700</creation_ts>
          <short_desc>[git-webkit] pr fails  (KeyError: &apos;e6896ffd9b1a4b6deae32a0098a870ef68f8bddf&apos;)</short_desc>
          <delta_ts>2023-01-05 16:05:03 -0800</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 Nightly Build</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>Unspecified</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>DUPLICATE</resolution>
          <dup_id>236812</dup_id>
          
          <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>239082</blocked>
          <everconfirmed>1</everconfirmed>
          <reporter name="Yury Semikhatsky">yurys</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>fujii</cc>
    
    <cc>jbedard</cc>
    
    <cc>olivier.blin</cc>
    
    <cc>webkit-bug-importer</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1869765</commentid>
    <comment_count>0</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2022-05-17 12:44:03 -0700</bug_when>
    <thetext>$ ./Tools/Scripts/git-webkit pr
Branch &apos;main&apos; set up to track remote branch &apos;main&apos; from &apos;origin&apos;.
Traceback (most recent call last):
  File &quot;./Tools/Scripts/git-webkit&quot;, line 69, in &lt;module&gt;
    sys.exit(program.main(
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py&quot;, line 147, in main
    return parsed.main(
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py&quot;, line 408, in main
    return cls.create_pull_request(repository, args, branch_point)
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py&quot;, line 237, in create_pull_request
    if repository.pull(rebase=True, branch=branch_point.branch):
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 935, in pull
    commit = self.commit() if self.is_svn or branch else None
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 650, in commit
    cached_identifier = self.cache.to_identifier(hash=hash, branch=branch) if self.cache else None
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 295, in to_identifier
    self.populate(branch=branch)
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 189, in populate
    self._fill(branch)
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 81, in _fill
    branch_point = int(self._hash_to_identifiers[self._ordered_commits[branch][0]].split(&apos;@&apos;)[0])
  File &quot;/home/yurys/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py&quot;, line 53, in __getitem__
    raise KeyError(keyname)
KeyError: &apos;e6896ffd9b1a4b6deae32a0098a870ef68f8bddf&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869766</commentid>
    <comment_count>1</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2022-05-17 12:44:35 -0700</bug_when>
    <thetext>`git show e6896ffd9b1a4b6deae32a0098a870ef68f8bddf` displays the commit in the local checkout.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869775</commentid>
    <comment_count>2</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2022-05-17 13:11:00 -0700</bug_when>
    <thetext>For some reason the scripts thought that the default_branch was master in my repo even though I don&apos;t have master there. Managed to fix it by running


git symbolic-ref refs/remotes/origin/HEAD refs/remotes/origin/main
 
Which added missing origin/HEAD reference.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1869777</commentid>
    <comment_count>3</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2022-05-17 13:12:29 -0700</bug_when>
    <thetext>Jonathan, I&apos;m fine with closing this bug since the problem is solved for me but perhaps it is something that `git-webkit setup` could handle?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870304</commentid>
    <comment_count>4</comment_count>
    <who name="Olivier Blin">olivier.blin</who>
    <bug_when>2022-05-19 01:27:42 -0700</bug_when>
    <thetext>This happened to me as well, after starting from an old git.webkit.org fork, and setting up a new origin remote for the github repo.

Thanks for the tip Yury.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870501</commentid>
    <comment_count>5</comment_count>
    <who name="Yury Semikhatsky">yurys</who>
    <bug_when>2022-05-19 12:31:04 -0700</bug_when>
    <thetext>(In reply to Olivier Blin from comment #4)
&gt; This happened to me as well, after starting from an old git.webkit.org fork,
&gt; and setting up a new origin remote for the github repo.
&gt; 
&gt; Thanks for the tip Yury.

Glad that it helped someone else. In my other checkout I got the same error and had to take extra measures to ensure the scripts do not try to pick master as the base branch. I did the following (not sure what was required and what not):

git branch -D master
git branch -rd origin/master
git config --unset branch.master.remote
git config --unset branch.master.merge
git config --global init.defaultBranch main

# Manually deleted &quot;master&quot; entry from
.git/identifiers.json</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870583</commentid>
    <comment_count>6</comment_count>
    <who name="Fujii Hironori">fujii</who>
    <bug_when>2022-05-19 17:50:02 -0700</bug_when>
    <thetext>Does https://github.com/WebKit/WebKit/commit/f0527ad4230c903a9a8a53aee3f3cc53bf1b9c33 solve this bug?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1870667</commentid>
    <comment_count>7</comment_count>
    <who name="Olivier Blin">olivier.blin</who>
    <bug_when>2022-05-20 02:03:35 -0700</bug_when>
    <thetext>I still get an error, but with an empty commit now.
I have to use --no-rebase to get it working.

$ LC_ALL=C ./Tools/Scripts/git-webkit pr -v --no-add
INFO:webkitscmpy:    Found 1 commit...
Branch &apos;main&apos; set up to track remote branch &apos;main&apos; from &apos;origin&apos;.
INFO:webkitscmpy:Using committed changes...
INFO:webkitscmpy:Rebasing &apos;eng/GLib-Fix-typo-in-WebKitUserMediaPermissionRequest-description&apos; on &apos;main&apos;...
From github.com:WebKit/WebKit
 * branch                      main       -&gt; FETCH_HEAD
Current branch eng/GLib-Fix-typo-in-WebKitUserMediaPermissionRequest-description is up to date.
Traceback (most recent call last):
  File &quot;./Tools/Scripts/git-webkit&quot;, line 69, in &lt;module&gt;
    sys.exit(program.main(
  File &quot;/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py&quot;, line 147, in main
    return parsed.main(
  File &quot;/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py&quot;, line 438, in main
    return cls.create_pull_request(repository, args, branch_point)
  File &quot;/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py&quot;, line 265, in create_pull_request
    if repository.pull(rebase=True, branch=branch_point.branch):
  File &quot;/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 946, in pull
    self.cache.clear(self.branch)
  File &quot;/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 213, in clear
    self._fill(branch)
  File &quot;/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py&quot;, line 80, in _fill
    branch_point = int(self._hash_to_identifiers[self._ordered_commits[branch][0]].split(&apos;@&apos;)[0])
  File &quot;/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py&quot;, line 53, in __getitem__
    raise KeyError(keyname)
KeyError: &apos;&apos;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1871546</commentid>
    <comment_count>8</comment_count>
    <who name="Radar WebKit Bug Importer">webkit-bug-importer</who>
    <bug_when>2022-05-24 12:44:15 -0700</bug_when>
    <thetext>&lt;rdar://problem/93852009&gt;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923311</commentid>
    <comment_count>9</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2023-01-05 16:04:48 -0800</bug_when>
    <thetext>This is https://bugs.webkit.org/show_bug.cgi?id=236812, I believe.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1923312</commentid>
    <comment_count>10</comment_count>
    <who name="Jonathan Bedard">jbedard</who>
    <bug_when>2023-01-05 16:05:03 -0800</bug_when>
    <thetext>

*** This bug has been marked as a duplicate of bug 236812 ***</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>