Plugins/VcsPlugins/vcsSubversion/subversion.py

branch
Py2 comp.
changeset 3058
0a02c433f52d
parent 3057
10516539f238
parent 3025
67064c71df21
child 3060
5883ce99ee12
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py	Fri Oct 18 23:00:41 2013 +0200
+++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py	Fri Nov 01 15:48:48 2013 +0100
@@ -211,7 +211,8 @@
         """
         success = self.vcsImport(vcsDataDict, project.ppath)[0]
         if not success:
-            E5MessageBox.critical(self.__ui,
+            E5MessageBox.critical(
+                self.__ui,
                 self.trUtf8("Create project in repository"),
                 self.trUtf8(
                     """The project could not be created in the repository."""
@@ -234,7 +235,8 @@
             if not os.path.isfile(pfn):
                 pfn += "z"
             if not os.path.isfile(pfn):
-                E5MessageBox.critical(self.__ui,
+                E5MessageBox.critical(
+                    self.__ui,
                     self.trUtf8("New project"),
                     self.trUtf8(
                         """The project could not be checked out of the"""
@@ -306,8 +308,8 @@
         args.append(self.__svnURL(vcsDir))
         
         if noDialog:
-            status = self.startSynchronizedProcess(QProcess(), "svn", args,
-                os.path.join(tmpDir, project))
+            status = self.startSynchronizedProcess(
+                QProcess(), "svn", args, os.path.join(tmpDir, project))
         else:
             dia = SvnDialog(
                 self.trUtf8('Importing project into Subversion repository'))
@@ -349,7 +351,8 @@
                     type, ok = QInputDialog.getItem(
                         None,
                         self.trUtf8("Subversion Checkout"),
-                        self.trUtf8("The tag must be a normal tag (tags) or"
+                        self.trUtf8(
+                            "The tag must be a normal tag (tags) or"
                             " a branch tag (branches)."
                             " Please select from the list."),
                         self.tagTypeList,
@@ -404,7 +407,8 @@
                     type, ok = QInputDialog.getItem(
                         None,
                         self.trUtf8("Subversion Export"),
-                        self.trUtf8("The tag must be a normal tag (tags) or"
+                        self.trUtf8(
+                            "The tag must be a normal tag (tags) or"
                             " a branch tag (branches)."
                             " Please select from the list."),
                         self.tagTypeList,
@@ -492,7 +496,8 @@
                     break
             
             if not ok:
-                res = E5MessageBox.yesNo(self.__ui,
+                res = E5MessageBox.yesNo(
+                    self.__ui,
                     self.trUtf8("Commit Changes"),
                     self.trUtf8(
                         """The commit affects files, that have unsaved"""
@@ -655,7 +660,7 @@
                                 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.statusCache[os.path.normcase(d)] == \
                                 self.canBeAdded):
                         tree2.append(d)
                         d = os.path.dirname(d)
@@ -860,7 +865,7 @@
                 res = self.startSynchronizedProcess(QProcess(), "svn", args)
             else:
                 dia = SvnDialog(self.trUtf8('Moving {0}')
-                    .format(name))
+                                .format(name))
                 res = dia.startProcess(args)
                 if res:
                     dia.exec_()
@@ -952,7 +957,8 @@
         
         reposURL = self.svnGetReposName(dname)
         if reposURL is None:
-            E5MessageBox.critical(self.__ui,
+            E5MessageBox.critical(
+                self.__ui,
                 self.trUtf8("Subversion Error"),
                 self.trUtf8(
                     """The URL of the project repository could not be"""
@@ -978,9 +984,11 @@
         if self.otherData["standardLayout"]:
             rx_base = QRegExp('(.+)/(trunk|tags|branches).*')
             if not rx_base.exactMatch(reposURL):
-                E5MessageBox.critical(self.__ui,
+                E5MessageBox.critical(
+                    self.__ui,
                     self.trUtf8("Subversion Error"),
-                    self.trUtf8("""The URL of the project repository has an"""
+                    self.trUtf8(
+                        """The URL of the project repository has an"""
                         """ invalid format. The tag operation will"""
                         """ be aborted"""))
                 return
@@ -1012,7 +1020,7 @@
             args.append(url)
         
         dia = SvnDialog(self.trUtf8('Tagging {0} in the Subversion repository')
-            .format(name))
+                        .format(name))
         res = dia.startProcess(args)
         if res:
             dia.exec_()
@@ -1040,14 +1048,16 @@
         if names[0]:
             from UI.DeleteFilesConfirmationDialog import \
                 DeleteFilesConfirmationDialog
-            dlg = DeleteFilesConfirmationDialog(self.parent(),
+            dlg = DeleteFilesConfirmationDialog(
+                self.parent(),
                 self.trUtf8("Revert changes"),
                 self.trUtf8("Do you really want to revert all changes to"
                             " these files or directories?"),
                 names)
             yes = dlg.exec_() == QDialog.Accepted
         else:
-            yes = E5MessageBox.yesNo(None,
+            yes = E5MessageBox.yesNo(
+                None,
                 self.trUtf8("Revert changes"),
                 self.trUtf8("""Do you really want to revert all changes of"""
                             """ the project?"""))
@@ -1069,7 +1079,8 @@
         
         reposURL = self.svnGetReposName(dname)
         if reposURL is None:
-            E5MessageBox.critical(self.__ui,
+            E5MessageBox.critical(
+                self.__ui,
                 self.trUtf8("Subversion Error"),
                 self.trUtf8(
                     """The URL of the project repository could not be"""
@@ -1095,9 +1106,11 @@
         if self.otherData["standardLayout"]:
             rx_base = QRegExp('(.+)/(trunk|tags|branches).*')
             if not rx_base.exactMatch(reposURL):
-                E5MessageBox.critical(self.__ui,
+                E5MessageBox.critical(
+                    self.__ui,
                     self.trUtf8("Subversion Error"),
-                    self.trUtf8("""The URL of the project repository has an"""
+                    self.trUtf8(
+                        """The URL of the project repository has an"""
                         """ invalid format. The switch operation will"""
                         """ be aborted"""))
                 return False
@@ -1125,7 +1138,7 @@
         args.append(name)
         
         dia = SvnDialog(self.trUtf8('Switching to {0}')
-            .format(tn))
+                        .format(tn))
         res = dia.startProcess(args, setLanguage=True)
         if res:
             dia.exec_()
@@ -1456,7 +1469,7 @@
         args.append(name)
         
         dia = SvnDialog(self.trUtf8('Cleaning up {0}')
-            .format(name))
+                        .format(name))
         res = dia.startProcess(args)
         if res:
             dia.exec_()
@@ -1578,7 +1591,8 @@
                         info['committed-time'] = "{0}{1}".format(
                             time.split('.')[0], time[-1])
         
-        return QApplication.translate('subversion',
+        return QApplication.translate(
+            'subversion',
             """<h3>Repository information</h3>"""
             """<table>"""
             """<tr><td><b>Subversion V.</b></td><td>{0}</td></tr>"""
@@ -1687,7 +1701,7 @@
             args.append(target)
             
             dia = SvnDialog(self.trUtf8('Copying {0}')
-                .format(name))
+                            .format(name))
             res = dia.startProcess(args)
             if res:
                 dia.exec_()
@@ -1725,7 +1739,8 @@
         if dlg.exec_() == QDialog.Accepted:
             propName, fileFlag, propValue = dlg.getData()
             if not propName:
-                E5MessageBox.critical(self.__ui,
+                E5MessageBox.critical(
+                    self.__ui,
                     self.trUtf8("Subversion Set Property"),
                     self.trUtf8("""You have to supply a property name."""
                                 """ Aborting."""))
@@ -1769,7 +1784,8 @@
             return
         
         if not propName:
-            E5MessageBox.critical(self.__ui,
+            E5MessageBox.critical(
+                self.__ui,
                 self.trUtf8("Subversion Delete Property"),
                 self.trUtf8("""You have to supply a property name."""
                             """ Aborting."""))
@@ -1902,7 +1918,7 @@
         
         from .SvnUrlSelectionDialog import SvnUrlSelectionDialog
         dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList,
-        dname)
+                                    dname)
         if dlg.exec_() == QDialog.Accepted:
             urls, summary = dlg.getURLs()
             from .SvnDiffDialog import SvnDiffDialog
@@ -1937,17 +1953,20 @@
             finished = process.waitForFinished(30000)
             if finished:
                 if process.exitCode() == 0:
-                    output = str(process.readAllStandardOutput(),
+                    output = str(
+                        process.readAllStandardOutput(),
                         Preferences.getSystem("IOEncoding"), 'replace')
                 else:
-                    error = str(process.readAllStandardError(),
+                    error = str(
+                        process.readAllStandardError(),
                         Preferences.getSystem("IOEncoding"), 'replace')
             else:
                 error = self.trUtf8(
                     "The svn process did not finish within 30s.")
         else:
-            error = self.trUtf8('The process {0} could not be started. '
-                    'Ensure, that it is in the search path.').format('svn')
+            error = self.trUtf8(
+                'The process {0} could not be started. '
+                'Ensure, that it is in the search path.').format('svn')
         
         return output, error
     
@@ -1980,7 +1999,8 @@
         
         output1, error = self.__svnGetFileForRevision(name, rev=rev1)
         if error:
-            E5MessageBox.critical(self.__ui,
+            E5MessageBox.critical(
+                self.__ui,
                 self.trUtf8("Subversion Side-by-Side Difference"),
                 error)
             return
@@ -1989,7 +2009,8 @@
         if rev2:
             output2, error = self.__svnGetFileForRevision(name, rev=rev2)
             if error:
-                E5MessageBox.critical(self.__ui,
+                E5MessageBox.critical(
+                    self.__ui,
                     self.trUtf8("Subversion Side-by-Side Difference"),
                     error)
                 return
@@ -2001,7 +2022,8 @@
                 f1.close()
                 name2 = name
             except IOError:
-                E5MessageBox.critical(self.__ui,
+                E5MessageBox.critical(
+                    self.__ui,
                     self.trUtf8("Subversion Side-by-Side Difference"),
                     self.trUtf8(
                         """<p>The file <b>{0}</b> could not be read.</p>""")

eric ide

mercurial