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

via llvm-commits llvm-commits at lists.llvm.org
Thu May 16 04:08:46 PDT 2024


https://github.com/inglorion updated https://github.com/llvm/llvm-project/pull/92102

>From 94ddb2e74af65b7637bc3847e28c376c868a35e8 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 | 15 +++++----------
 1 file changed, 5 insertions(+), 10 deletions(-)

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