diff contrib/simplemerge @ 30576:541949a10a68

fancyopts: switch from fancyopts.getopt.* to getopt.* In the next patch, we will be creating a bytes version of getopt.getopt() and doing that will leave getopt as unused import in fancyopts. So before removing that there are instances in codebase where instead of importing getopt, we have used fancyopts.getopt. This patch will switch all those cases so that the next patch can remove the import of getopt from fancyopts without breaking things.
author Pulkit Goyal <7895pulkit@gmail.com>
date Tue, 06 Dec 2016 06:27:58 +0530
parents d83ca854fa21
children aed91971d88c
line wrap: on
line diff
--- a/contrib/simplemerge	Mon Dec 05 06:46:51 2016 +0530
+++ b/contrib/simplemerge	Tue Dec 06 06:27:58 2016 +0530
@@ -3,6 +3,7 @@
 from mercurial import demandimport
 demandimport.enable()
 
+import getopt
 import sys
 from mercurial.i18n import _
 from mercurial import error, simplemerge, fancyopts, util, ui
@@ -47,7 +48,7 @@
     opts = {}
     try:
         args = fancyopts.fancyopts(sys.argv[1:], options, opts)
-    except fancyopts.getopt.GetoptError as e:
+    except getopt.GetoptError as e:
         raise ParseError(e)
     if opts['help']:
         showhelp()