eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py

changeset 8259
2bbec88047dd
parent 8243
cc717c2ae956
child 8273
698ae46f40a4
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py	Wed Apr 21 17:56:12 2021 +0200
+++ b/eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py	Wed Apr 21 19:40:50 2021 +0200
@@ -585,14 +585,15 @@
             QApplication.processEvents()
         try:
             with E5MutexLocker(self.vcsExecutionMutex):
-                if changelists:
-                    rev = client.checkin(fnames, msg,
-                                         recurse=recurse, keep_locks=keeplocks,
-                                         keep_changelist=keepChangelists,
-                                         changelists=changelists)
-                else:
-                    rev = client.checkin(fnames, msg,
-                                         recurse=recurse, keep_locks=keeplocks)
+                rev = (
+                    client.checkin(
+                        fnames, msg, recurse=recurse, keep_locks=keeplocks,
+                        keep_changelist=keepChangelists,
+                        changelists=changelists)
+                    if changelists else
+                    client.checkin(
+                        fnames, msg, recurse=recurse, keep_locks=keeplocks)
+                )
         except pysvn.ClientError as e:
             rev = None
             if not noDialog:
@@ -1045,10 +1046,11 @@
                     """ will be aborted"""))
             return
         
-        if self.otherData["standardLayout"]:
-            url = None
-        else:
-            url = self.svnNormalizeURL(reposURL)
+        url = (
+            None
+            if self.otherData["standardLayout"] else
+            self.svnNormalizeURL(reposURL)
+        )
         from .SvnTagDialog import SvnTagDialog
         dlg = SvnTagDialog(self.allTagsBranchesList, url,
                            self.otherData["standardLayout"])
@@ -1187,10 +1189,11 @@
                     """ operation will be aborted"""))
             return False
         
-        if self.otherData["standardLayout"]:
-            url = None
-        else:
-            url = self.svnNormalizeURL(reposURL)
+        url = (
+            None
+            if self.otherData["standardLayout"] else
+            self.svnNormalizeURL(reposURL)
+        )
         from .SvnSwitchDialog import SvnSwitchDialog
         dlg = SvnSwitchDialog(self.allTagsBranchesList, url,
                               self.otherData["standardLayout"])
@@ -1709,12 +1712,13 @@
         except pysvn.ClientError as e:
             return e.args[0]
         
-        if hasattr(pysvn, 'svn_api_version'):
-            apiVersion = "{0} {1}".format(
+        apiVersion = (
+            "{0} {1}".format(
                 ".".join([str(v) for v in pysvn.svn_api_version[:3]]),
                 pysvn.svn_api_version[3])
-        else:
-            apiVersion = QCoreApplication.translate('subversion', "unknown")
+            if hasattr(pysvn, 'svn_api_version') else
+            QCoreApplication.translate('subversion', "unknown")
+        )
         
         hmsz = time.strftime("%H:%M:%S %Z", time.localtime(entry.commit_time))
         return QCoreApplication.translate(

eric ide

mercurial