diff options
author | Mehdi Amini <joker.eph@gmail.com> | 2019-08-03 18:53:52 +0000 |
---|---|---|
committer | Mehdi Amini <joker.eph@gmail.com> | 2019-08-03 18:53:52 +0000 |
commit | 4197d1c3667b74d7ddec9c5055e7acf342a40b4f (patch) | |
tree | 97efd5026163329d7b8f0d0bfbb1e974a5ad9023 /llvm/utils/git-svn | |
parent | 43e60ba8c328d4d8cce9c3d249c5ef3a30f7eee6 (diff) | |
download | bcm5719-llvm-4197d1c3667b74d7ddec9c5055e7acf342a40b4f.tar.gz bcm5719-llvm-4197d1c3667b74d7ddec9c5055e7acf342a40b4f.zip |
Fixup r367321 "Ask confirmation when `git llvm push` will push multiple commits"
I unfortunately commited an obsolete revision in r367321 that didn't
have all the changes the reviewers suggested.
llvm-svn: 367761
Diffstat (limited to 'llvm/utils/git-svn')
-rwxr-xr-x | llvm/utils/git-svn/git-llvm | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/llvm/utils/git-svn/git-llvm b/llvm/utils/git-svn/git-llvm index 9fa0ae18e0a..43ec4fb06ef 100755 --- a/llvm/utils/git-svn/git-llvm +++ b/llvm/utils/git-svn/git-llvm @@ -27,11 +27,6 @@ import time assert sys.version_info >= (2, 7) try: - exec("import __builtin__") # To avoid IDE's grammar check -except ImportError: - import builtins - -try: dict.iteritems except AttributeError: # Python 3 @@ -107,12 +102,12 @@ def die(msg): def ask_confirm(prompt): # Python 2/3 compatibility try: - input = eval("__builtin__.raw_input") + read_input = raw_input except NameError: - input = builtins.input + read_input = input while True: - query = input('%s (y/N): ' % (prompt)) + query = read_input('%s (y/N): ' % (prompt)) if query.lower() not in ['y','n', '']: print('Expect y or n!') continue @@ -477,7 +472,7 @@ def cmd_push(args): # Ask confirmation if multiple commits are about to be pushed if len(revs) != 1: - if not ask_confirm("Are you sure?"): + if not ask_confirm("Are you sure you want to create %d commits?" % len(revs)): die("Aborting") for r in revs: |