Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

hglib: fix arguments to GtkUi.prompt()

New ui.prompt() path now works well

Changeset 3a396cf032e4

Parent 652ac1a00139

by Steve Borho

Changes to one file · Browse files at 3a396cf032e4 Showing diff from parent 652ac1a00139 Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​hglib.py Stacked
 
145
146
147
148
 
149
150
 
 
 
 
151
152
153
 
209
210
211
 
212
213
214
 
145
146
147
 
148
149
150
151
152
153
154
155
156
157
 
213
214
215
216
217
218
219
@@ -145,9 +145,13 @@
  def flush(self):   pass   - def prompt(self, msg, pat=None, choices=None, default="y"): + def prompt(self, msg, choices=None, default="y"):   import re   if not calliffunc(self.interactive): return default + if isinstance(choices, str): + pat = choices + else: + pat = None   while True:   try:   # send request to main thread, await response @@ -209,6 +213,7 @@
  dlg = gdialog.CustomPrompt('Hg Prompt', prompt,   self.parent, choices, default)   dlg.connect('response', self.prompt_response) + dlg.show_all()   else:   dlg = entry_dialog(self.parent, prompt, visible, default,   self.dialog_response)