Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added confirmation to backport plus option to overrule. (--yes)

  • Loading branch information...
commit 30343217b279301a8040e1f152b7418b2560e634 1 parent b7ddb2a
@arjan arjan authored
Showing with 5 additions and 0 deletions.
  1. +5 −0 zutils/scripts/backport.py
View
5 zutils/scripts/backport.py
@@ -7,6 +7,7 @@
def main():
parser = optparse.OptionParser()
parser.add_option("-r", "--revision", help="Which revision to backport", default=None)
+ parser.add_option("-y", "--yes", help="Do not ask for confirmation", action='store_true')
parser.add_option("-n", "--pretend", help="Only pretend to backport", action='store_true')
opts, branches = parser.parse_args()
@@ -33,6 +34,10 @@ def main():
if opts.pretend:
return
+ if not opts.yes:
+ print "Press [enter] to perform the backport."
+ sys.stdin.readline()
+
z.hgCmd("export %s > /tmp/%s.patch" % (log['revision'], log['revision']))
for b in branches:
Please sign in to comment.
Something went wrong with that request. Please try again.