Plugins/VcsPlugins/vcsSubversion/subversion.py

branch
Py2 comp.
changeset 3060
5883ce99ee12
parent 3058
0a02c433f52d
parent 3051
f08c20c91de7
child 3141
72f3bde98c58
--- a/Plugins/VcsPlugins/vcsSubversion/subversion.py	Fri Nov 01 15:48:48 2013 +0100
+++ b/Plugins/VcsPlugins/vcsSubversion/subversion.py	Sun Nov 03 15:58:22 2013 +0100
@@ -104,7 +104,7 @@
         
         # regular expression object for evaluation of the status output
         self.rx_status1 = QRegExp(
-            '(.{8})\\s+([0-9-]+)\\s+([0-9?]+)\\s+([\\w?]+)\\s+(.+)')
+            '(.{8})\\s+([0-9-]+)\\s+([0-9?]+)\\s+(\\S+)\\s+(.+)')
         self.rx_status2 = QRegExp('(.{8})\\s+(.+)\\s*')
         self.statusCache = {}
         
@@ -484,7 +484,7 @@
                     project = e5App().getObject("Project")
                     if nam == project.getProjectPath():
                         ok &= project.checkAllScriptsDirty(
-                                reportSyntaxErrors=True) and \
+                            reportSyntaxErrors=True) and \
                             project.checkDirty()
                         continue
                 elif os.path.isfile(nam):
@@ -628,8 +628,8 @@
                 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 \
-                    (os.path.normcase(dname) not in self.statusCache or \
-                     self.statusCache[os.path.normcase(dname)] == 
+                    (os.path.normcase(dname) not in self.statusCache or
+                     self.statusCache[os.path.normcase(dname)] ==
                         self.canBeAdded):
                 # add directories recursively, if they aren't in the
                 # repository already
@@ -657,10 +657,10 @@
                         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 \
+                        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)] == \
+                            (os.path.normcase(d) not in self.statusCache or
+                             self.statusCache[os.path.normcase(d)] ==
                                 self.canBeAdded):
                         tree2.append(d)
                         d = os.path.dirname(d)
@@ -722,10 +722,10 @@
                         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 \
+                        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)] == \
+                            (os.path.normcase(d) not in self.statusCache or
+                             self.statusCache[os.path.normcase(d)] ==
                                 self.canBeAdded):
                         tree.append(d)
                         d = os.path.dirname(d)
@@ -747,9 +747,9 @@
                     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 \
-                        (os.path.normcase(dname) not in self.statusCache or \
-                         self.statusCache[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):
                     # add directories recursively, if they aren't in the
                     # repository already
@@ -1536,7 +1536,7 @@
         @param ppath local path to get the repository infos (string)
         @return string with ready formated info for display (string)
         """
-        info = {\
+        info = {
             'committed-rev': '',
             'committed-date': '',
             'committed-time': '',
@@ -1603,14 +1603,13 @@
             """<tr><td><b>Comitted time</b></td><td>{5}</td></tr>"""
             """<tr><td><b>Last author</b></td><td>{6}</td></tr>"""
             """</table>"""
-            )\
-            .format(self.versionStr,
-                    info['url'],
-                    info['revision'],
-                    info['committed-rev'],
-                    info['committed-date'],
-                    info['committed-time'],
-                    info['last-author'])
+        ).format(self.versionStr,
+                 info['url'],
+                 info['revision'],
+                 info['committed-rev'],
+                 info['committed-date'],
+                 info['committed-time'],
+                 info['last-author'])
     
     ###########################################################################
     ## Public Subversion specific methods are below.
@@ -2027,7 +2026,7 @@
                     self.trUtf8("Subversion Side-by-Side Difference"),
                     self.trUtf8(
                         """<p>The file <b>{0}</b> could not be read.</p>""")
-                        .format(name))
+                    .format(name))
                 return
         
         if self.sbsDiff is None:
@@ -2349,7 +2348,11 @@
             os.path.exists(
                 os.path.join(project.getProjectPath(), ".svn", "format")) or \
             os.path.exists(
-                os.path.join(project.getProjectPath(), "_svn", "format"))
+                os.path.join(project.getProjectPath(), "_svn", "format")) or \
+            os.path.exists(
+                os.path.join(project.getProjectPath(), ".svn", "wc.db")) or \
+            os.path.exists(
+                os.path.join(project.getProjectPath(), "_svn", "wc.db"))
         return helper
 
     ###########################################################################

eric ide

mercurial