[webkit-dev] Identifiers in Log and Blame

Jonathan Bedard jbedard at apple.com
Tue Aug 17 11:40:16 PDT 2021

GitHub has a native blame viewer, https://github.com/WebKit/WebKit/blame/main/Makefile <https://github.com/WebKit/WebKit/blame/main/Makefile>, which doesn’t display any commit string, but seems to display significantly more useful information than what the equivalent trac view is https://trac.webkit.org/browser/webkit/trunk/Makefile?annotate=blame&rev=281147 <https://trac.webkit.org/browser/webkit/trunk/Makefile?annotate=blame&rev=281147>. Given that Trac’s view makes it difficult to copy revision numbers and would instead tend to route a user towards following a link to the blamed commit, just like GitHub, I don’t think trying to integrate this solution to GitHub’s blame UI makes sense.  Also, the technical challenges of doing so are likely to be considerable.


> On Aug 17, 2021, at 11:18 AM, Ryosuke Niwa <ryosuke.niwa at gmail.com> wrote:
> Seems like a good improvement but I really don't use command line tools to see my blame. What I need is this getting applied to a online tools like trac and GitHub.
> On Tue, Aug 17, 2021 at 10:57 AM Jonathan Bedard via webkit-dev <webkit-dev at lists.webkit.org <mailto:webkit-dev at lists.webkit.org>> wrote:
> Hi folks,
> As we move towards using Git as our version control system, more services and scripts will be using identifiers instead of revisions or hashes.  Already, build.webkit.org <http://build.webkit.org/>, results.webkit.org <http://results.webkit.org/> and ews-build.webkit.org <http://results.webkit.org/> all display identifiers alongside revisions.  Early in the transition process, we added the git-webkit find command, which converts between hashes, revisions and identifiers.  Recently, we added the git-webkit log and git-webkit blame commands to better support identifiers and native Git checkouts.
> git-webkit log is a wrapper around git log or svn log (depending on your checkout) and annotates the output of those commands with identifiers and revisions. git-webkit log passes the arguments you provide it to your native source code management system, it’s output looks something like this:
> commit 240602 at main (fe5476762fc34d2a5547b7d2d8116faa7275acd7, r281148)
> Author: Eric Hutchison <ehutchison at apple.com <mailto:ehutchison at apple.com>>
> Date:   Tue Aug 17 17:46:39 2021 +0000
>     [Monterey wk2 Release] performance-api/paint-timing/paint-timing-with-worker.html is a flaky crash.
>     rdar://82036119 <>.
> ...
> git-webkit blame is a wrapper around git blame or svn blame (again, depending on your checkout) and also annotates the output of these commands with identifiers:
> 230258 at main (Keith Rollin    2020-10-08 19:10:32 +0000  1) MODULES = Source Tools
> 184786 at main (Jonathan Bedard 2017-02-02 18:42:02 +0000  2) 
> 229628 at main (Keith Rollin    2020-09-22 18:37:51 +0000  3) define build_target_for_each_module
> 229628 at main (Keith Rollin    2020-09-22 18:37:51 +0000  4)      for dir in $(MODULES); do \
> 229628 at main (Keith Rollin    2020-09-22 18:37:51 +0000  5)              ${MAKE} $@ -C $$dir PATH_FROM_ROOT=$(PATH_FROM_ROOT)/$${dir}; \
> 229628 at main (Keith Rollin    2020-09-22 18:37:51 +0000  6)              exit_status=$$?; \
> 229628 at main (Keith Rollin    2020-09-22 18:37:51 +0000  7)              [ $$exit_status -ne 0 ] && exit $$exit_status; \
> 229628 at main (Keith Rollin    2020-09-22 18:37:51 +0000  8)      done; true
> 229628 at main (Keith Rollin    2020-09-22 18:37:51 +0000  9) endef
> ...
> Both commands can switch the commit representation they display with the --identifier, --hash and --revision options.
> Additionally, for those using Git checkouts, the conversion from Subversion revisions to Git hashes no longer requires your checkout to be configured with git-svn. Contributors may find that something like git checkout r281146 satisfies whatever need they have to interact with Subversion from Git.
> All of this has been landed on trunk/main as of r280864/240404 at main.
> Jonathan
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org <mailto:webkit-dev at lists.webkit.org>
> https://lists.webkit.org/mailman/listinfo/webkit-dev <https://lists.webkit.org/mailman/listinfo/webkit-dev>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20210817/07c398f0/attachment.htm>

More information about the webkit-dev mailing list