Skip to content

Commit 9def85f

Browse files
authored
[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.
1 parent 2a2b27d commit 9def85f

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

llvm/utils/revert_checker.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -283,17 +283,12 @@ def _main() -> None:
283283
seen_reverts.add(revert)
284284
all_reverts.append(revert)
285285

286+
sha_prefix = (
287+
"https://github.com/llvm/llvm-project/commit/" if opts.review_url else ""
288+
)
286289
for revert in all_reverts:
287-
sha_fmt = (
288-
f"https://reviews.llvm.org/rG{revert.sha}"
289-
if opts.review_url
290-
else revert.sha
291-
)
292-
reverted_sha_fmt = (
293-
f"https://reviews.llvm.org/rG{revert.reverted_sha}"
294-
if opts.review_url
295-
else revert.reverted_sha
296-
)
290+
sha_fmt = f"{sha_prefix}{revert.sha}"
291+
reverted_sha_fmt = f"{sha_prefix}{revert.reverted_sha}"
297292
print(f"{sha_fmt} claims to revert {reverted_sha_fmt}")
298293

299294

0 commit comments

Comments
 (0)