Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: ab64ba1375a213ba5f233654164843ee7b7e59ed
https://github.com/WebKit/WebKit/commit/ab64ba1375a213ba5f233654164843ee7b7e59ed
Author: Jonathan Bedard <[email protected]>
Date: 2026-03-09 (Mon, 09 Mar 2026)
Changed paths:
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/__init__.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/diff.py
A
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/editor_diff.py
A Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/html_diff.py
A
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/terminal_diff.py
M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py
Log Message:
-----------
[webkitscmpy] Add a diff viewer
https://bugs.webkit.org/show_bug.cgi?id=309038
rdar://171589298
Reviewed by Brianna Fan.
Add a diff viewer, inspired by pretty-diff originally used to locally inspect
Subversion
patches before uploading them.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py: Add
'diff' sub-program.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/__init__.py:
Added.
(Diff.viewers): Return all viewers available in the current program.
(Diff.parser): Parse command line arguments to the 'diff' sub-command.
(Diff.default_viewer): Return the default diff viewer for a given repository.
(Diff.main): Display a formatted diff for the provided arguments.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/diff.py: Added.
(DiffMeta): Meta class allowing the transparent printing of Diff classes.
(DiffBase): Base-class for all diff viewers.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/editor_diff.py:
Added.
(EditorDiff): Diff viewer based on an existing webkitcorepy editor. Note that
not all editors
make good diff viewers.
(SublimeDiff):
(VSDiff):
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/html_diff.py:
Added.
(HTMLDiff): Build a self-contained webpage containing a diff.
(Type): Track different file-modification modes.
(Section): Edits for a file.
(title_for): Return a section title for a given set of files.
(commit_message_line): Format commit messages in a diff.
(__init__):
(_start_div): Enter a new div.
(_end_div): Close the most recent div.
(add_line): Add line from diff.
(__enter__): Start writing to the generated HTML file.
(__exit__): Open html diff file, either from a local webserver in blocking mode
or directly
from a file. If in blocking mode, await either terminal input or a becon
message as the user
navigates away from the generated webpage.
*
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/diff/terminal_diff.py:
Added.
(TerminalDiff): View a paged color-coded diff within the terminal
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/git_unittest.py:
Canonical link: https://commits.webkit.org/308932@main
To unsubscribe from these emails, change your notification settings at
https://github.com/WebKit/WebKit/settings/notifications