Skip to content

Commit bf20281

Browse files
committed
[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.
1 parent e6d3a42 commit bf20281

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

llvm/utils/revert_checker.py

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -284,16 +284,11 @@ def _main() -> None:
284284
all_reverts.append(revert)
285285

286286
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
287+
sha_prefix = (
288+
"https://github.com/llvm/llvm-project/commit/" if opts.review_url else ""
296289
)
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)