| Summary: | [git-webkit] pr fails (KeyError: 'e6896ffd9b1a4b6deae32a0098a870ef68f8bddf') | ||
|---|---|---|---|
| Product: | WebKit | Reporter: | Yury Semikhatsky <yurys> |
| Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
| Status: | RESOLVED DUPLICATE | ||
| Severity: | Normal | CC: | ap, Hironori.Fujii, jbedard, olivier.blin, webkit-bug-importer |
| Priority: | P2 | Keywords: | InRadar |
| Version: | WebKit Nightly Build | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Bug Depends on: | |||
| Bug Blocks: | 239082 | ||
`git show e6896ffd9b1a4b6deae32a0098a870ef68f8bddf` displays the commit in the local checkout. For some reason the scripts thought that the default_branch was master in my repo even though I don'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. Jonathan, I'm fine with closing this bug since the problem is solved for me but perhaps it is something that `git-webkit setup` could handle? 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. (In reply to Olivier Blin from comment #4) > 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. 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 "master" entry from .git/identifiers.json Does https://github.com/WebKit/WebKit/commit/f0527ad4230c903a9a8a53aee3f3cc53bf1b9c33 solve this bug? 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 'main' set up to track remote branch 'main' from 'origin'.
INFO:webkitscmpy:Using committed changes...
INFO:webkitscmpy:Rebasing 'eng/GLib-Fix-typo-in-WebKitUserMediaPermissionRequest-description' on 'main'...
From github.com:WebKit/WebKit
* branch main -> FETCH_HEAD
Current branch eng/GLib-Fix-typo-in-WebKitUserMediaPermissionRequest-description is up to date.
Traceback (most recent call last):
File "./Tools/Scripts/git-webkit", line 69, in <module>
sys.exit(program.main(
File "/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 147, in main
return parsed.main(
File "/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 438, in main
return cls.create_pull_request(repository, args, branch_point)
File "/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 265, in create_pull_request
if repository.pull(rebase=True, branch=branch_point.branch):
File "/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 946, in pull
self.cache.clear(self.branch)
File "/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 213, in clear
self._fill(branch)
File "/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 80, in _fill
branch_point = int(self._hash_to_identifiers[self._ordered_commits[branch][0]].split('@')[0])
File "/home/blino/vc/webkit.org/WebKit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py", line 53, in __getitem__
raise KeyError(keyname)
KeyError: ''
This is https://bugs.webkit.org/show_bug.cgi?id=236812, I believe. *** This bug has been marked as a duplicate of bug 236812 *** |
$ ./Tools/Scripts/git-webkit pr Branch 'main' set up to track remote branch 'main' from 'origin'. Traceback (most recent call last): File "./Tools/Scripts/git-webkit", line 69, in <module> sys.exit(program.main( File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py", line 147, in main return parsed.main( File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 408, in main return cls.create_pull_request(repository, args, branch_point) File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/pull_request.py", line 237, in create_pull_request if repository.pull(rebase=True, branch=branch_point.branch): File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 935, in pull commit = self.commit() if self.is_svn or branch else None File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 650, in commit cached_identifier = self.cache.to_identifier(hash=hash, branch=branch) if self.cache else None File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 295, in to_identifier self.populate(branch=branch) File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 189, in populate self._fill(branch) File "/home/yurys/webkit/Tools/Scripts/libraries/webkitscmpy/webkitscmpy/local/git.py", line 81, in _fill branch_point = int(self._hash_to_identifiers[self._ordered_commits[branch][0]].split('@')[0]) File "/home/yurys/webkit/Tools/Scripts/libraries/webkitcorepy/webkitcorepy/nested_fuzzy_dict.py", line 53, in __getitem__ raise KeyError(keyname) KeyError: 'e6896ffd9b1a4b6deae32a0098a870ef68f8bddf'