diff contrib/simplemerge @ 33895:aed91971d88c

simplemerge: update to conform with modern import conventions
author Augie Fackler <raf@durin42.com>
date Tue, 22 Aug 2017 14:13:13 -0400
parents 541949a10a68
children ed6f64173121
line wrap: on
line diff
--- a/contrib/simplemerge	Tue Aug 22 14:12:37 2017 -0400
+++ b/contrib/simplemerge	Tue Aug 22 14:13:13 2017 -0400
@@ -1,12 +1,20 @@
 #!/usr/bin/env python
-
-from mercurial import demandimport
-demandimport.enable()
+from __future__ import absolute_import
 
 import getopt
 import sys
+
+import hgdemandimport
+hgdemandimport.enable()
+
 from mercurial.i18n import _
-from mercurial import error, simplemerge, fancyopts, util, ui
+from mercurial import (
+    error,
+    fancyopts,
+    simplemerge,
+    ui as uimod,
+    util,
+)
 
 options = [('L', 'label', [], _('labels to use on conflict markers')),
            ('a', 'text', None, _('treat all files as text')),
@@ -55,7 +63,7 @@
         sys.exit(0)
     if len(args) != 3:
             raise ParseError(_('wrong number of arguments'))
-    sys.exit(simplemerge.simplemerge(ui.ui.load(), *args, **opts))
+    sys.exit(simplemerge.simplemerge(uimod.ui.load(), *args, **opts))
 except ParseError as e:
     sys.stdout.write("%s: %s\n" % (sys.argv[0], e))
     showhelp()