[PATCH] D64893: Ask confirmation when `git llvm push` will push multiple commits

James Y Knight via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 30 08:15:18 PDT 2019


jyknight accepted this revision.
jyknight marked an inline comment as done.
jyknight added inline comments.
This revision is now accepted and ready to land.


================
Comment at: llvm/utils/git-svn/git-llvm:30
+try:
+    exec("import __builtin__")  # To avoid IDE's grammar check
+except ImportError:
----------------
mehdi_amini wrote:
> jyknight wrote:
> > Instead of all the stuff with builtins, you can just do this:
> > 
> > ```
> > try:
> >     # Python 2
> >     input = raw_input
> > except NameError:
> >     input = input
> > ```
> > 
> > and then below just call input().
> I used `read_input` instead of `input` for the local variable name otherwise Python complains about using a variable before defining it, PTAL.
Yeah -- what I said would only work at the module level, because python variable binding semantics are different inside functions than outside.


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

https://reviews.llvm.org/D64893





More information about the llvm-commits mailing list