Bug 892940 - Un-invert the interactive mode confirmation prompt for obsoleting patches; r=sfink
authorEd Morley <emorley@mozilla.com>
Fri, 12 Jul 2013 14:40:26 +0100
changeset 117 e90b3081344d
parent 116 5715cb7c141f
child 118 ac634b806473
push id53
push useremorley@mozilla.com
push date2013-07-12 13:41 +0000
reviewerssfink
bugs892940
Bug 892940 - Un-invert the interactive mode confirmation prompt for obsoleting patches; r=sfink
__init__.py
--- a/__init__.py
+++ b/__init__.py
@@ -844,17 +844,17 @@ def bzexport(ui, repo, *args, **opts):
     attachment_url = urlparse.urljoin(bugzilla,
                                       "attachment.cgi?id=" + result["id"] + "&action=edit")
     print "%s uploaded as %s" % (rev, attachment_url)
 
     def pre_obsolete(**kwargs):
         if not opts['interactive']:
             return True
         url, filename, description = [ kwargs[k] for k in ['url', 'filename', 'description' ] ]
-        return ui.prompt(_("Obsolete patch %s (%s) - %s (y/n)?") % (url, filename, description)) != 'y'
+        return ui.prompt(_("Obsolete patch %s (%s) - %s (y/n)?") % (url, filename, description)) == 'y'
 
     obsolete_old_patches(ui, api_server, auth, bug, bugzilla, filename, result['id'], pre_hook = pre_obsolete)
 
     # If attaching to an existing bug (and not suppressed on the command line), take the bug
     if not opts['new'] and not opts['no_take_bug']:
         req = bz.get_bug(api_server, auth, bug, include_fields=[ 'assigned_to' ])
         result = json.load(urlopen(ui, req))
         taker = auth.username(api_server)