src/eric7/Plugins/VcsPlugins/vcsPySvn/subversion.py

branch
eric7
changeset 11006
a671918232f3
parent 10683
779cda568acb
child 11090
f5f5f5803935
diff -r b918c6c2736b -r a671918232f3 src/eric7/Plugins/VcsPlugins/vcsPySvn/subversion.py
--- a/src/eric7/Plugins/VcsPlugins/vcsPySvn/subversion.py	Fri Oct 25 09:47:48 2024 +0200
+++ b/src/eric7/Plugins/VcsPlugins/vcsPySvn/subversion.py	Fri Oct 25 17:58:59 2024 +0200
@@ -322,6 +322,7 @@
                     (not recurse) and " --non-recursive" or "", msg
                 ),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
         try:
@@ -404,6 +405,7 @@
                     (not recurse) and " --non-recursive" or "", url, projectDir
                 ),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
         try:
@@ -473,6 +475,7 @@
                 (not recurse) and " --non-recursive" or "", url, projectDir
             ),
             client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -604,6 +607,7 @@
                     " ".join(fnames),
                 ),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
         try:
@@ -704,6 +708,7 @@
                     (not recurse) and " --non-recursive" or "", " ".join(fnames)
                 ),
                 client,
+                parent=self.__ui,
             )
         QApplication.processEvents()
         try:
@@ -820,6 +825,7 @@
                     " ".join(names),
                 ),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
         try:
@@ -931,6 +937,7 @@
                 " ".join(names),
             ),
             client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -968,6 +975,7 @@
                 self.tr("Removing files/directories from the Subversion repository"),
                 "remove{0} {1}".format(force and " --force" or "", " ".join(name)),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
         try:
@@ -1011,7 +1019,9 @@
             force = True
             accepted = True
         else:
-            dlg = SvnCopyDialog(name, None, True, "--force" in opts)
+            dlg = SvnCopyDialog(
+                name, parent=self.__ui, move=True, force="--force" in opts
+            )
             accepted = dlg.exec() == QDialog.DialogCode.Accepted
             if accepted:
                 target, force = dlg.getData()
@@ -1037,6 +1047,7 @@
                         target,
                     ),
                     client,
+                    parent=self.__ui,
                     log=log,
                 )
                 QApplication.processEvents()
@@ -1142,7 +1153,10 @@
             None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL)
         )
         dlg = SvnTagDialog(
-            self.allTagsBranchesList, url, self.otherData["standardLayout"]
+            self.allTagsBranchesList,
+            url,
+            self.otherData["standardLayout"],
+            parent=self.__ui,
         )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             tag, tagOp = dlg.getParameters()
@@ -1185,6 +1199,7 @@
                 self.tr("Tagging {0} in the Subversion repository").format(name),
                 "copy --message {0} {1} {2}".format(log, reposURL, url),
                 client,
+                parent=self.__ui,
                 log=log,
             )
             QApplication.processEvents()
@@ -1199,6 +1214,7 @@
                 self.tr("Tagging {0} in the Subversion repository").format(name),
                 "remove --message {0} {1}".format(log, url),
                 client,
+                parent=self.__ui,
                 log=log,
             )
             QApplication.processEvents()
@@ -1257,6 +1273,7 @@
                     (not recurse) and " --non-recursive" or "", " ".join(name)
                 ),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
             try:
@@ -1312,7 +1329,10 @@
             None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL)
         )
         dlg = SvnSwitchDialog(
-            self.allTagsBranchesList, url, self.otherData["standardLayout"]
+            self.allTagsBranchesList,
+            url,
+            self.otherData["standardLayout"],
+            parent=self.__ui,
         )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             tag, tagType = dlg.getParameters()
@@ -1355,6 +1375,7 @@
             self.tr("Switching to {0}").format(tn),
             "switch {0} {1}".format(url, name),
             client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -1382,7 +1403,11 @@
 
         opts = self.options["global"]
         dlg = SvnMergeDialog(
-            self.mergeList[0], self.mergeList[1], self.mergeList[2], "--force" in opts
+            self.mergeList[0],
+            self.mergeList[1],
+            self.mergeList[2],
+            "--force" in opts,
+            parent=self.__ui,
         )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             urlrev1, urlrev2, target, force = dlg.getParameters()
@@ -1462,6 +1487,7 @@
                 fname,
             ),
             client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -1784,7 +1810,10 @@
         """
         client = self.getClient()
         dlg = SvnDialog(
-            self.tr("Cleaning up {0}").format(name), "cleanup {0}".format(name), client
+            self.tr("Cleaning up {0}").format(name),
+            "cleanup {0}".format(name),
+            client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -1808,7 +1837,9 @@
 
         from .SvnCommandDialog import SvnCommandDialog
 
-        dlg = SvnCommandDialog(self.commandHistory, self.wdHistory, name)
+        dlg = SvnCommandDialog(
+            self.commandHistory, self.wdHistory, name, parent=self.__ui
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             command, wd = dlg.getData()
             commandList = Utilities.parseOptionString(command)
@@ -1825,7 +1856,7 @@
             args = []
             self.addArguments(args, commandList)
 
-            dia = SvnProcessDialog(self.tr("Subversion command"))
+            dia = SvnProcessDialog(self.tr("Subversion command"), parent=self.__ui)
             res = dia.startProcess(args, wd)
             if res:
                 dia.exec()
@@ -1962,6 +1993,7 @@
                 (not recurse) and " --non-recursive" or "", " ".join(fnames)
             ),
             client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -1989,7 +2021,7 @@
         from .SvnCopyDialog import SvnCopyDialog
 
         rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+")
-        dlg = SvnCopyDialog(name)
+        dlg = SvnCopyDialog(name, parent=self.__ui)
         res = False
         if dlg.exec() == QDialog.DialogCode.Accepted:
             target, force = dlg.getData()
@@ -2006,6 +2038,7 @@
                     log and (" --message {0}".format(log)) or "", name, target
                 ),
                 client,
+                parent=self.__ui,
                 log=log,
             )
             QApplication.processEvents()
@@ -2058,7 +2091,7 @@
         """
         from .SvnPropSetDialog import SvnPropSetDialog
 
-        dlg = SvnPropSetDialog(recursive)
+        dlg = SvnPropSetDialog(recursive, parent=self.__ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             propName, propValue, recurse = dlg.getData()
             if not propName:
@@ -2090,6 +2123,7 @@
                     " ".join(fnames),
                 ),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
             try:
@@ -2120,7 +2154,7 @@
         """
         from .SvnPropDelDialog import SvnPropDelDialog
 
-        dlg = SvnPropDelDialog(recursive)
+        dlg = SvnPropDelDialog(recursive, parent=self.__ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             propName, recurse = dlg.getData()
 
@@ -2152,6 +2186,7 @@
                     " ".join(fnames),
                 ),
                 client,
+                parent=self.__ui,
             )
             QApplication.processEvents()
             try:
@@ -2243,7 +2278,7 @@
                 project = ericApp().getObject("Project")
                 if nam == project.ppath and not project.saveAllScripts():
                     return
-        dlg = SvnRevisionSelectionDialog()
+        dlg = SvnRevisionSelectionDialog(parent=self.__ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             revisions = dlg.getRevisions()
             if self.diff is None:
@@ -2284,7 +2319,9 @@
 
         dname = self.splitPath(names[0])[0]
 
-        dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList, dname)
+        dlg = SvnUrlSelectionDialog(
+            self, self.tagsList, self.branchesList, dname, parent=self.__ui
+        )
         if dlg.exec() == QDialog.DialogCode.Accepted:
             urls, summary = dlg.getURLs()
             if self.diff is None:
@@ -2362,7 +2399,7 @@
             raise ValueError("Wrong parameter type")
 
         if extended:
-            dlg = SvnRevisionSelectionDialog()
+            dlg = SvnRevisionSelectionDialog(parent=self.__ui)
             if dlg.exec() == QDialog.DialogCode.Accepted:
                 rev1, rev2 = dlg.getRevisions()
                 if rev1 == "WORKING":
@@ -2440,7 +2477,7 @@
         @type str or list of str
         @param stealIt flag indicating a forced operation
         @type bool
-        @param parent reference to the parent object of the subversion dialog
+        @param parent reference to the parent widget of the subversion dialog
         @type QWidget
         """
         comment, ok = QInputDialog.getText(
@@ -2492,7 +2529,7 @@
         @type str or list of str
         @param breakIt flag indicating a forced operation
         @type bool
-        @param parent reference to the parent object of the subversion dialog
+        @param parent reference to the parent widget of the subversion dialog
         @type QWidget
         """
         if isinstance(name, list):
@@ -2533,7 +2570,7 @@
         """
         from .SvnInfoDialog import SvnInfoDialog
 
-        dlg = SvnInfoDialog(self)
+        dlg = SvnInfoDialog(self, parent=self.__ui)
         dlg.start(projectPath, name)
         dlg.exec()
 
@@ -2547,7 +2584,7 @@
         from .SvnRelocateDialog import SvnRelocateDialog
 
         currUrl = self.svnGetReposName(projectPath)
-        dlg = SvnRelocateDialog(currUrl)
+        dlg = SvnRelocateDialog(currUrl, parent=self.__ui)
         if dlg.exec() == QDialog.DialogCode.Accepted:
             newUrl, inside = dlg.getData()
             if inside:
@@ -2555,7 +2592,7 @@
             else:
                 msg = "relocate {0} {1} {2}".format(currUrl, newUrl, projectPath)
             client = self.getClient()
-            dlg = SvnDialog(self.tr("Relocating"), msg, client)
+            dlg = SvnDialog(self.tr("Relocating"), msg, client, parent=self.__ui)
             QApplication.processEvents()
             try:
                 with EricMutexLocker(self.vcsExecutionMutex):
@@ -2610,6 +2647,7 @@
             self.tr("Remove from changelist"),
             "changelist --remove {0}".format(" ".join(names)),
             client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -2649,6 +2687,7 @@
             self.tr("Add to changelist"),
             "changelist {0}".format(" ".join(names)),
             client,
+            parent=self.__ui,
         )
         QApplication.processEvents()
         try:
@@ -2703,7 +2742,9 @@
         @type str
         """
         client = self.getClient()
-        dlg = SvnDialog(self.tr("Upgrade"), "upgrade {0}".format(path), client)
+        dlg = SvnDialog(
+            self.tr("Upgrade"), "upgrade {0}".format(path), client, parent=self.__ui
+        )
         QApplication.processEvents()
         try:
             with EricMutexLocker(self.vcsExecutionMutex):

eric ide

mercurial