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

stable thgimport: clarify dialog options

'rev' was never used and opts has always been ignored, though we do want to
support --repo and --mq (selecting options from combo box).

Changeset 8fc862848092

Parent 29caeb413598

by Steve Borho

Changes to 3 files · Browse files at 8fc862848092 Showing diff from parent 29caeb413598 Diff from another changeset...

 
772
773
774
775
776
 
777
778
779
 
772
773
774
 
 
775
776
777
778
@@ -772,8 +772,7 @@
  else:   super(MQWidget, self).dropEvent(event)   return - dlg = thgimport.ImportDialog(repo=self.repo, parent=self) - # TODO: send flag to dialog indicating this is a qimport (alias?) + dlg = thgimport.ImportDialog(self.repo, self, mq=True)   dlg.finished.connect(dlg.deleteLater)   dlg.setfilepaths(filepaths)   dlg.exec_()
 
463
464
465
466
 
467
468
469
 
463
464
465
 
466
467
468
469
@@ -463,7 +463,7 @@
  dlg.exec_()     def thgimport(self, paths=None): - dlg = thgimport.ImportDialog(repo=self.repo, parent=self) + dlg = thgimport.ImportDialog(self.repo, self)   dlg.finished.connect(dlg.deleteLater)   if paths:   dlg.setfilepaths(paths)
 
22
23
24
 
 
25
26
27
28
 
29
30
31
 
319
320
321
322
323
 
 
324
325
 
22
23
24
25
26
27
28
29
 
30
31
32
33
 
321
322
323
 
 
324
325
326
327
@@ -22,10 +22,12 @@
 _FILE_FILTER = "%s;;%s" % (_("Patch files (*.diff *.patch)"),   _("All files (*)"))   +# TODO: handle --repo and --mq options from command line or MQ widget +  class ImportDialog(QDialog):   """Dialog to import patches"""   - def __init__(self, repo=None, rev=None, parent=None, opts={}): + def __init__(self, repo, parent, **opts):   super(ImportDialog, self).__init__(parent)   self.setWindowFlags(self.windowFlags() &   ~Qt.WindowContextHelpButtonHint) @@ -319,7 +321,7 @@
  self.cancel_btn.setDisabled(True)    def run(ui, *pats, **opts): - repo = thgrepo.repository(ui, path= paths.find_root()) - dlg = ImportDialog(repo, opts=opts) + repo = thgrepo.repository(ui, path=paths.find_root()) + dlg = ImportDialog(repo, None, **opts)   dlg.setfilepaths(pats)   return dlg