[Webkit-unassigned] [Bug 138627] New: webkit-patch --suggest-reviewers is broken with newer versions of git
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Nov 11 13:29:25 PST 2014
https://bugs.webkit.org/show_bug.cgi?id=138627
Bug ID: 138627
Summary: webkit-patch --suggest-reviewers is broken with newer
versions of git
Classification: Unclassified
Product: WebKit
Version: 528+ (Nightly build)
Hardware: Unspecified
OS: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
Assignee: webkit-unassigned at lists.webkit.org
Reporter: ddkilzer at webkit.org
CC: ap at webkit.org, dbates at webkit.org,
jake.nielsen.webkit at gmail.com
The --suggest-reviewers feature of webkit-patch is broken on newer versions of git when any commit being considered has a single ChangeLog and that ChangeLog is the first file in the list of changed files for a commit.
In Tools/Scripts/webkitpy/common/checkout/scm/git.py we have:
def _changes_files_for_commit(self, git_commit):
# --pretty="format:" makes git show not print the commit log header,
changed_files = self._run_git(["show", "--pretty=format:", "--name-only", git_commit]).splitlines()
# instead it just prints a blank line at the top, so we skip the blank line:
return changed_files[1:]
And let's say we're looking at 0b09603c479afc9ce9256ecbb36cb18e149fe81c (r174332):
$ git show --pretty=format: --name-only 0b09603c479afc9ce9256ecbb36cb18e149fe81c
Source/WebCore/ChangeLog
Source/WebCore/bindings/gobject/WebKitDOMPrivate.cpp
Source/WebCore/css/CSSStyleSheet.h
Source/WebCore/css/StyleSheet.h
Source/WebCore/dom/Document.cpp
Source/WebCore/dom/DocumentStyleSheetCollection.cpp
Source/WebCore/dom/ProcessingInstruction.cpp
Source/WebCore/inspector/InspectorCSSAgent.cpp
Source/WebCore/xml/XSLStyleSheet.h
The existing code will skip 'Source/WebCore/ChangeLog' from the list of files, thus causing --suggest-reviewers to break:
Traceback (most recent call last):
File "./Tools/Scripts/webkit-patch", line 84, in <module>
main()
File "./Tools/Scripts/webkit-patch", line 79, in main
WebKitPatch(os.path.abspath(__file__)).main()
File "./Tools/Scripts/webkitpy/tool/multicommandtool.py", line 305, in main
result = command.check_arguments_and_execute(options, args, self)
File "./Tools/Scripts/webkitpy/tool/multicommandtool.py", line 123, in check_arguments_and_execute
return self.execute(options, args, tool) or 0
File "./Tools/Scripts/webkitpy/tool/commands/abstractsequencedcommand.py", line 54, in execute
self._sequence.run_and_handle_errors(tool, options, state)
File "./Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 73, in run_and_handle_errors
self._run(tool, options, state)
File "./Tools/Scripts/webkitpy/tool/commands/stepsequence.py", line 67, in _run
step(tool, options).run(state)
File "./Tools/Scripts/webkitpy/tool/steps/suggestreviewers.py", line 45, in run
reviewers = self._tool.checkout().suggested_reviewers(self._options.git_commit, self._changed_files(state))[:5]
File "./Tools/Scripts/webkitpy/common/checkout/checkout.py", line 144, in suggested_reviewers
commit_infos = sorted(self.recent_commit_infos_for_files(changed_files), key=lambda info: info.revision(), reverse=True)
File "./Tools/Scripts/webkitpy/common/checkout/checkout.py", line 144, in <lambda>
commit_infos = sorted(self.recent_commit_infos_for_files(changed_files), key=lambda info: info.revision(), reverse=True)
AttributeError: 'NoneType' object has no attribute 'revision'
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-unassigned/attachments/20141111/b704db9d/attachment-0002.html>
More information about the webkit-unassigned
mailing list