##// END OF EJS Templates
simplemerge: update to conform with modern import conventions
Augie Fackler -
r33896:aed91971 default
parent child Browse files
Show More
@@ -1,12 +1,20 b''
1 #!/usr/bin/env python
1 #!/usr/bin/env python
2
2 from __future__ import absolute_import
3 from mercurial import demandimport
4 demandimport.enable()
5
3
6 import getopt
4 import getopt
7 import sys
5 import sys
6
7 import hgdemandimport
8 hgdemandimport.enable()
9
8 from mercurial.i18n import _
10 from mercurial.i18n import _
9 from mercurial import error, simplemerge, fancyopts, util, ui
11 from mercurial import (
12 error,
13 fancyopts,
14 simplemerge,
15 ui as uimod,
16 util,
17 )
10
18
11 options = [('L', 'label', [], _('labels to use on conflict markers')),
19 options = [('L', 'label', [], _('labels to use on conflict markers')),
12 ('a', 'text', None, _('treat all files as text')),
20 ('a', 'text', None, _('treat all files as text')),
@@ -55,7 +63,7 b' try:'
55 sys.exit(0)
63 sys.exit(0)
56 if len(args) != 3:
64 if len(args) != 3:
57 raise ParseError(_('wrong number of arguments'))
65 raise ParseError(_('wrong number of arguments'))
58 sys.exit(simplemerge.simplemerge(ui.ui.load(), *args, **opts))
66 sys.exit(simplemerge.simplemerge(uimod.ui.load(), *args, **opts))
59 except ParseError as e:
67 except ParseError as e:
60 sys.stdout.write("%s: %s\n" % (sys.argv[0], e))
68 sys.stdout.write("%s: %s\n" % (sys.argv[0], e))
61 showhelp()
69 showhelp()
General Comments 0
You need to be logged in to leave comments. Login now