Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable qqueue: make queue names unicode safe

Changeset 91df37182065

Parent 26b076a73ddc

by Johan Samyn

Changes to one file · Browse files at 91df37182065 Showing diff from parent 26b076a73ddc Diff from another changeset...

 
251
252
253
254
 
 
255
256
257
258
 
259
260
261
 
269
270
271
 
272
273
 
274
275
276
277
278
 
 
279
280
281
282
283
 
284
285
286
 
293
294
295
296
 
 
297
298
299
300
301
 
 
302
303
304
305
306
307
 
 
308
309
310
311
312
313
 
 
 
314
315
316
 
251
252
253
 
254
255
256
257
258
 
259
260
261
262
 
270
271
272
273
274
 
275
276
277
278
279
 
280
281
282
283
284
285
 
286
287
288
289
 
296
297
298
 
299
300
301
302
303
 
 
304
305
306
307
308
309
310
 
311
312
313
314
315
 
 
 
316
317
318
319
320
321
@@ -251,11 +251,12 @@
    @pyqtSlot()   def qqueueActivate(self): - q = hglib.fromunicode(self.ql.item(self.ql.currentRow()).text()) + uq = self.ql.item(self.ql.currentRow()).text() + q = hglib.fromunicode(uq)   if q == self.activequeue:   return   if qtlib.QuestionMsgBox(_('Confirm patch queue switch'), - _('Do you really want to activate patch queue \'%s\' ?' % q), + _("Do you really want to activate patch queue '%s' ?") % uq,   parent=self, defaultbutton=QMessageBox.No):   opts = [q]   self.qqueueCommand(opts) @@ -269,18 +270,20 @@
  dlg = QInputDialog(self, Qt.WindowFlags()   & ~Qt.WindowContextHelpButtonHint)   qname, ok = dlg.getText(self, title, label) + qname = hglib.fromunicode(qname)   if qname and ok: - opts = ['--create', hglib.fromunicode(qname)] + opts = ['--create', qname]   self.qqueueCommand(opts)     @pyqtSlot()   def qqueueRename(self): - q = hglib.fromunicode(self.ql.item(self.ql.currentRow()).text()) + uq = self.ql.item(self.ql.currentRow()).text() + q = hglib.fromunicode(uq)   if q == 'patches':   return   title = _('TortoiseHg Prompt')   # this is the only way I found to make that dialog wide enough :( - label = _('Rename patch queue \'%s\' to' % q) + (u' ' * 30) + label = (_("Rename patch queue '%s' to") % uq) + (u' ' * 30)   # WindowContextHelpButton still there :( after this ?   dlg = QInputDialog(self, Qt.WindowFlags()   & ~Qt.WindowContextHelpButtonHint) @@ -293,24 +296,26 @@
    @pyqtSlot()   def qqueueDelete(self): - q = hglib.fromunicode(self.ql.item(self.ql.currentRow()).text()) + uq = self.ql.item(self.ql.currentRow()).text() + q = hglib.fromunicode(uq)   if q == 'patches':   return   if qtlib.QuestionMsgBox(_('Confirm patch queue delete'), - _('Do you really want to delete patch queue \'%s\' ?' - % q), parent=self, defaultbutton=QMessageBox.No): + _("Do you really want to delete patch queue '%s' ?") % uq, + parent=self, defaultbutton=QMessageBox.No):   opts = ['--delete', q]   self.qqueueCommand(opts)     @pyqtSlot()   def qqueuePurge(self): - q = hglib.fromunicode(self.ql.item(self.ql.currentRow()).text()) + uq = self.ql.item(self.ql.currentRow()).text() + q = hglib.fromunicode(uq)   if q == 'patches':   return   if qtlib.QuestionMsgBox(_('Confirm patch queue purge'), - _('<p>This will also erase de patchfiles on disk!</p>' - '<p>Do you really want to purge patch queue \'%s\' ?</p>' - % q), parent=self, defaultbutton=QMessageBox.No): + _("<p>This will also erase de patchfiles on disk!</p>" + "<p>Do you really want to purge patch queue '%s' ?</p>") % uq, + parent=self, defaultbutton=QMessageBox.No):   opts = ['--purge', q]   self.qqueueCommand(opts)