Mon, 23 Sep 2019 20:03:20 +0200
Continued to resolve code style issue M841.
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/ConfigurationPage/SubversionPage.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/ConfigurationPage/SubversionPage.py Mon Sep 23 20:03:20 2019 +0200 @@ -10,8 +10,9 @@ from PyQt5.QtCore import pyqtSlot -from Preferences.ConfigurationPages.ConfigurationPageBase import \ +from Preferences.ConfigurationPages.ConfigurationPageBase import ( ConfigurationPageBase +) from .Ui_SubversionPage import Ui_SubversionPage
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/ProjectBrowserHelper.py Mon Sep 23 20:03:20 2019 +0200 @@ -115,8 +115,10 @@ act.setEnabled(False) for act in self.vcsAddMultiMenuActions: act.setEnabled(True) - if 1 in self.browser.specialMenuEntries and \ - self.__itemsHaveFiles(items): + if ( + 1 in self.browser.specialMenuEntries and + self.__itemsHaveFiles(items) + ): self.vcsMultiMenuAddTree.setEnabled(False) for act in standardItems: act.setEnabled(True) @@ -942,8 +944,8 @@ """ Private method to open the configuration dialog. """ - e5App().getObject("UserInterface")\ - .showPreferences("zzz_subversionPage") + e5App().getObject("UserInterface").showPreferences( + "zzz_subversionPage") def __SVNAddToChangelist(self): """
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/ProjectHelper.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/ProjectHelper.py Mon Sep 23 20:03:20 2019 +0200 @@ -678,8 +678,8 @@ """ Private slot to open the configuration dialog. """ - e5App().getObject("UserInterface")\ - .showPreferences("zzz_subversionPage") + e5App().getObject("UserInterface").showPreferences( + "zzz_subversionPage") def __svnChangeLists(self): """
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnBlameDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnBlameDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -13,8 +13,9 @@ import pysvn from PyQt5.QtCore import QMutexLocker, Qt -from PyQt5.QtWidgets import QHeaderView, QDialog, QDialogButtonBox, \ - QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QDialog, QDialogButtonBox, QTreeWidgetItem +) from .SvnDialogMixin import SvnDialogMixin from .Ui_SvnBlameDialog import Ui_SvnBlameDialog @@ -48,12 +49,11 @@ self.blameList.setFont(font) self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) def start(self, fn): """
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnChangeListsDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -14,8 +14,9 @@ from PyQt5.QtCore import pyqtSlot, Qt, QMutexLocker from PyQt5.QtGui import QCursor -from PyQt5.QtWidgets import QDialog, QDialogButtonBox, QListWidgetItem, \ - QApplication +from PyQt5.QtWidgets import ( + QDialog, QDialogButtonBox, QListWidgetItem, QApplication +) from .SvnDialogMixin import SvnDialogMixin @@ -44,12 +45,11 @@ self.vcs = vcs self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) @pyqtSlot(QListWidgetItem, QListWidgetItem) def on_changeLists_currentItemChanged(self, current, previous):
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnConst.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnConst.py Mon Sep 23 20:03:20 2019 +0200 @@ -54,21 +54,28 @@ QT_TRANSLATE_NOOP('Subversion', 'Annotate'), } if hasattr(pysvn.wc_notify_action, 'locked'): - svnNotifyActionMap[pysvn.wc_notify_action.locked] = \ + svnNotifyActionMap[pysvn.wc_notify_action.locked] = ( QT_TRANSLATE_NOOP('Subversion', 'Locking') - svnNotifyActionMap[pysvn.wc_notify_action.unlocked] = \ + ) + svnNotifyActionMap[pysvn.wc_notify_action.unlocked] = ( QT_TRANSLATE_NOOP('Subversion', 'Unlocking') - svnNotifyActionMap[pysvn.wc_notify_action.failed_lock] = \ + ) + svnNotifyActionMap[pysvn.wc_notify_action.failed_lock] = ( QT_TRANSLATE_NOOP('Subversion', 'Failed lock') - svnNotifyActionMap[pysvn.wc_notify_action.failed_unlock] = \ + ) + svnNotifyActionMap[pysvn.wc_notify_action.failed_unlock] = ( QT_TRANSLATE_NOOP('Subversion', 'Failed unlock') + ) if hasattr(pysvn.wc_notify_action, 'changelist_clear'): - svnNotifyActionMap[pysvn.wc_notify_action.changelist_clear] = \ + svnNotifyActionMap[pysvn.wc_notify_action.changelist_clear] = ( QT_TRANSLATE_NOOP('Subversion', 'Changelist clear') - svnNotifyActionMap[pysvn.wc_notify_action.changelist_set] = \ + ) + svnNotifyActionMap[pysvn.wc_notify_action.changelist_set] = ( QT_TRANSLATE_NOOP('Subversion', 'Changelist set') - svnNotifyActionMap[pysvn.wc_notify_action.changelist_moved] = \ + ) + svnNotifyActionMap[pysvn.wc_notify_action.changelist_moved] = ( QT_TRANSLATE_NOOP('Subversion', 'Changelist moved') + ) svnStatusMap = { pysvn.wc_status_kind.added:
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -47,17 +47,14 @@ self.outputGroup.setTitle(text) self.errorGroup.hide() - pysvnClient.callback_cancel = \ - self._clientCancelCallback + pysvnClient.callback_cancel = self._clientCancelCallback - pysvnClient.callback_notify = \ - self._clientNotifyCallback - pysvnClient.callback_get_login = \ - self._clientLoginCallback - pysvnClient.callback_ssl_server_trust_prompt = \ + pysvnClient.callback_notify = self._clientNotifyCallback + pysvnClient.callback_get_login = self._clientLoginCallback + pysvnClient.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback - pysvnClient.callback_get_log_message = \ - self._clientLogCallback + ) + pysvnClient.callback_get_log_message = self._clientLogCallback self.__hasAddOrDelete = False @@ -78,15 +75,19 @@ if eventDict["action"] == pysvn.wc_notify_action.update_completed: msg = self.tr("Revision {0}.\n").format( eventDict["revision"].number) - elif eventDict["path"] != "" and \ - eventDict["action"] in svnNotifyActionMap and \ - svnNotifyActionMap[eventDict["action"]] is not None: - mime = eventDict["mime_type"] == "application/octet-stream" and \ + elif ( + eventDict["path"] != "" and + eventDict["action"] in svnNotifyActionMap and + svnNotifyActionMap[eventDict["action"]] is not None + ): + mime = ( + eventDict["mime_type"] == "application/octet-stream" and self.tr(" (binary)") or "" - msg = self.tr("{0} {1}{2}\n")\ - .format(self.tr(svnNotifyActionMap[eventDict["action"]]), - eventDict["path"], - mime) + ) + msg = self.tr("{0} {1}{2}\n").format( + self.tr(svnNotifyActionMap[eventDict["action"]]), + eventDict["path"], + mime) if '.e4p' in eventDict["path"]: self.__hasAddOrDelete = True if eventDict["action"] in [pysvn.wc_notify_action.add,
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnDiffDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -63,12 +63,11 @@ self.highlighter = SvnDiffHighlighter(self.contents.document()) self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) def __getVersionArg(self, version): """ @@ -246,8 +245,7 @@ revision1=rev1, revision2=rev2, recurse=recurse) counter = 0 for line in diffText.splitlines(): - if line.startswith("--- ") or \ - line.startswith("+++ "): + if line.startswith("--- ") or line.startswith("+++ "): self.__processFileLine(line) self.__appendText("{0}{1}".format(line, os.linesep))
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnInfoDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnInfoDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -41,12 +41,11 @@ self.vcs = vcs self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) self.show() QApplication.processEvents() @@ -70,37 +69,41 @@ "<td>{0}</td></tr>").format(path) if info['URL']: infoStr += self.tr( - "<tr><td><b>Url:</b></td><td>{0}</td></tr>")\ - .format(info['URL']) + "<tr><td><b>Url:</b></td><td>{0}</td></tr>" + ).format(info['URL']) if info['rev']: infoStr += self.tr( - "<tr><td><b>Revision:</b></td><td>{0}</td></tr>")\ - .format(info['rev'].number) + "<tr><td><b>Revision:</b></td><td>{0}</td></tr>" + ).format(info['rev'].number) if info['repos_root_URL']: infoStr += self.tr( "<tr><td><b>Repository root URL:</b></td>" - "<td>{0}</td></tr>").format(info['repos_root_URL']) + "<td>{0}</td></tr>" + ).format(info['repos_root_URL']) if info['repos_UUID']: infoStr += self.tr( "<tr><td><b>Repository UUID:</b></td>" - "<td>{0}</td></tr>").format(info['repos_UUID']) + "<td>{0}</td></tr>" + ).format(info['repos_UUID']) if info['last_changed_author']: infoStr += self.tr( "<tr><td><b>Last changed author:</b></td>" - "<td>{0}</td></tr>")\ - .format(info['last_changed_author']) + "<td>{0}</td></tr>" + ).format(info['last_changed_author']) if info['last_changed_date']: infoStr += self.tr( "<tr><td><b>Last Changed Date:</b></td>" - "<td>{0}</td></tr>")\ - .format(formatTime(info['last_changed_date'])) - if info['last_changed_rev'] and \ - info['last_changed_rev'].kind == \ - pysvn.opt_revision_kind.number: + "<td>{0}</td></tr>" + ).format(formatTime(info['last_changed_date'])) + if ( + info['last_changed_rev'] and + info['last_changed_rev'].kind == + pysvn.opt_revision_kind.number + ): infoStr += self.tr( "<tr><td><b>Last changed revision:</b></td>" - "<td>{0}</td></tr>")\ - .format(info['last_changed_rev'].number) + "<td>{0}</td></tr>" + ).format(info['last_changed_rev'].number) if info['kind']: if info['kind'] == pysvn.node_kind.file: nodeKind = self.tr("file") @@ -111,28 +114,28 @@ else: nodeKind = self.tr("unknown") infoStr += self.tr( - "<tr><td><b>Node kind:</b></td><td>{0}</td></tr>")\ - .format(nodeKind) + "<tr><td><b>Node kind:</b></td><td>{0}</td></tr>" + ).format(nodeKind) if info['lock']: lockInfo = info['lock'] infoStr += self.tr( - "<tr><td><b>Lock Owner:</b></td><td>{0}</td></tr>")\ - .format(lockInfo['owner']) + "<tr><td><b>Lock Owner:</b></td><td>{0}</td></tr>" + ).format(lockInfo['owner']) infoStr += self.tr( "<tr><td><b>Lock Creation Date:</b></td>" - "<td>{0}</td></tr>")\ - .format(formatTime(lockInfo['creation_date'])) + "<td>{0}</td></tr>" + ).format(formatTime(lockInfo['creation_date'])) if lockInfo['expiration_date'] is not None: infoStr += self.tr( "<tr><td><b>Lock Expiration Date:</b></td>" - "<td>{0}</td></tr>")\ - .format(formatTime(lockInfo['expiration_date'])) + "<td>{0}</td></tr>" + ).format(formatTime(lockInfo['expiration_date'])) infoStr += self.tr( - "<tr><td><b>Lock Token:</b></td><td>{0}</td></tr>")\ - .format(lockInfo['token']) + "<tr><td><b>Lock Token:</b></td><td>{0}</td></tr>" + ).format(lockInfo['token']) infoStr += self.tr( - "<tr><td><b>Lock Comment:</b></td><td>{0}</td></tr>")\ - .format(lockInfo['comment']) + "<tr><td><b>Lock Comment:</b></td><td>{0}</td></tr>" + ).format(lockInfo['comment']) if info['wc_info']: wcInfo = info['wc_info'] if wcInfo['schedule']: @@ -145,31 +148,31 @@ elif wcInfo['schedule'] == pysvn.wc_schedule.replace: schedule = self.tr("replace") infoStr += self.tr( - "<tr><td><b>Schedule:</b></td><td>{0}</td></tr>")\ - .format(schedule) + "<tr><td><b>Schedule:</b></td><td>{0}</td></tr>" + ).format(schedule) if wcInfo['copyfrom_url']: infoStr += self.tr( "<tr><td><b>Copied From URL:</b></td>" - "<td>{0}</td></tr>")\ - .format(wcInfo['copyfrom_url']) + "<td>{0}</td></tr>" + ).format(wcInfo['copyfrom_url']) infoStr += self.tr( "<tr><td><b>Copied From Rev:</b></td>" - "<td>{0}</td></tr>")\ - .format(wcInfo['copyfrom_rev'].number) + "<td>{0}</td></tr>" + ).format(wcInfo['copyfrom_rev'].number) if wcInfo['text_time']: infoStr += self.tr( "<tr><td><b>Text Last Updated:</b></td>" - "<td>{0}</td></tr>")\ - .format(formatTime(wcInfo['text_time'])) + "<td>{0}</td></tr>" + ).format(formatTime(wcInfo['text_time'])) if wcInfo['prop_time']: infoStr += self.tr( "<tr><td><b>Properties Last Updated:</b></td>" - "<td>{0}</td></tr>")\ - .format(formatTime(wcInfo['prop_time'])) + "<td>{0}</td></tr>" + ).format(formatTime(wcInfo['prop_time'])) if wcInfo['checksum']: infoStr += self.tr( - "<tr><td><b>Checksum:</b></td><td>{0}</td></tr>")\ - .format(wcInfo['checksum']) + "<tr><td><b>Checksum:</b></td><td>{0}</td></tr>" + ).format(wcInfo['checksum']) infoStr += "</table>" self.infoBrowser.setHtml(infoStr) except pysvn.ClientError as e:
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnLogBrowserDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -14,8 +14,9 @@ from PyQt5.QtCore import QMutexLocker, QDate, QRegExp, Qt, pyqtSlot, QPoint from PyQt5.QtGui import QCursor -from PyQt5.QtWidgets import QHeaderView, QWidget, QApplication, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QWidget, QApplication, QDialogButtonBox, QTreeWidgetItem +) from E5Gui import E5MessageBox @@ -77,12 +78,11 @@ self.__logTreeBoldFont.setBold(True) self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) def __initData(self): """ @@ -311,8 +311,10 @@ author, log["date"], message, log["revision"], log['changed_paths']) dt = dateFromTime_t(log["date"]) - if not self.__maxDate.isValid() and \ - not self.__minDate.isValid(): + if ( + not self.__maxDate.isValid() and + not self.__minDate.isValid() + ): self.__maxDate = dt self.__minDate = dt else: @@ -582,8 +584,11 @@ currentItem = self.logTree.currentItem() for topIndex in range(self.logTree.topLevelItemCount()): topItem = self.logTree.topLevelItem(topIndex) - if topItem.text(2) <= to_ and topItem.text(2) >= from_ and \ - searchRx.indexIn(topItem.text(fieldIndex)) > -1: + if ( + topItem.text(2) <= to_ and + topItem.text(2) >= from_ and + searchRx.indexIn(topItem.text(fieldIndex)) > -1 + ): topItem.setHidden(False) if topItem is currentItem: self.on_logTree_currentItemChanged(topItem, None)
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnNewProjectOptionsDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -53,8 +53,10 @@ self.networkPath = "localhost/" self.localProtocol = True - ipath = Preferences.getMultiProject("Workspace") or \ + ipath = ( + Preferences.getMultiProject("Workspace") or Utilities.getHomeDir() + ) self.__initPaths = [ Utilities.fromNativeSeparators(ipath), Utilities.fromNativeSeparators(ipath) + "/",
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnPropListDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnPropListDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -14,8 +14,9 @@ import pysvn from PyQt5.QtCore import pyqtSlot, QMutexLocker, Qt -from PyQt5.QtWidgets import QWidget, QHeaderView, QApplication, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QWidget, QHeaderView, QApplication, QDialogButtonBox, QTreeWidgetItem +) from .SvnDialogMixin import SvnDialogMixin from .Ui_SvnPropListDialog import Ui_SvnPropListDialog @@ -37,9 +38,8 @@ self.setupUi(self) SvnDialogMixin.__init__(self) - self.refreshButton = \ - self.buttonBox.addButton(self.tr("Refresh"), - QDialogButtonBox.ActionRole) + self.refreshButton = self.buttonBox.addButton( + self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( self.tr("Press to refresh the properties display")) self.refreshButton.setEnabled(False) @@ -52,12 +52,11 @@ self.propsList.header().setSortIndicator(0, Qt.AscendingOrder) self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) def __resort(self): """
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnRepoBrowserDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnRepoBrowserDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -12,8 +12,9 @@ from PyQt5.QtCore import QMutexLocker, Qt, pyqtSlot from PyQt5.QtGui import QCursor -from PyQt5.QtWidgets import QHeaderView, QDialog, QApplication, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QDialog, QApplication, QDialogButtonBox, QTreeWidgetItem +) from E5Gui import E5MessageBox @@ -62,12 +63,11 @@ self.__ignoreExpand = False self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) self.show() QApplication.processEvents() @@ -164,8 +164,10 @@ firstTime = parent == self.repoTree # dirent elements are all unicode in Python 2 for dirent, _lock in entries: - if (firstTime and dirent["path"] != url) or \ - (parent != self.repoTree and dirent["path"] == url): + if ( + (firstTime and dirent["path"] != url) or + (parent != self.repoTree and dirent["path"] == url) + ): continue if firstTime: if dirent["repos_path"] != "/": @@ -181,8 +183,9 @@ itm.setExpanded(True) parent = itm urlPart = repoUrl - for element in \ - dirent["repos_path"].split("/")[:-1]: + for element in ( + dirent["repos_path"].split("/")[:-1] + ): if element: urlPart = "{0}/{1}".format(urlPart, element)
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnStatusDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -15,8 +15,10 @@ from PyQt5.QtCore import QMutexLocker, Qt, pyqtSlot from PyQt5.QtGui import QCursor -from PyQt5.QtWidgets import QWidget, QHeaderView, QApplication, QMenu, \ - QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QWidget, QHeaderView, QApplication, QMenu, QDialogButtonBox, + QTreeWidgetItem +) from E5Gui.E5Application import e5App from E5Gui import E5MessageBox @@ -58,9 +60,8 @@ self.__pathColumn = 12 self.__lastColumn = self.statusList.columnCount() - self.refreshButton = \ - self.buttonBox.addButton(self.tr("Refresh"), - QDialogButtonBox.ActionRole) + self.refreshButton = self.buttonBox.addButton( + self.tr("Refresh"), QDialogButtonBox.ActionRole) self.refreshButton.setToolTip( self.tr("Press to refresh the status display")) self.refreshButton.setEnabled(False) @@ -167,12 +168,11 @@ ] self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) self.show() QApplication.processEvents() @@ -240,12 +240,14 @@ itm.setTextAlignment(11, Qt.AlignLeft) itm.setTextAlignment(12, Qt.AlignLeft) - if status in [pysvn.wc_status_kind.added, - pysvn.wc_status_kind.deleted, - pysvn.wc_status_kind.modified] or \ - propStatus in [pysvn.wc_status_kind.added, - pysvn.wc_status_kind.deleted, - pysvn.wc_status_kind.modified]: + if ( + status in [pysvn.wc_status_kind.added, + pysvn.wc_status_kind.deleted, + pysvn.wc_status_kind.modified] or + propStatus in [pysvn.wc_status_kind.added, + pysvn.wc_status_kind.deleted, + pysvn.wc_status_kind.modified] + ): itm.setFlags(itm.flags() | Qt.ItemIsUserCheckable) itm.setCheckState(self.__toBeCommittedColumn, Qt.Checked) else: @@ -326,8 +328,9 @@ for fpath, changelist in changelists: fpath = Utilities.normcasepath(fpath) changelistsDict[fpath] = changelist - hideChangelistColumn = hideChangelistColumn and \ - len(changelistsDict) == 0 + hideChangelistColumn = ( + hideChangelistColumn and len(changelistsDict) == 0 + ) # step 2: determine status of files allFiles = self.client.status(name, recurse=recurse, @@ -337,28 +340,36 @@ for file in allFiles: uptodate = True if file.repos_text_status != pysvn.wc_status_kind.none: - uptodate = uptodate and \ - file.repos_text_status != \ + uptodate = ( + uptodate and + file.repos_text_status != pysvn.wc_status_kind.modified + ) if file.repos_prop_status != pysvn.wc_status_kind.none: - uptodate = uptodate and \ - file.repos_prop_status != \ + uptodate = ( + uptodate and + file.repos_prop_status != pysvn.wc_status_kind.modified + ) lockState = " " - if file.entry is not None and \ - hasattr(file.entry, 'lock_token') and \ - file.entry.lock_token is not None: + if ( + file.entry is not None and + hasattr(file.entry, 'lock_token') and + file.entry.lock_token is not None + ): lockState = "L" if hasattr(file, 'repos_lock') and update: if lockState == "L" and file.repos_lock is None: lockState = "B" elif lockState == " " and file.repos_lock is not None: lockState = "O" - elif lockState == "L" and \ - file.repos_lock is not None and \ - file.entry.lock_token != \ - file.repos_lock["token"]: + elif ( + lockState == "L" and + file.repos_lock is not None and + file.entry.lock_token != + file.repos_lock["token"] + ): lockState = "S" fpath = Utilities.normcasepath( @@ -368,18 +379,27 @@ else: changelist = "" - hidePropertyStatusColumn = hidePropertyStatusColumn and \ + hidePropertyStatusColumn = ( + hidePropertyStatusColumn and file.prop_status in [ pysvn.wc_status_kind.none, pysvn.wc_status_kind.normal ] - hideLockColumns = hideLockColumns and \ - not file.is_locked and lockState == " " + ) + hideLockColumns = ( + hideLockColumns and + not file.is_locked and + lockState == " " + ) hideUpToDateColumn = hideUpToDateColumn and uptodate - hideHistoryColumn = hideHistoryColumn and \ + hideHistoryColumn = ( + hideHistoryColumn and not file.is_copied - hideSwitchedColumn = hideSwitchedColumn and \ + ) + hideSwitchedColumn = ( + hideSwitchedColumn and not file.is_switched + ) self.__generateItem( changelist, @@ -868,8 +888,10 @@ """ modifiedItems = [] for itm in self.statusList.selectedItems(): - if itm.text(self.__statusColumn) in self.modifiedIndicators or \ - itm.text(self.__propStatusColumn) in self.modifiedIndicators: + if ( + itm.text(self.__statusColumn) in self.modifiedIndicators or + itm.text(self.__propStatusColumn) in self.modifiedIndicators + ): modifiedItems.append(itm) return modifiedItems
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnStatusMonitorThread.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnStatusMonitorThread.py Mon Sep 23 20:03:20 2019 +0200 @@ -57,10 +57,10 @@ client = pysvn.Client() client.exception_style = 1 - client.callback_get_login = \ - self.__clientLoginCallback - client.callback_ssl_server_trust_prompt = \ + client.callback_get_login = self.__clientLoginCallback + client.callback_ssl_server_trust_prompt = ( self.__clientSslServerTrustPromptCallback + ) cwd = os.getcwd() os.chdir(self.projectDir) @@ -72,30 +72,44 @@ for file in allFiles: uptodate = True if file.repos_text_status != pysvn.wc_status_kind.none: - uptodate = uptodate and \ + uptodate = ( + uptodate and file.repos_text_status != pysvn.wc_status_kind.modified + ) if file.repos_prop_status != pysvn.wc_status_kind.none: - uptodate = uptodate and \ + uptodate = ( + uptodate and file.repos_prop_status != pysvn.wc_status_kind.modified + ) status = "" if not uptodate: status = "U" self.shouldUpdate = True - elif file.text_status == pysvn.wc_status_kind.conflicted or \ - file.prop_status == pysvn.wc_status_kind.conflicted: + elif ( + file.text_status == pysvn.wc_status_kind.conflicted or + file.prop_status == pysvn.wc_status_kind.conflicted + ): status = "Z" - elif file.text_status == pysvn.wc_status_kind.deleted or \ - file.prop_status == pysvn.wc_status_kind.deleted: + elif ( + file.text_status == pysvn.wc_status_kind.deleted or + file.prop_status == pysvn.wc_status_kind.deleted + ): status = "O" - elif file.text_status == pysvn.wc_status_kind.modified or \ - file.prop_status == pysvn.wc_status_kind.modified: + elif ( + file.text_status == pysvn.wc_status_kind.modified or + file.prop_status == pysvn.wc_status_kind.modified + ): status = "M" - elif file.text_status == pysvn.wc_status_kind.added or \ - file.prop_status == pysvn.wc_status_kind.added: + elif ( + file.text_status == pysvn.wc_status_kind.added or + file.prop_status == pysvn.wc_status_kind.added + ): status = "A" - elif file.text_status == pysvn.wc_status_kind.replaced or \ - file.prop_status == pysvn.wc_status_kind.replaced: + elif ( + file.text_status == pysvn.wc_status_kind.replaced or + file.prop_status == pysvn.wc_status_kind.replaced + ): status = "R" if status: states[file.path] = status
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnTagBranchListDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -13,8 +13,10 @@ import pysvn from PyQt5.QtCore import QMutexLocker, QRegExp, Qt -from PyQt5.QtWidgets import QHeaderView, QLineEdit, QDialog, QInputDialog, \ - QApplication, QDialogButtonBox, QTreeWidgetItem +from PyQt5.QtWidgets import ( + QHeaderView, QLineEdit, QDialog, QInputDialog, QApplication, + QDialogButtonBox, QTreeWidgetItem +) from E5Gui import E5MessageBox @@ -50,12 +52,11 @@ self.tagList.header().setSortIndicator(3, Qt.AscendingOrder) self.client = self.vcs.getClient() - self.client.callback_cancel = \ - self._clientCancelCallback - self.client.callback_get_login = \ - self._clientLoginCallback - self.client.callback_ssl_server_trust_prompt = \ + self.client.callback_cancel = self._clientCancelCallback + self.client.callback_get_login = self._clientLoginCallback + self.client.callback_ssl_server_trust_prompt = ( self._clientSslServerTrustPromptCallback + ) def start(self, path, tags=True): """
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnUrlSelectionDialog.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnUrlSelectionDialog.py Mon Sep 23 20:03:20 2019 +0200 @@ -80,8 +80,10 @@ self.repoRootLabel2.setText(reposRoot) else: project = e5App().getObject('Project') - if Utilities.normcasepath(path) != \ - Utilities.normcasepath(project.getProjectPath()): + if ( + Utilities.normcasepath(path) != + Utilities.normcasepath(project.getProjectPath()) + ): path = project.getRelativePath(path) reposURL = reposURL.replace(path, '') self.repoRootLabel1.hide() @@ -145,12 +147,16 @@ a flag indicating a diff summary (boolean) """ if self.vcs.otherData["standardLayout"]: - url1 = self.repoRootLabel1.text() + \ - self.typeCombo1.currentText() + \ + url1 = ( + self.repoRootLabel1.text() + + self.typeCombo1.currentText() + self.labelCombo1.currentText() - url2 = self.repoRootLabel2.text() + \ - self.typeCombo2.currentText() + \ + ) + url2 = ( + self.repoRootLabel2.text() + + self.typeCombo2.currentText() + self.labelCombo2.currentText() + ) else: url1 = self.labelCombo1.currentText() url2 = self.labelCombo2.currentText()
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/SvnUtilities.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/SvnUtilities.py Mon Sep 23 20:03:20 2019 +0200 @@ -24,9 +24,11 @@ @param seconds time in seconds since epoch to be formatted (float or long) @return formatted time string (string) """ - return QDateTime.fromTime_t(int(seconds))\ - .toTimeSpec(Qt.LocalTime)\ - .toString("yyyy-MM-dd hh:mm:ss") + return ( + QDateTime.fromTime_t(int(seconds)) + .toTimeSpec(Qt.LocalTime) + .toString("yyyy-MM-dd hh:mm:ss") + ) def dateFromTime_t(seconds):
--- a/eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py Mon Sep 23 19:22:12 2019 +0200 +++ b/eric6/Plugins/VcsPlugins/vcsPySvn/subversion.py Mon Sep 23 20:03:20 2019 +0200 @@ -13,8 +13,9 @@ import time from urllib.parse import quote -from PyQt5.QtCore import Qt, QMutexLocker, pyqtSignal, QRegExp, QDateTime, \ - QCoreApplication +from PyQt5.QtCore import ( + Qt, QMutexLocker, pyqtSignal, QRegExp, QDateTime, QCoreApplication +) from PyQt5.QtWidgets import QLineEdit, QDialog, QInputDialog, QApplication from E5Gui.E5Application import e5App @@ -85,8 +86,10 @@ self.commandHistory = [] self.wdHistory = [] - if pysvn.version >= (1, 4, 3, 0) and \ - "SVN_ASP_DOT_NET_HACK" in os.environ: + if ( + pysvn.version >= (1, 4, 3, 0) and + "SVN_ASP_DOT_NET_HACK" in os.environ + ): self.adminDir = '_svn' else: self.adminDir = '.svn' @@ -356,8 +359,10 @@ if tag is None or tag == '': svnUrl = '{0}/trunk'.format(vcsDir) else: - if not tag.startswith('tags') and \ - not tag.startswith('branches'): + if ( + not tag.startswith('tags') and + not tag.startswith('branches') + ): type_, ok = QInputDialog.getItem( None, self.tr("Subversion Checkout"), @@ -421,8 +426,10 @@ if tag is None or tag == '': svnUrl = '{0}/trunk'.format(vcsDir) else: - if not tag.startswith('tags') and \ - not tag.startswith('branches'): + if ( + not tag.startswith('tags') and + not tag.startswith('branches') + ): type_, ok = QInputDialog.getItem( None, self.tr("Subversion Export"), @@ -511,12 +518,11 @@ project = e5App().getObject("Project") if nam == project.getProjectPath(): ok &= project.checkAllScriptsDirty( - reportSyntaxErrors=True) and \ - project.checkDirty() + reportSyntaxErrors=True) and project.checkDirty() continue elif os.path.isfile(nam): - editor = e5App().getObject("ViewManager")\ - .getOpenEditor(nam) + editor = e5App().getObject("ViewManager").getOpenEditor( + nam) if editor: ok &= editor.checkDirty() if not ok: @@ -536,8 +542,9 @@ if self.__commitDialog is not None: msg = self.__commitDialog.logMessage() if self.__commitDialog.hasChangelists(): - changelists, keepChangelists = \ + changelists, keepChangelists = ( self.__commitDialog.changelistsData() + ) else: changelists, keepChangelists = [], False self.__commitDialog.deleteLater() @@ -554,8 +561,10 @@ dname, fname = self.splitPath(name) fnames = [fname] - if self.svnGetReposName(dname).startswith('http') or \ - self.svnGetReposName(dname).startswith('svn'): + if ( + self.svnGetReposName(dname).startswith('http') or + self.svnGetReposName(dname).startswith('svn') + ): noDialog = False locker = QMutexLocker(self.vcsExecutionMutex) @@ -674,10 +683,12 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while os.path.normcase(dname) != os.path.normcase(repodir) and \ + while ( + os.path.normcase(dname) != os.path.normcase(repodir) and (os.path.normcase(dname) not in self.statusCache or self.statusCache[os.path.normcase(dname)] == - self.canBeAdded): + self.canBeAdded) + ): # add directories recursively, if they aren't in the # repository already tree.insert(-1, dname) @@ -703,12 +714,13 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while (os.path.normcase(d) != - os.path.normcase(repodir)) and \ - (d not in tree2 + tree) and \ + while ( + (os.path.normcase(d) != os.path.normcase(repodir)) and + (d not in tree2 + tree) and (os.path.normcase(d) not in self.statusCache or self.statusCache[os.path.normcase(d)] == - self.canBeAdded): + self.canBeAdded) + ): tree2.append(d) d = os.path.dirname(d) else: @@ -783,12 +795,13 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while (os.path.normcase(d) != - os.path.normcase(repodir)) and \ - (d not in tree) and \ + while ( + (os.path.normcase(d) != os.path.normcase(repodir)) and + (d not in tree) and (os.path.normcase(d) not in self.statusCache or self.statusCache[os.path.normcase(d)] == - self.canBeAdded): + self.canBeAdded) + ): tree.append(d) d = os.path.dirname(d) else: @@ -808,11 +821,12 @@ repodir = os.path.dirname(repodir) if os.path.splitdrive(repodir)[1] == os.sep: return # oops, project is not version controlled - while (os.path.normcase(dname) != - os.path.normcase(repodir)) and \ + while ( + (os.path.normcase(dname) != os.path.normcase(repodir)) and (os.path.normcase(dname) not in self.statusCache or self.statusCache[os.path.normcase(dname)] == - self.canBeAdded): + self.canBeAdded) + ): # add directories recursively, if they aren't in the # repository already tree.insert(-1, dname) @@ -942,14 +956,13 @@ log = "" target = target if not noDialog: - dlg = \ - SvnDialog( - self.tr('Moving {0}').format(name), - "move{0}{1} {2} {3}".format( - force and " --force" or "", - log and (" --message {0}".format(log)) or "", - name, target), - client, log=log) + dlg = SvnDialog( + self.tr('Moving {0}').format(name), + "move{0}{1} {2} {3}".format( + force and " --force" or "", + log and (" --message {0}".format(log)) or "", + name, target), + client, log=log) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: @@ -1131,8 +1144,9 @@ project = e5App().getObject("Project") names = [project.getRelativePath(nam) for nam in name] if names[0]: - from UI.DeleteFilesConfirmationDialog import \ + from UI.DeleteFilesConfirmationDialog import ( DeleteFilesConfirmationDialog + ) dia = DeleteFilesConfirmationDialog( self.parent(), self.tr("Revert changes"), @@ -1330,16 +1344,15 @@ revision2 = pysvn.Revision(pysvn.opt_revision_kind.unspecified) rev2 = "" client = self.getClient() - dlg = \ - SvnDialog( - self.tr('Merging {0}').format(name), - "merge{0}{1} {2} {3} {4}".format( - (not recurse) and " --non-recursive" or "", - force and " --force" or "", - "{0}{1}".format(url1, rev1 and ("@" + rev1) or ""), - "{0}{1}".format(url2, rev2 and ("@" + rev2) or ""), - fname), - client) + dlg = SvnDialog( + self.tr('Merging {0}').format(name), + "merge{0}{1} {2} {3} {4}".format( + (not recurse) and " --non-recursive" or "", + force and " --force" or "", + "{0}{1}".format(url1, rev1 and ("@" + rev1) or ""), + "{0}{1}".format(url2, rev2 and ("@" + rev2) or ""), + fname), + client) QApplication.processEvents() try: client.merge(url1, revision1, url2, revision2, fname, @@ -1477,10 +1490,10 @@ from .SvnDialogMixin import SvnDialogMixin mixin = SvnDialogMixin() client = self.getClient() - client.callback_get_login = \ - mixin._clientLoginCallback - client.callback_ssl_server_trust_prompt = \ + client.callback_get_login = mixin._clientLoginCallback + client.callback_ssl_server_trust_prompt = ( mixin._clientSslServerTrustPromptCallback + ) try: locker = QMutexLocker(self.vcsExecutionMutex) @@ -1495,11 +1508,16 @@ if name in names: names[name] = self.canBeCommitted dn = name - while os.path.splitdrive(dn)[1] != os.sep and \ - dn != repodir: + while ( + os.path.splitdrive(dn)[1] != os.sep and + dn != repodir + ): dn = os.path.dirname(dn) - if dn in self.statusCache and \ - self.statusCache[dn] == self.canBeCommitted: + if ( + dn in self.statusCache and + self.statusCache[dn] == + self.canBeCommitted + ): break self.statusCache[dn] = self.canBeCommitted self.statusCache[name] = self.canBeCommitted @@ -1553,10 +1571,10 @@ from .SvnDialogMixin import SvnDialogMixin mixin = SvnDialogMixin() client = self.getClient() - client.callback_get_login = \ - mixin._clientLoginCallback - client.callback_ssl_server_trust_prompt = \ + client.callback_get_login = mixin._clientLoginCallback + client.callback_ssl_server_trust_prompt = ( mixin._clientSslServerTrustPromptCallback + ) try: locker = QMutexLocker(self.vcsExecutionMutex) @@ -1669,8 +1687,9 @@ args = [] self.addArguments(args, commandList) - from Plugins.VcsPlugins.vcsSubversion.SvnDialog import \ + from Plugins.VcsPlugins.vcsSubversion.SvnDialog import ( SvnDialog as SvnProcessDialog + ) dia = SvnProcessDialog(self.tr('Subversion command')) res = dia.startProcess(args, wd) if res: @@ -1736,18 +1755,18 @@ """<tr><td><b>Comitted time</b></td><td>{7}</td></tr>""" """<tr><td><b>Last author</b></td><td>{8}</td></tr>""" """</table>""" - )\ - .format(".".join([str(v) for v in pysvn.version]), - ".".join([str(v) for v in pysvn.svn_version[:3]]), - apiVersion, - entry.url, - entry.revision.number, - entry.commit_revision.number, - time.strftime( - "%Y-%m-%d", time.localtime(entry.commit_time)), - hmsz, - entry.commit_author - ) + ).format( + ".".join([str(v) for v in pysvn.version]), + ".".join([str(v) for v in pysvn.svn_version[:3]]), + apiVersion, + entry.url, + entry.revision.number, + entry.commit_revision.number, + time.strftime( + "%Y-%m-%d", time.localtime(entry.commit_time)), + hmsz, + entry.commit_author + ) ########################################################################### ## Public Subversion specific methods are below. @@ -1828,13 +1847,12 @@ else: log = "" target = target - dlg = \ - SvnDialog( - self.tr('Copying {0}').format(name), - "copy{0} {1} {2}".format( - log and (" --message {0}".format(log)) or "", - name, target), - client, log=log) + dlg = SvnDialog( + self.tr('Copying {0}').format(name), + "copy{0} {1} {2}".format( + log and (" --message {0}".format(log)) or "", + name, target), + client, log=log) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: @@ -1846,9 +1864,11 @@ locker.unlock() dlg.finish() dlg.exec_() - if res and \ - not rx_prot.exactMatch(target) and \ - target.startswith(project.getProjectPath()): + if ( + res and + not rx_prot.exactMatch(target) and + target.startswith(project.getProjectPath()) + ): if os.path.isdir(name): project.copyDirectory(name, target) else: @@ -1901,15 +1921,14 @@ opts = self.options['global'] skipchecks = "--skip-checks" in opts client = self.getClient() - dlg = \ - SvnDialog( - self.tr('Subversion Set Property'), - "propset{0}{1} {2} {3} {4}".format( - recurse and " --recurse" or "", - skipchecks and " --skip-checks" or "", - propName, propValue, - " ".join(fnames)), - client) + dlg = SvnDialog( + self.tr('Subversion Set Property'), + "propset{0}{1} {2} {3} {4}".format( + recurse and " --recurse" or "", + skipchecks and " --skip-checks" or "", + propName, propValue, + " ".join(fnames)), + client) QApplication.processEvents() try: for name in fnames: @@ -1955,14 +1974,13 @@ opts = self.options['global'] skipchecks = "--skip-checks" in opts client = self.getClient() - dlg = \ - SvnDialog( - self.tr('Subversion Delete Property'), - "propdel{0}{1} {2} {3}".format( - recurse and " --recurse" or "", - skipchecks and " --skip-checks" or "", - propName, " ".join(fnames)), - client) + dlg = SvnDialog( + self.tr('Subversion Delete Property'), + "propdel{0}{1} {2} {3}".format( + recurse and " --recurse" or "", + skipchecks and " --skip-checks" or "", + propName, " ".join(fnames)), + client) QApplication.processEvents() try: for name in fnames: @@ -1995,14 +2013,18 @@ if tags: self.tagsList = self.tagbranchList.getTagList() if not self.showedTags: - self.allTagsBranchesList = \ - self.allTagsBranchesList + self.tagsList + self.allTagsBranchesList = ( + self.allTagsBranchesList + + self.tagsList + ) self.showedTags = True elif not tags: self.branchesList = self.tagbranchList.getTagList() if not self.showedBranches: - self.allTagsBranchesList = \ - self.allTagsBranchesList + self.branchesList + self.allTagsBranchesList = ( + self.allTagsBranchesList + + self.branchesList + ) self.showedBranches = True def svnBlame(self, name): @@ -2258,14 +2280,13 @@ cwd = os.getcwd() os.chdir(dname) client = self.getClient() - dlg = \ - SvnDialog( - self.tr('Locking in the Subversion repository'), - "lock{0}{1} {2}".format( - stealIt and " --force" or "", - comment and (" --message {0}".format(comment)) or "", - " ".join(fnames)), - client, parent=parent) + dlg = SvnDialog( + self.tr('Locking in the Subversion repository'), + "lock{0}{1} {2}".format( + stealIt and " --force" or "", + comment and (" --message {0}".format(comment)) or "", + " ".join(fnames)), + client, parent=parent) QApplication.processEvents() try: client.lock(fnames, comment, force=stealIt) @@ -2298,13 +2319,11 @@ cwd = os.getcwd() os.chdir(dname) client = self.getClient() - dlg = \ - SvnDialog( - self.tr('Unlocking in the Subversion repository'), - "unlock{0} {1}".format( - breakIt and " --force" or "", - " ".join(fnames)), - client, parent=parent) + dlg = SvnDialog( + self.tr('Unlocking in the Subversion repository'), + "unlock{0} {1}".format(breakIt and " --force" or "", + " ".join(fnames)), + client, parent=parent) QApplication.processEvents() try: client.unlock(fnames, force=breakIt) @@ -2346,8 +2365,7 @@ 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) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: @@ -2400,10 +2418,10 @@ if not isinstance(names, list): names = [names] client = self.getClient() - dlg = \ - SvnDialog(self.tr('Remove from changelist'), - "changelist --remove {0}".format(" ".join(names)), - client) + dlg = SvnDialog( + self.tr('Remove from changelist'), + "changelist --remove {0}".format(" ".join(names)), + client) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: @@ -2437,10 +2455,10 @@ return client = self.getClient() - dlg = \ - SvnDialog(self.tr('Add to changelist'), - "changelist {0}".format(" ".join(names)), - client) + dlg = SvnDialog( + self.tr('Add to changelist'), + "changelist {0}".format(" ".join(names)), + client) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: @@ -2496,10 +2514,10 @@ @param path directory name to show change lists for (string) """ client = self.getClient() - dlg = \ - SvnDialog(self.tr('Upgrade'), - "upgrade {0}".format(path), - client) + dlg = SvnDialog( + self.tr('Upgrade'), + "upgrade {0}".format(path), + client) QApplication.processEvents() locker = QMutexLocker(self.vcsExecutionMutex) try: @@ -2590,15 +2608,16 @@ """ helper = self.__plugin.getProjectHelper() helper.setObjects(self, project) - self.__wcng = \ + self.__wcng = ( os.path.exists( - os.path.join(project.getProjectPath(), ".svn", "format")) or \ + os.path.join(project.getProjectPath(), ".svn", "format")) or os.path.exists( - os.path.join(project.getProjectPath(), "_svn", "format")) or \ + os.path.join(project.getProjectPath(), "_svn", "format")) or os.path.exists( - os.path.join(project.getProjectPath(), ".svn", "wc.db")) or \ + os.path.join(project.getProjectPath(), ".svn", "wc.db")) or os.path.exists( os.path.join(project.getProjectPath(), "_svn", "wc.db")) + ) return helper ###########################################################################