[PATCH] D122772: [Utils] Add URL formatting for revert_checker

George Burgess IV via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 30 17:31:06 PDT 2022


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGa4b56d762097: [Utils] Add URL formatting for revert_checker (authored by CrystalSplitter, committed by gbiv).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122772/new/

https://reviews.llvm.org/D122772

Files:
  llvm/utils/revert_checker.py


Index: llvm/utils/revert_checker.py
===================================================================
--- llvm/utils/revert_checker.py
+++ llvm/utils/revert_checker.py
@@ -237,6 +237,9 @@
   parser.add_argument(
       'root', nargs='+', help='Root(s) to search for commits from.')
   parser.add_argument('--debug', action='store_true')
+  parser.add_argument(
+      '-u', '--review_url', action='store_true',
+      help='Format SHAs as llvm review URLs')
   opts = parser.parse_args()
 
   logging.basicConfig(
@@ -257,7 +260,11 @@
         all_reverts.append(revert)
 
   for revert in all_reverts:
-    print(f'{revert.sha} claims to revert {revert.reverted_sha}')
+    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)
+    print(f'{sha_fmt} claims to revert {reverted_sha_fmt}')
 
 
 if __name__ == '__main__':


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122772.419299.patch
Type: text/x-patch
Size: 1023 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220331/4d559203/attachment.bin>


More information about the llvm-commits mailing list