[llvm] 9def85f - [revert_checker] replace Phabricator URIs with GitHub URIs (#92102)

via llvm-commits llvm-commits at lists.llvm.org
Mon May 20 09:35:12 PDT 2024


Author: inglorion
Date: 2024-05-20T10:35:08-06:00
New Revision: 9def85f99aba66fb5a266d2abf60c3802ff13c6a

URL: https://github.com/llvm/llvm-project/commit/9def85f99aba66fb5a266d2abf60c3802ff13c6a
DIFF: https://github.com/llvm/llvm-project/commit/9def85f99aba66fb5a266d2abf60c3802ff13c6a.diff

LOG: [revert_checker] replace Phabricator URIs with GitHub URIs (#92102)

LLVM is now using GitHub. This change makes revert_checker.py -u
generate commit links that go to GitHub, instead of the old Phabricator
URIs.

Added: 
    

Modified: 
    llvm/utils/revert_checker.py

Removed: 
    


################################################################################
diff  --git a/llvm/utils/revert_checker.py b/llvm/utils/revert_checker.py
index 34395a6fe5057..da80bdff86857 100755
--- a/llvm/utils/revert_checker.py
+++ b/llvm/utils/revert_checker.py
@@ -283,17 +283,12 @@ def _main() -> None:
                 seen_reverts.add(revert)
                 all_reverts.append(revert)
 
+    sha_prefix = (
+        "https://github.com/llvm/llvm-project/commit/" if opts.review_url else ""
+    )
     for revert in all_reverts:
-        sha_fmt = (
-            f"https://reviews.llvm.org/rG{revert.sha}"
-            if opts.review_url
-            else revert.sha
-        )
-        reverted_sha_fmt = (
-            f"https://reviews.llvm.org/rG{revert.reverted_sha}"
-            if opts.review_url
-            else revert.reverted_sha
-        )
+        sha_fmt = f"{sha_prefix}{revert.sha}"
+        reverted_sha_fmt = f"{sha_prefix}{revert.reverted_sha}"
         print(f"{sha_fmt} claims to revert {reverted_sha_fmt}")
 
 


        


More information about the llvm-commits mailing list