Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 761e61f4ad964e587d617b87afec33e7a3570a9e
      
https://github.com/WebKit/WebKit/commit/761e61f4ad964e587d617b87afec33e7a3570a9e
  Author: Sam Sneddon <[email protected]>
  Date:   2026-08-17 (Mon, 17 Aug 2026)

  Changed paths:
    M Tools/Scripts/git-webkit
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py
    M 
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/__init__.py
    M 
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/message.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py
    M 
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py
    M Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py

  Log Message:
  -----------
  Support both Canonical-link and Canonical link while doing canonicalisation
https://bugs.webkit.org/show_bug.cgi?id=316952
rdar://179414185

Reviewed by Elliott Williams.

To migrate from "Canonical link" to "Canonical-link", the
canonicalisation script must handle both variants during the
transition; when we re-canonicalise following a merge we may end up
changing which form a given change has.

We introduce a IdentifierTrailer class with support for aliases,
allowing us to change which variant is canonical in the future.

Trailer configuration now passes through the
WEBKITSCMPY_CANONICALIZE_IDENTIFIER_TRAILER environment variable
instead of command-line arguments, avoiding the need to properly
escape structured data when passing between process invocations.

* Tools/Scripts/git-webkit:
Import and use IdentifierTrailer for identifier_template.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/mocks/local/git.py:
(Git.filter_branch): Change signature to use identifier_trailer parameter, 
parse from environment variable.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/__init__.py:
(main): Import IdentifierTrailer, convert string templates via from_template.
* 
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/__init__.py:
(IdentifierTrailer): Added.
(IdentifierTrailer.from_template): Added.
(IdentifierTrailer.from_json): Added.
(IdentifierTrailer.to_json): Added.
(Canonicalize.main): Updated to pass trailer via environment variable.
* 
Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/canonicalize/message.py:
(main): Updated for IdentifierTrailer integration.
(rewrite_message): Refactored to accept IdentifierTrailer.
(rewrite_message.is_identifier_trailer): Added helper.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/program/land.py:
(Land.main): Updated for IdentifierTrailer integration.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/canonicalize_unittest.py:
(TestCanonicalizeProgam.test_formated_identifier): Drive-by: spelling.
(TestCanonicalizeProgam.test_identifier_trailer_dataclass): Added.
(TestCanonicalizeProgam.test_existing_identifier): Drive-by: spelling.
(TestCanonicalizeProgam.test_existing_canonical_link_alias): Added.
(TestCanonicalizeProgam.test_git_svn): Drive-by: spelling.
(TestCanonicalizeProgam.test_git_svn_existing): Drive-by: spelling.
(TestCanonicalizeProgam.test_git_svn_existing_merge_queue): Drive-by: spelling.
(TestCanonicalizeProgam.test_branch_commits): Drive-by: spelling.
(TestCanonicalizeProgam.test_number): Drive-by: spelling.
(TestCanonicalizeProgam.test_alternate_trailer): Drive-by: spelling.
(TestCanonicalizeMessage.assert_canonicalized_commit_message): Updated.
(TestCanonicalizeMessage.test_canonical_link_alias): Added.
(TestCanonicalizeMessage.test_canonical_link_alias_mirror): Added.
(TestCanonicalizeMessage.test_canonical_link_both_spellings): Added.
(TestCanonicalizeMessage.test_no_alias_match_appends_new_trailer): Added.
(TestCanonicalizeMessage.test_three_existing_canonical_link_trailers): Added.
(TestCanonicalizeMessage.test_canonical_link_alias_separated_by_other_trailer): 
Added.
(TestCanonicalizeMessage.test_canonical_link_alias_followed_by_other_trailer): 
Added.
(TestCanonicalizeMessage.test_canonical_link_alias_with_git_svn_id): Added.
(TestCanonicalizeMessage.test_canonical_link_alias_blank_before_git_svn_id): 
Added.
(TestCanonicalizeMessage.test_three_existing_identifier_trailers): Added.
(TestCanonicalizeMessage.test_identifier_trailer_separated_by_other_trailer): 
Added.
(TestCanonicalizeMessage.test_identifier_trailer_followed_by_other_trailer): 
Added.
(TestCanonicalizeMessage.test_identifier_with_git_svn_id): Added.
(TestCanonicalizeMessage.test_identifier_blank_before_git_svn_id): Added.
(TestIdentifierTrailer): Added.
(TestIdentifierTrailer.test_from_template_fields): Added.
(TestIdentifierTrailer.test_frozen): Added.
* Tools/Scripts/libraries/webkitscmpy/webkitscmpy/test/land_unittest.py:
(TestLand.test_canonicalize_with_identifier_trailer): Added.

Canonical link: https://commits.webkit.org/319313@main



To unsubscribe from these emails, change your notification settings at 
https://github.com/WebKit/WebKit/settings/notifications

Reply via email to