src/eric7/Plugins/VcsPlugins/vcsPySvn/subversion.py

branch
eric7
changeset 9482
a2bc06a54d9d
parent 9473
3f23dbf37dbe
child 9514
2b104ad132a4
equal deleted inserted replaced
9481:0b936ff1bbb9 9482:a2bc06a54d9d
22 22
23 from eric7 import Preferences, Utilities 23 from eric7 import Preferences, Utilities
24 from eric7.EricUtilities.EricMutexLocker import EricMutexLocker 24 from eric7.EricUtilities.EricMutexLocker import EricMutexLocker
25 from eric7.EricWidgets import EricMessageBox 25 from eric7.EricWidgets import EricMessageBox
26 from eric7.EricWidgets.EricApplication import ericApp 26 from eric7.EricWidgets.EricApplication import ericApp
27 from eric7.UI.DeleteFilesConfirmationDialog import DeleteFilesConfirmationDialog
27 from eric7.VCS.VersionControl import VersionControl 28 from eric7.VCS.VersionControl import VersionControl
28 29
29 from .SvnDialog import SvnDialog 30 from .SvnDialog import SvnDialog
30 from .SvnUtilities import amendConfig, createDefaultConfig, getConfigPath 31 from .SvnUtilities import amendConfig, createDefaultConfig, getConfigPath
31 32
476 @param name file/directory name to be committed (string or 477 @param name file/directory name to be committed (string or
477 list of strings) 478 list of strings)
478 @param message message for this operation (string) 479 @param message message for this operation (string)
479 @param noDialog flag indicating quiet operations 480 @param noDialog flag indicating quiet operations
480 """ 481 """
482 from .SvnCommitDialog import SvnCommitDialog
483
481 if not noDialog and not message: 484 if not noDialog and not message:
482 # call CommitDialog and get message from there 485 # call CommitDialog and get message from there
483 if self.__commitDialog is None: 486 if self.__commitDialog is None:
484 from .SvnCommitDialog import SvnCommitDialog
485
486 self.__commitDialog = SvnCommitDialog(self, self.__ui) 487 self.__commitDialog = SvnCommitDialog(self, self.__ui)
487 self.__commitDialog.accepted.connect(self.__vcsCommit_Step2) 488 self.__commitDialog.accepted.connect(self.__vcsCommit_Step2)
488 self.__commitDialog.show() 489 self.__commitDialog.show()
489 self.__commitDialog.raise_() 490 self.__commitDialog.raise_()
490 self.__commitDialog.activateWindow() 491 self.__commitDialog.activateWindow()
960 @param project reference to the project object 961 @param project reference to the project object
961 @param target new name of the file/directory (string) 962 @param target new name of the file/directory (string)
962 @param noDialog flag indicating quiet operations 963 @param noDialog flag indicating quiet operations
963 @return flag indicating successfull operation (boolean) 964 @return flag indicating successfull operation (boolean)
964 """ 965 """
966 from .SvnCopyDialog import SvnCopyDialog
967
965 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+") 968 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+")
966 opts = self.options["global"] 969 opts = self.options["global"]
967 res = False 970 res = False
968 971
969 if noDialog: 972 if noDialog:
970 if target is None: 973 if target is None:
971 return False 974 return False
972 force = True 975 force = True
973 accepted = True 976 accepted = True
974 else: 977 else:
975 from .SvnCopyDialog import SvnCopyDialog
976
977 dlg = SvnCopyDialog(name, None, True, "--force" in opts) 978 dlg = SvnCopyDialog(name, None, True, "--force" in opts)
978 accepted = dlg.exec() == QDialog.DialogCode.Accepted 979 accepted = dlg.exec() == QDialog.DialogCode.Accepted
979 if accepted: 980 if accepted:
980 target, force = dlg.getData() 981 target, force = dlg.getData()
981 if not target: 982 if not target:
1037 being edited and has unsaved modification, they can be saved or the 1038 being edited and has unsaved modification, they can be saved or the
1038 operation may be aborted. 1039 operation may be aborted.
1039 1040
1040 @param name file/directory name to be diffed (string) 1041 @param name file/directory name to be diffed (string)
1041 """ 1042 """
1043 from .SvnDiffDialog import SvnDiffDialog
1044
1042 names = name[:] if isinstance(name, list) else [name] 1045 names = name[:] if isinstance(name, list) else [name]
1043 for nam in names: 1046 for nam in names:
1044 if os.path.isfile(nam): 1047 if os.path.isfile(nam):
1045 editor = ericApp().getObject("ViewManager").getOpenEditor(nam) 1048 editor = ericApp().getObject("ViewManager").getOpenEditor(nam)
1046 if editor and not editor.checkDirty(): 1049 if editor and not editor.checkDirty():
1048 else: 1051 else:
1049 project = ericApp().getObject("Project") 1052 project = ericApp().getObject("Project")
1050 if nam == project.ppath and not project.saveAllScripts(): 1053 if nam == project.ppath and not project.saveAllScripts():
1051 return 1054 return
1052 if self.diff is None: 1055 if self.diff is None:
1053 from .SvnDiffDialog import SvnDiffDialog
1054
1055 self.diff = SvnDiffDialog(self) 1056 self.diff = SvnDiffDialog(self)
1056 self.diff.show() 1057 self.diff.show()
1057 self.diff.raise_() 1058 self.diff.raise_()
1058 QApplication.processEvents() 1059 QApplication.processEvents()
1059 self.diff.start(name, refreshable=True) 1060 self.diff.start(name, refreshable=True)
1064 Subversion repository. 1065 Subversion repository.
1065 1066
1066 @param name file/directory name(s) to show the status of 1067 @param name file/directory name(s) to show the status of
1067 (string or list of strings) 1068 (string or list of strings)
1068 """ 1069 """
1070 from .SvnStatusDialog import SvnStatusDialog
1071
1069 if self.status is None: 1072 if self.status is None:
1070 from .SvnStatusDialog import SvnStatusDialog
1071
1072 self.status = SvnStatusDialog(self) 1073 self.status = SvnStatusDialog(self)
1073 self.status.show() 1074 self.status.show()
1074 self.status.raise_() 1075 self.status.raise_()
1075 QApplication.processEvents() 1076 QApplication.processEvents()
1076 self.status.start(name) 1077 self.status.start(name)
1080 Public method used to set the tag of a file/directory in the 1081 Public method used to set the tag of a file/directory in the
1081 Subversion repository. 1082 Subversion repository.
1082 1083
1083 @param name file/directory name to be tagged (string) 1084 @param name file/directory name to be tagged (string)
1084 """ 1085 """
1086 from .SvnTagDialog import SvnTagDialog
1087
1085 dname, fname = self.splitPath(name) 1088 dname, fname = self.splitPath(name)
1086 1089
1087 reposURL = self.svnGetReposName(dname) 1090 reposURL = self.svnGetReposName(dname)
1088 if reposURL is None: 1091 if reposURL is None:
1089 EricMessageBox.critical( 1092 EricMessageBox.critical(
1098 return 1101 return
1099 1102
1100 url = ( 1103 url = (
1101 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL) 1104 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL)
1102 ) 1105 )
1103 from .SvnTagDialog import SvnTagDialog
1104
1105 dlg = SvnTagDialog( 1106 dlg = SvnTagDialog(
1106 self.allTagsBranchesList, url, self.otherData["standardLayout"] 1107 self.allTagsBranchesList, url, self.otherData["standardLayout"]
1107 ) 1108 )
1108 if dlg.exec() == QDialog.DialogCode.Accepted: 1109 if dlg.exec() == QDialog.DialogCode.Accepted:
1109 tag, tagOp = dlg.getParameters() 1110 tag, tagOp = dlg.getParameters()
1189 recurse = True 1190 recurse = True
1190 1191
1191 project = ericApp().getObject("Project") 1192 project = ericApp().getObject("Project")
1192 names = [project.getRelativePath(nam) for nam in name] 1193 names = [project.getRelativePath(nam) for nam in name]
1193 if names[0]: 1194 if names[0]:
1194 from eric7.UI.DeleteFilesConfirmationDialog import (
1195 DeleteFilesConfirmationDialog,
1196 )
1197
1198 dia = DeleteFilesConfirmationDialog( 1195 dia = DeleteFilesConfirmationDialog(
1199 self.parent(), 1196 self.parent(),
1200 self.tr("Revert changes"), 1197 self.tr("Revert changes"),
1201 self.tr( 1198 self.tr(
1202 "Do you really want to revert all changes to these files" 1199 "Do you really want to revert all changes to these files"
1253 1250
1254 @param name directory name to be switched (string) 1251 @param name directory name to be switched (string)
1255 @return flag indicating, that the switch contained an add 1252 @return flag indicating, that the switch contained an add
1256 or delete (boolean) 1253 or delete (boolean)
1257 """ 1254 """
1255 from .SvnSwitchDialog import SvnSwitchDialog
1256
1258 dname, fname = self.splitPath(name) 1257 dname, fname = self.splitPath(name)
1259 1258
1260 reposURL = self.svnGetReposName(dname) 1259 reposURL = self.svnGetReposName(dname)
1261 if reposURL is None: 1260 if reposURL is None:
1262 EricMessageBox.critical( 1261 EricMessageBox.critical(
1271 return False 1270 return False
1272 1271
1273 url = ( 1272 url = (
1274 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL) 1273 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL)
1275 ) 1274 )
1276 from .SvnSwitchDialog import SvnSwitchDialog
1277
1278 dlg = SvnSwitchDialog( 1275 dlg = SvnSwitchDialog(
1279 self.allTagsBranchesList, url, self.otherData["standardLayout"] 1276 self.allTagsBranchesList, url, self.otherData["standardLayout"]
1280 ) 1277 )
1281 if dlg.exec() == QDialog.DialogCode.Accepted: 1278 if dlg.exec() == QDialog.DialogCode.Accepted:
1282 tag, tagType = dlg.getParameters() 1279 tag, tagType = dlg.getParameters()
1337 """ 1334 """
1338 Public method used to merge a URL/revision into the local project. 1335 Public method used to merge a URL/revision into the local project.
1339 1336
1340 @param name file/directory name to be merged (string) 1337 @param name file/directory name to be merged (string)
1341 """ 1338 """
1339 from .SvnMergeDialog import SvnMergeDialog
1340
1342 dname, fname = self.splitPath(name) 1341 dname, fname = self.splitPath(name)
1343 1342
1344 opts = self.options["global"] 1343 opts = self.options["global"]
1345 from .SvnMergeDialog import SvnMergeDialog
1346
1347 dlg = SvnMergeDialog( 1344 dlg = SvnMergeDialog(
1348 self.mergeList[0], self.mergeList[1], self.mergeList[2], "--force" in opts 1345 self.mergeList[0], self.mergeList[1], self.mergeList[2], "--force" in opts
1349 ) 1346 )
1350 if dlg.exec() == QDialog.DialogCode.Accepted: 1347 if dlg.exec() == QDialog.DialogCode.Accepted:
1351 urlrev1, urlrev2, target, force = dlg.getParameters() 1348 urlrev1, urlrev2, target, force = dlg.getParameters()
1547 @param dname directory to check in (string) 1544 @param dname directory to check in (string)
1548 @param shortcut flag indicating a shortcut should be taken (boolean) 1545 @param shortcut flag indicating a shortcut should be taken (boolean)
1549 @return the received dictionary completed with a combination of 1546 @return the received dictionary completed with a combination of
1550 canBeCommited and canBeAdded or None in order to signal an error 1547 canBeCommited and canBeAdded or None in order to signal an error
1551 """ 1548 """
1549 from .SvnDialogMixin import SvnDialogMixin
1550
1552 if dname.endswith(os.sep): 1551 if dname.endswith(os.sep):
1553 dname = dname[:-1] 1552 dname = dname[:-1]
1554 dname = os.path.normcase(dname) 1553 dname = os.path.normcase(dname)
1555 1554
1556 found = False 1555 found = False
1564 repodir = dname 1563 repodir = dname
1565 while not os.path.isdir(os.path.join(repodir, self.adminDir)): 1564 while not os.path.isdir(os.path.join(repodir, self.adminDir)):
1566 repodir = os.path.dirname(repodir) 1565 repodir = os.path.dirname(repodir)
1567 if os.path.splitdrive(repodir)[1] == os.sep: 1566 if os.path.splitdrive(repodir)[1] == os.sep:
1568 return names 1567 return names
1569
1570 from .SvnDialogMixin import SvnDialogMixin
1571 1568
1572 mixin = SvnDialogMixin() 1569 mixin = SvnDialogMixin()
1573 client = self.getClient() 1570 client = self.getClient()
1574 client.callback_get_login = mixin._clientLoginCallback 1571 client.callback_get_login = mixin._clientLoginCallback
1575 client.callback_ssl_server_trust_prompt = ( 1572 client.callback_ssl_server_trust_prompt = (
1625 @param dname directory to check in (string) 1622 @param dname directory to check in (string)
1626 @param shortcut flag indicating a shortcut should be taken (boolean) 1623 @param shortcut flag indicating a shortcut should be taken (boolean)
1627 @return the received dictionary completed with a combination of 1624 @return the received dictionary completed with a combination of
1628 canBeCommited and canBeAdded or None in order to signal an error 1625 canBeCommited and canBeAdded or None in order to signal an error
1629 """ 1626 """
1627 from .SvnDialogMixin import SvnDialogMixin
1628
1630 if not os.path.isdir(os.path.join(dname, self.adminDir)): 1629 if not os.path.isdir(os.path.join(dname, self.adminDir)):
1631 # not under version control -> do nothing 1630 # not under version control -> do nothing
1632 return names 1631 return names
1633 1632
1634 found = False 1633 found = False
1640 if name in names: 1639 if name in names:
1641 found = True 1640 found = True
1642 names[name] = self.statusCache[name] 1641 names[name] = self.statusCache[name]
1643 1642
1644 if not found: 1643 if not found:
1645 from .SvnDialogMixin import SvnDialogMixin
1646
1647 mixin = SvnDialogMixin() 1644 mixin = SvnDialogMixin()
1648 client = self.getClient() 1645 client = self.getClient()
1649 client.callback_get_login = mixin._clientLoginCallback 1646 client.callback_get_login = mixin._clientLoginCallback
1650 client.callback_ssl_server_trust_prompt = ( 1647 client.callback_ssl_server_trust_prompt = (
1651 mixin._clientSslServerTrustPromptCallback 1648 mixin._clientSslServerTrustPromptCallback
1738 """ 1735 """
1739 Public method used to execute arbitrary subversion commands. 1736 Public method used to execute arbitrary subversion commands.
1740 1737
1741 @param name directory name of the working directory (string) 1738 @param name directory name of the working directory (string)
1742 """ 1739 """
1740 from eric7.Plugins.VcsPlugins.vcsSubversion.SvnDialog import (
1741 SvnDialog as SvnProcessDialog,
1742 )
1743
1743 from .SvnCommandDialog import SvnCommandDialog 1744 from .SvnCommandDialog import SvnCommandDialog
1744 1745
1745 dlg = SvnCommandDialog(self.commandHistory, self.wdHistory, name) 1746 dlg = SvnCommandDialog(self.commandHistory, self.wdHistory, name)
1746 if dlg.exec() == QDialog.DialogCode.Accepted: 1747 if dlg.exec() == QDialog.DialogCode.Accepted:
1747 command, wd = dlg.getData() 1748 command, wd = dlg.getData()
1756 self.wdHistory.remove(wd) 1757 self.wdHistory.remove(wd)
1757 self.wdHistory.insert(0, wd) 1758 self.wdHistory.insert(0, wd)
1758 1759
1759 args = [] 1760 args = []
1760 self.addArguments(args, commandList) 1761 self.addArguments(args, commandList)
1761
1762 from eric7.Plugins.VcsPlugins.vcsSubversion.SvnDialog import (
1763 SvnDialog as SvnProcessDialog,
1764 )
1765 1762
1766 dia = SvnProcessDialog(self.tr("Subversion command")) 1763 dia = SvnProcessDialog(self.tr("Subversion command"))
1767 res = dia.startProcess(args, wd) 1764 res = dia.startProcess(args, wd)
1768 if res: 1765 if res:
1769 dia.exec() 1766 dia.exec()
1957 Public method used to list the properties of a file/directory. 1954 Public method used to list the properties of a file/directory.
1958 1955
1959 @param name file/directory name (string or list of strings) 1956 @param name file/directory name (string or list of strings)
1960 @param recursive flag indicating a recursive list is requested 1957 @param recursive flag indicating a recursive list is requested
1961 """ 1958 """
1959 from .SvnPropListDialog import SvnPropListDialog
1960
1962 if self.propList is None: 1961 if self.propList is None:
1963 from .SvnPropListDialog import SvnPropListDialog
1964
1965 self.propList = SvnPropListDialog(self) 1962 self.propList = SvnPropListDialog(self)
1966 self.propList.show() 1963 self.propList.show()
1967 self.propList.raise_() 1964 self.propList.raise_()
1968 QApplication.processEvents() 1965 QApplication.processEvents()
1969 self.propList.start(name, recursive) 1966 self.propList.start(name, recursive)
2090 2087
2091 @param path directory name of the project (string) 2088 @param path directory name of the project (string)
2092 @param tags flag indicating listing of branches or tags 2089 @param tags flag indicating listing of branches or tags
2093 (False = branches, True = tags) 2090 (False = branches, True = tags)
2094 """ 2091 """
2092 from .SvnTagBranchListDialog import SvnTagBranchListDialog
2093
2095 if self.tagbranchList is None: 2094 if self.tagbranchList is None:
2096 from .SvnTagBranchListDialog import SvnTagBranchListDialog
2097
2098 self.tagbranchList = SvnTagBranchListDialog(self) 2095 self.tagbranchList = SvnTagBranchListDialog(self)
2099 self.tagbranchList.show() 2096 self.tagbranchList.show()
2100 self.tagbranchList.raise_() 2097 self.tagbranchList.raise_()
2101 QApplication.processEvents() 2098 QApplication.processEvents()
2102 res = self.tagbranchList.start(path, tags) 2099 res = self.tagbranchList.start(path, tags)
2118 """ 2115 """
2119 Public method to show the output of the svn blame command. 2116 Public method to show the output of the svn blame command.
2120 2117
2121 @param name file name to show the blame for (string) 2118 @param name file name to show the blame for (string)
2122 """ 2119 """
2120 from .SvnBlameDialog import SvnBlameDialog
2121
2123 if self.blame is None: 2122 if self.blame is None:
2124 from .SvnBlameDialog import SvnBlameDialog
2125
2126 self.blame = SvnBlameDialog(self) 2123 self.blame = SvnBlameDialog(self)
2127 self.blame.show() 2124 self.blame.show()
2128 self.blame.raise_() 2125 self.blame.raise_()
2129 QApplication.processEvents() 2126 QApplication.processEvents()
2130 self.blame.start(name) 2127 self.blame.start(name)
2141 2138
2142 This method gives the chance to enter the revisions to be compared. 2139 This method gives the chance to enter the revisions to be compared.
2143 2140
2144 @param name file/directory name to be diffed (string) 2141 @param name file/directory name to be diffed (string)
2145 """ 2142 """
2143 from .SvnDiffDialog import SvnDiffDialog
2144 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
2145
2146 names = name[:] if isinstance(name, list) else [name] 2146 names = name[:] if isinstance(name, list) else [name]
2147 for nam in names: 2147 for nam in names:
2148 if os.path.isfile(nam): 2148 if os.path.isfile(nam):
2149 editor = ericApp().getObject("ViewManager").getOpenEditor(nam) 2149 editor = ericApp().getObject("ViewManager").getOpenEditor(nam)
2150 if editor and not editor.checkDirty(): 2150 if editor and not editor.checkDirty():
2151 return 2151 return
2152 else: 2152 else:
2153 project = ericApp().getObject("Project") 2153 project = ericApp().getObject("Project")
2154 if nam == project.ppath and not project.saveAllScripts(): 2154 if nam == project.ppath and not project.saveAllScripts():
2155 return 2155 return
2156 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
2157
2158 dlg = SvnRevisionSelectionDialog() 2156 dlg = SvnRevisionSelectionDialog()
2159 if dlg.exec() == QDialog.DialogCode.Accepted: 2157 if dlg.exec() == QDialog.DialogCode.Accepted:
2160 revisions = dlg.getRevisions() 2158 revisions = dlg.getRevisions()
2161 if self.diff is None: 2159 if self.diff is None:
2162 from .SvnDiffDialog import SvnDiffDialog
2163
2164 self.diff = SvnDiffDialog(self) 2160 self.diff = SvnDiffDialog(self)
2165 self.diff.show() 2161 self.diff.show()
2166 self.diff.raise_() 2162 self.diff.raise_()
2167 QApplication.processEvents() 2163 QApplication.processEvents()
2168 self.diff.start(name, revisions) 2164 self.diff.start(name, revisions)
2179 2175
2180 This method gives the chance to enter the revisions to be compared. 2176 This method gives the chance to enter the revisions to be compared.
2181 2177
2182 @param name file/directory name to be diffed (string) 2178 @param name file/directory name to be diffed (string)
2183 """ 2179 """
2180 from .SvnDiffDialog import SvnDiffDialog
2181 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog
2182
2184 names = name[:] if isinstance(name, list) else [name] 2183 names = name[:] if isinstance(name, list) else [name]
2185 for nam in names: 2184 for nam in names:
2186 if os.path.isfile(nam): 2185 if os.path.isfile(nam):
2187 editor = ericApp().getObject("ViewManager").getOpenEditor(nam) 2186 editor = ericApp().getObject("ViewManager").getOpenEditor(nam)
2188 if editor and not editor.checkDirty(): 2187 if editor and not editor.checkDirty():
2192 if nam == project.ppath and not project.saveAllScripts(): 2191 if nam == project.ppath and not project.saveAllScripts():
2193 return 2192 return
2194 2193
2195 dname = self.splitPath(names[0])[0] 2194 dname = self.splitPath(names[0])[0]
2196 2195
2197 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog
2198
2199 dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList, dname) 2196 dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList, dname)
2200 if dlg.exec() == QDialog.DialogCode.Accepted: 2197 if dlg.exec() == QDialog.DialogCode.Accepted:
2201 urls, summary = dlg.getURLs() 2198 urls, summary = dlg.getURLs()
2202 if self.diff is None: 2199 if self.diff is None:
2203 from .SvnDiffDialog import SvnDiffDialog
2204
2205 self.diff = SvnDiffDialog(self) 2200 self.diff = SvnDiffDialog(self)
2206 self.diff.show() 2201 self.diff.show()
2207 self.diff.raise_() 2202 self.diff.raise_()
2208 QApplication.processEvents() 2203 QApplication.processEvents()
2209 self.diff.start(name, urls=urls, summary=summary) 2204 self.diff.start(name, urls=urls, summary=summary)
2260 @param name file name to be diffed (string) 2255 @param name file name to be diffed (string)
2261 @param extended flag indicating the extended variant (boolean) 2256 @param extended flag indicating the extended variant (boolean)
2262 @param revisions tuple of two revisions (tuple of strings) 2257 @param revisions tuple of two revisions (tuple of strings)
2263 @exception ValueError raised to indicate an invalid name parameter type 2258 @exception ValueError raised to indicate an invalid name parameter type
2264 """ 2259 """
2260 from eric7.UI.CompareDialog import CompareDialog
2261
2262 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
2263
2265 if isinstance(name, list): 2264 if isinstance(name, list):
2266 raise ValueError("Wrong parameter type") 2265 raise ValueError("Wrong parameter type")
2267 2266
2268 if extended: 2267 if extended:
2269 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog
2270
2271 dlg = SvnRevisionSelectionDialog() 2268 dlg = SvnRevisionSelectionDialog()
2272 if dlg.exec() == QDialog.DialogCode.Accepted: 2269 if dlg.exec() == QDialog.DialogCode.Accepted:
2273 rev1, rev2 = dlg.getRevisions() 2270 rev1, rev2 = dlg.getRevisions()
2274 if rev1 == "WORKING": 2271 if rev1 == "WORKING":
2275 rev1 = "" 2272 rev1 = ""
2312 ), 2309 ),
2313 ) 2310 )
2314 return 2311 return
2315 2312
2316 if self.sbsDiff is None: 2313 if self.sbsDiff is None:
2317 from eric7.UI.CompareDialog import CompareDialog
2318
2319 self.sbsDiff = CompareDialog() 2314 self.sbsDiff = CompareDialog()
2320 self.sbsDiff.show() 2315 self.sbsDiff.show()
2321 self.sbsDiff.raise_() 2316 self.sbsDiff.raise_()
2322 self.sbsDiff.compare(output1, output2, name1, name2) 2317 self.sbsDiff.compare(output1, output2, name1, name2)
2323 2318
2327 Subversion repository. 2322 Subversion repository.
2328 2323
2329 @param name file/directory name to show the log of (string) 2324 @param name file/directory name to show the log of (string)
2330 @param isFile flag indicating log for a file is to be shown (boolean) 2325 @param isFile flag indicating log for a file is to be shown (boolean)
2331 """ 2326 """
2327 from .SvnLogBrowserDialog import SvnLogBrowserDialog
2328
2332 if self.logBrowser is None: 2329 if self.logBrowser is None:
2333 from .SvnLogBrowserDialog import SvnLogBrowserDialog
2334
2335 self.logBrowser = SvnLogBrowserDialog(self) 2330 self.logBrowser = SvnLogBrowserDialog(self)
2336 self.logBrowser.show() 2331 self.logBrowser.show()
2337 self.logBrowser.raise_() 2332 self.logBrowser.raise_()
2338 QApplication.processEvents() 2333 QApplication.processEvents()
2339 self.logBrowser.start(name, isFile=isFile) 2334 self.logBrowser.start(name, isFile=isFile)
2473 """ 2468 """
2474 Public method to open the repository browser. 2469 Public method to open the repository browser.
2475 2470
2476 @param projectPath path name of the project (string) 2471 @param projectPath path name of the project (string)
2477 """ 2472 """
2473 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog
2474
2478 url = self.svnGetReposName(projectPath) if projectPath else None 2475 url = self.svnGetReposName(projectPath) if projectPath else None
2479 if url is None: 2476 if url is None:
2480 url, ok = QInputDialog.getText( 2477 url, ok = QInputDialog.getText(
2481 None, 2478 None,
2482 self.tr("Repository Browser"), 2479 self.tr("Repository Browser"),
2485 ) 2482 )
2486 if not ok or not url: 2483 if not ok or not url:
2487 return 2484 return
2488 2485
2489 if self.repoBrowser is None: 2486 if self.repoBrowser is None:
2490 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog
2491
2492 self.repoBrowser = SvnRepoBrowserDialog(self) 2487 self.repoBrowser = SvnRepoBrowserDialog(self)
2493 self.repoBrowser.start(url) 2488 self.repoBrowser.start(url)
2494 self.repoBrowser.show() 2489 self.repoBrowser.show()
2495 self.repoBrowser.raise_() 2490 self.repoBrowser.raise_()
2496 2491

eric ide

mercurial