eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py

branch
maintenance
changeset 8176
31965986ecd1
parent 8043
0acf98cd089a
parent 8143
2c730d5fd177
child 8273
698ae46f40a4
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py	Sat Mar 06 10:00:52 2021 +0100
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py	Sun Mar 28 15:00:11 2021 +0200
@@ -928,7 +928,7 @@
         else:
             from .SvnCopyDialog import SvnCopyDialog
             dlg = SvnCopyDialog(name, None, True, "--force" in opts)
-            accepted = (dlg.exec() == QDialog.Accepted)
+            accepted = (dlg.exec() == QDialog.DialogCode.Accepted)
             if accepted:
                 target, force = dlg.getData()
             if not target:
@@ -1056,7 +1056,7 @@
         from .SvnTagDialog import SvnTagDialog
         dlg = SvnTagDialog(self.allTagsBranchesList, url,
                            self.otherData["standardLayout"])
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             tag, tagOp = dlg.getParameters()
             if tag in self.allTagsBranchesList:
                 self.allTagsBranchesList.remove(tag)
@@ -1145,7 +1145,7 @@
                     "Do you really want to revert all changes to these files"
                     " or directories?"),
                 name)
-            yes = dia.exec() == QDialog.Accepted
+            yes = dia.exec() == QDialog.DialogCode.Accepted
         else:
             yes = E5MessageBox.yesNo(
                 None,
@@ -1198,7 +1198,7 @@
         from .SvnSwitchDialog import SvnSwitchDialog
         dlg = SvnSwitchDialog(self.allTagsBranchesList, url,
                               self.otherData["standardLayout"])
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             tag, tagType = dlg.getParameters()
             if tag in self.allTagsBranchesList:
                 self.allTagsBranchesList.remove(tag)
@@ -1261,7 +1261,7 @@
         from .SvnMergeDialog import SvnMergeDialog
         dlg = SvnMergeDialog(self.mergeList[0], self.mergeList[1],
                              self.mergeList[2], "--force" in opts)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             urlrev1, urlrev2, target, force = dlg.getParameters()
         else:
             return
@@ -1657,7 +1657,7 @@
         """
         from .SvnCommandDialog import SvnCommandDialog
         dlg = SvnCommandDialog(self.commandHistory, self.wdHistory, name)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             command, wd = dlg.getData()
             commandList = Utilities.parseOptionString(command)
             
@@ -1821,7 +1821,7 @@
         rx_prot = re.compile('(file:|svn:|svn+ssh:|http:|https:).+')
         dlg = SvnCopyDialog(name)
         res = False
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             target, force = dlg.getData()
             
             client = self.getClient()
@@ -1882,7 +1882,7 @@
         """
         from .SvnPropSetDialog import SvnPropSetDialog
         dlg = SvnPropSetDialog(recursive)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             propName, propValue, recurse = dlg.getData()
             if not propName:
                 E5MessageBox.critical(
@@ -1933,7 +1933,7 @@
         """
         from .SvnPropDelDialog import SvnPropDelDialog
         dlg = SvnPropDelDialog(recursive)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             propName, recurse = dlg.getData()
             
             if not propName:
@@ -2051,7 +2051,7 @@
                     return
         from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
         dlg = SvnRevisionSelectionDialog()
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             revisions = dlg.getRevisions()
             if self.diff is None:
                 from .SvnDiffDialog import SvnDiffDialog
@@ -2094,7 +2094,7 @@
         from .SvnUrlSelectionDialog import SvnUrlSelectionDialog
         dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList,
                                     dname)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             urls, summary = dlg.getURLs()
             if self.diff is None:
                 from .SvnDiffDialog import SvnDiffDialog
@@ -2124,7 +2124,8 @@
                         pysvn.opt_revision_kind.number, int(rev))
                 elif rev.startswith("{"):
                     dateStr = rev[1:-1]
-                    secs = QDateTime.fromString(dateStr, Qt.ISODate).toTime_t()
+                    secs = QDateTime.fromString(
+                        dateStr, Qt.DateFormat.ISODate).toTime_t()
                     rev = pysvn.Revision(pysvn.opt_revision_kind.date, secs)
                 elif rev == "HEAD":
                     rev = pysvn.Revision(pysvn.opt_revision_kind.head)
@@ -2163,7 +2164,7 @@
         if extended:
             from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
             dlg = SvnRevisionSelectionDialog()
-            if dlg.exec() == QDialog.Accepted:
+            if dlg.exec() == QDialog.DialogCode.Accepted:
                 rev1, rev2 = dlg.getRevisions()
                 if rev1 == "WORKING":
                     rev1 = ""
@@ -2245,7 +2246,7 @@
             None,
             self.tr("Subversion Lock"),
             self.tr("Enter lock comment"),
-            QLineEdit.Normal)
+            QLineEdit.EchoMode.Normal)
         
         if not ok:
             return
@@ -2335,7 +2336,7 @@
         from .SvnRelocateDialog import SvnRelocateDialog
         currUrl = self.svnGetReposName(projectPath)
         dlg = SvnRelocateDialog(currUrl)
-        if dlg.exec() == QDialog.Accepted:
+        if dlg.exec() == QDialog.DialogCode.Accepted:
             newUrl, inside = dlg.getData()
             if inside:
                 msg = "switch {0} {1}".format(newUrl, projectPath)
@@ -2373,7 +2374,7 @@
                 None,
                 self.tr("Repository Browser"),
                 self.tr("Enter the repository URL."),
-                QLineEdit.Normal)
+                QLineEdit.EchoMode.Normal)
             if not ok or not url:
                 return
         

eric ide

mercurial