102 self.blame = None |
102 self.blame = None |
103 self.repoBrowser = None |
103 self.repoBrowser = None |
104 |
104 |
105 # regular expression object for evaluation of the status output |
105 # regular expression object for evaluation of the status output |
106 self.rx_status1 = QRegExp( |
106 self.rx_status1 = QRegExp( |
107 '(.{8})\\s+([0-9-]+)\\s+([0-9?]+)\\s+([\\w?]+)\\s+(.+)') |
107 '(.{8})\\s+([0-9-]+)\\s+([0-9?]+)\\s+(\\S+)\\s+(.+)') |
108 self.rx_status2 = QRegExp('(.{8})\\s+(.+)\\s*') |
108 self.rx_status2 = QRegExp('(.{8})\\s+(.+)\\s*') |
109 self.statusCache = {} |
109 self.statusCache = {} |
110 |
110 |
111 self.__commitData = {} |
111 self.__commitData = {} |
112 self.__commitDialog = None |
112 self.__commitDialog = None |
482 # check for commit of the project |
482 # check for commit of the project |
483 if os.path.isdir(nam): |
483 if os.path.isdir(nam): |
484 project = e5App().getObject("Project") |
484 project = e5App().getObject("Project") |
485 if nam == project.getProjectPath(): |
485 if nam == project.getProjectPath(): |
486 ok &= project.checkAllScriptsDirty( |
486 ok &= project.checkAllScriptsDirty( |
487 reportSyntaxErrors=True) and \ |
487 reportSyntaxErrors=True) and \ |
488 project.checkDirty() |
488 project.checkDirty() |
489 continue |
489 continue |
490 elif os.path.isfile(nam): |
490 elif os.path.isfile(nam): |
491 editor = e5App().getObject("ViewManager")\ |
491 editor = e5App().getObject("ViewManager")\ |
492 .getOpenEditor(nam) |
492 .getOpenEditor(nam) |
626 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
626 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
627 repodir = os.path.dirname(repodir) |
627 repodir = os.path.dirname(repodir) |
628 if os.path.splitdrive(repodir)[1] == os.sep: |
628 if os.path.splitdrive(repodir)[1] == os.sep: |
629 return # oops, project is not version controlled |
629 return # oops, project is not version controlled |
630 while os.path.normcase(dname) != os.path.normcase(repodir) and \ |
630 while os.path.normcase(dname) != os.path.normcase(repodir) and \ |
631 (os.path.normcase(dname) not in self.statusCache or \ |
631 (os.path.normcase(dname) not in self.statusCache or |
632 self.statusCache[os.path.normcase(dname)] == |
632 self.statusCache[os.path.normcase(dname)] == |
633 self.canBeAdded): |
633 self.canBeAdded): |
634 # add directories recursively, if they aren't in the |
634 # add directories recursively, if they aren't in the |
635 # repository already |
635 # repository already |
636 tree.insert(-1, dname) |
636 tree.insert(-1, dname) |
637 dname = os.path.dirname(dname) |
637 dname = os.path.dirname(dname) |
655 os.path.join(repodir, self.adminDir)): |
655 os.path.join(repodir, self.adminDir)): |
656 repodir = os.path.dirname(repodir) |
656 repodir = os.path.dirname(repodir) |
657 if os.path.splitdrive(repodir)[1] == os.sep: |
657 if os.path.splitdrive(repodir)[1] == os.sep: |
658 return # oops, project is not version controlled |
658 return # oops, project is not version controlled |
659 while os.path.normcase(d) != \ |
659 while os.path.normcase(d) != \ |
660 os.path.normcase(repodir) and \ |
660 os.path.normcase(repodir) and \ |
661 (d not in tree2 + tree) and \ |
661 (d not in tree2 + tree) and \ |
662 (os.path.normcase(d) not in self.statusCache or \ |
662 (os.path.normcase(d) not in self.statusCache or |
663 self.statusCache[os.path.normcase(d)] == \ |
663 self.statusCache[os.path.normcase(d)] == |
664 self.canBeAdded): |
664 self.canBeAdded): |
665 tree2.append(d) |
665 tree2.append(d) |
666 d = os.path.dirname(d) |
666 d = os.path.dirname(d) |
667 else: |
667 else: |
668 while not os.path.exists(os.path.join(d, self.adminDir)): |
668 while not os.path.exists(os.path.join(d, self.adminDir)): |
720 os.path.join(repodir, self.adminDir)): |
720 os.path.join(repodir, self.adminDir)): |
721 repodir = os.path.dirname(repodir) |
721 repodir = os.path.dirname(repodir) |
722 if os.path.splitdrive(repodir)[1] == os.sep: |
722 if os.path.splitdrive(repodir)[1] == os.sep: |
723 return # oops, project is not version controlled |
723 return # oops, project is not version controlled |
724 while os.path.normcase(d) != \ |
724 while os.path.normcase(d) != \ |
725 os.path.normcase(repodir) and \ |
725 os.path.normcase(repodir) and \ |
726 (d not in tree) and \ |
726 (d not in tree) and \ |
727 (os.path.normcase(d) not in self.statusCache or \ |
727 (os.path.normcase(d) not in self.statusCache or |
728 self.statusCache[os.path.normcase(d)] == \ |
728 self.statusCache[os.path.normcase(d)] == |
729 self.canBeAdded): |
729 self.canBeAdded): |
730 tree.append(d) |
730 tree.append(d) |
731 d = os.path.dirname(d) |
731 d = os.path.dirname(d) |
732 else: |
732 else: |
733 while not os.path.exists(os.path.join(d, self.adminDir)): |
733 while not os.path.exists(os.path.join(d, self.adminDir)): |
745 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
745 while not os.path.isdir(os.path.join(repodir, self.adminDir)): |
746 repodir = os.path.dirname(repodir) |
746 repodir = os.path.dirname(repodir) |
747 if os.path.splitdrive(repodir)[1] == os.sep: |
747 if os.path.splitdrive(repodir)[1] == os.sep: |
748 return # oops, project is not version controlled |
748 return # oops, project is not version controlled |
749 while os.path.normcase(dname) != \ |
749 while os.path.normcase(dname) != \ |
750 os.path.normcase(repodir) and \ |
750 os.path.normcase(repodir) and \ |
751 (os.path.normcase(dname) not in self.statusCache or \ |
751 (os.path.normcase(dname) not in self.statusCache or |
752 self.statusCache[os.path.normcase(dname)] == \ |
752 self.statusCache[os.path.normcase(dname)] == |
753 self.canBeAdded): |
753 self.canBeAdded): |
754 # add directories recursively, if they aren't in the |
754 # add directories recursively, if they aren't in the |
755 # repository already |
755 # repository already |
756 tree.insert(-1, dname) |
756 tree.insert(-1, dname) |
757 dname = os.path.dirname(dname) |
757 dname = os.path.dirname(dname) |
1534 Public method to retrieve information about the repository. |
1534 Public method to retrieve information about the repository. |
1535 |
1535 |
1536 @param ppath local path to get the repository infos (string) |
1536 @param ppath local path to get the repository infos (string) |
1537 @return string with ready formated info for display (string) |
1537 @return string with ready formated info for display (string) |
1538 """ |
1538 """ |
1539 info = {\ |
1539 info = { |
1540 'committed-rev': '', |
1540 'committed-rev': '', |
1541 'committed-date': '', |
1541 'committed-date': '', |
1542 'committed-time': '', |
1542 'committed-time': '', |
1543 'url': '', |
1543 'url': '', |
1544 'last-author': '', |
1544 'last-author': '', |
1601 """<tr><td><b>Committed revision</b></td><td>{3}</td></tr>""" |
1601 """<tr><td><b>Committed revision</b></td><td>{3}</td></tr>""" |
1602 """<tr><td><b>Committed date</b></td><td>{4}</td></tr>""" |
1602 """<tr><td><b>Committed date</b></td><td>{4}</td></tr>""" |
1603 """<tr><td><b>Comitted time</b></td><td>{5}</td></tr>""" |
1603 """<tr><td><b>Comitted time</b></td><td>{5}</td></tr>""" |
1604 """<tr><td><b>Last author</b></td><td>{6}</td></tr>""" |
1604 """<tr><td><b>Last author</b></td><td>{6}</td></tr>""" |
1605 """</table>""" |
1605 """</table>""" |
1606 )\ |
1606 ).format(self.versionStr, |
1607 .format(self.versionStr, |
1607 info['url'], |
1608 info['url'], |
1608 info['revision'], |
1609 info['revision'], |
1609 info['committed-rev'], |
1610 info['committed-rev'], |
1610 info['committed-date'], |
1611 info['committed-date'], |
1611 info['committed-time'], |
1612 info['committed-time'], |
1612 info['last-author']) |
1613 info['last-author']) |
|
1614 |
1613 |
1615 ########################################################################### |
1614 ########################################################################### |
1616 ## Public Subversion specific methods are below. |
1615 ## Public Subversion specific methods are below. |
1617 ########################################################################### |
1616 ########################################################################### |
1618 |
1617 |
2025 E5MessageBox.critical( |
2024 E5MessageBox.critical( |
2026 self.__ui, |
2025 self.__ui, |
2027 self.trUtf8("Subversion Side-by-Side Difference"), |
2026 self.trUtf8("Subversion Side-by-Side Difference"), |
2028 self.trUtf8( |
2027 self.trUtf8( |
2029 """<p>The file <b>{0}</b> could not be read.</p>""") |
2028 """<p>The file <b>{0}</b> could not be read.</p>""") |
2030 .format(name)) |
2029 .format(name)) |
2031 return |
2030 return |
2032 |
2031 |
2033 if self.sbsDiff is None: |
2032 if self.sbsDiff is None: |
2034 from UI.CompareDialog import CompareDialog |
2033 from UI.CompareDialog import CompareDialog |
2035 self.sbsDiff = CompareDialog() |
2034 self.sbsDiff = CompareDialog() |
2347 helper.setObjects(self, project) |
2346 helper.setObjects(self, project) |
2348 self.__wcng = \ |
2347 self.__wcng = \ |
2349 os.path.exists( |
2348 os.path.exists( |
2350 os.path.join(project.getProjectPath(), ".svn", "format")) or \ |
2349 os.path.join(project.getProjectPath(), ".svn", "format")) or \ |
2351 os.path.exists( |
2350 os.path.exists( |
2352 os.path.join(project.getProjectPath(), "_svn", "format")) |
2351 os.path.join(project.getProjectPath(), "_svn", "format")) or \ |
|
2352 os.path.exists( |
|
2353 os.path.join(project.getProjectPath(), ".svn", "wc.db")) or \ |
|
2354 os.path.exists( |
|
2355 os.path.join(project.getProjectPath(), "_svn", "wc.db")) |
2353 return helper |
2356 return helper |
2354 |
2357 |
2355 ########################################################################### |
2358 ########################################################################### |
2356 ## Status Monitor Thread methods |
2359 ## Status Monitor Thread methods |
2357 ########################################################################### |
2360 ########################################################################### |