Changeset 8fc862848092…
Parent 29caeb413598…
by
Changes to 3 files · Browse files at 8fc862848092 Showing diff from parent 29caeb413598 Diff from another changeset...
@@ -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,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,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
|
Loading...