[llvm] r368726 - [util] Allow callsigns when running git llvm revert

Jordan Rupprecht via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 10:19:53 PDT 2019


Author: rupprecht
Date: Tue Aug 13 10:19:53 2019
New Revision: 368726

URL: http://llvm.org/viewvc/llvm-project?rev=368726&view=rev
Log:
[util] Allow callsigns when running git llvm revert

Modified:
    llvm/trunk/utils/git-svn/git-llvm

Modified: llvm/trunk/utils/git-svn/git-llvm
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/git-svn/git-llvm?rev=368726&r1=368725&r2=368726&view=diff
==============================================================================
--- llvm/trunk/utils/git-svn/git-llvm (original)
+++ llvm/trunk/utils/git-svn/git-llvm Tue Aug 13 10:19:53 2019
@@ -556,9 +556,9 @@ def cmd_revert(args):
     if len(open_files) > 0:
         die("Found open files. Please stash and then revert.\n" + open_files)
 
-    # If the revision looks like rNNNNNN, use that. Otherwise, look for it in
-    # the git commit.
-    svn_match = re.match('^r(\d{5,7})$', args.revision)
+    # If the revision looks like rNNNNNN (or with a callsign, e.g. rLLDNNNNNN),
+    # use that. Otherwise, look for it in the git commit.
+    svn_match = re.match('^r[A-Z]*(\d{5,7})$', args.revision)
     if svn_match:
         # If the revision looks like rNNNNNN, use that as the svn revision, and
         # grep through git commits to find which one corresponds to that svn




More information about the llvm-commits mailing list