[llvm] [revert_checker] replace Phabricator URIs with GitHub URIs (PR #92102)

via llvm-commits llvm-commits at lists.llvm.org
Tue May 14 04:38:33 PDT 2024


https://github.com/inglorion created https://github.com/llvm/llvm-project/pull/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.

>From 9184466ed86025197976274e418d014a58cbd7cb Mon Sep 17 00:00:00 2001
From: Bob Haarman <llvm at inglorion.net>
Date: Tue, 14 May 2024 11:34:12 +0000
Subject: [PATCH] [revert_checker] replace Phabricator URIs with GitHub URIs

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.
---
 llvm/utils/revert_checker.py | 13 +++++--------
 1 file changed, 5 insertions(+), 8 deletions(-)

diff --git a/llvm/utils/revert_checker.py b/llvm/utils/revert_checker.py
index 34395a6fe5057..33e0d1e13f383 100755
--- a/llvm/utils/revert_checker.py
+++ b/llvm/utils/revert_checker.py
@@ -284,16 +284,13 @@ def _main() -> None:
                 all_reverts.append(revert)
 
     for revert in all_reverts:
-        sha_fmt = (
-            f"https://reviews.llvm.org/rG{revert.sha}"
+        sha_prefix = (
+            "https://github.com/llvm/llvm-project/commit/"
             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
+            else ""
         )
+        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