##// END OF EJS Templates
patchbomb: Defer the import of readline....
Bryan O'Sullivan -
r4486:6b84c8d2 default
parent child Browse files
Show More
@@ -70,12 +70,6 b' from mercurial import cmdutil, commands,'
70 from mercurial.i18n import _
70 from mercurial.i18n import _
71 from mercurial.node import *
71 from mercurial.node import *
72
72
73 try:
74 # readline gives raw_input editing capabilities, but is not
75 # present on windows
76 import readline
77 except ImportError: pass
78
79 def patchbomb(ui, repo, *revs, **opts):
73 def patchbomb(ui, repo, *revs, **opts):
80 '''send changesets by email
74 '''send changesets by email
81
75
@@ -120,6 +114,12 b' def patchbomb(ui, repo, *revs, **opts):'
120 '''
114 '''
121
115
122 def prompt(prompt, default = None, rest = ': ', empty_ok = False):
116 def prompt(prompt, default = None, rest = ': ', empty_ok = False):
117 try:
118 # readline gives raw_input editing capabilities, but is not
119 # present on windows
120 import readline
121 except ImportError: pass
122
123 if default: prompt += ' [%s]' % default
123 if default: prompt += ' [%s]' % default
124 prompt += rest
124 prompt += rest
125 while True:
125 while True:
General Comments 0
You need to be logged in to leave comments. Login now