926 force = True |
926 force = True |
927 accepted = True |
927 accepted = True |
928 else: |
928 else: |
929 from .SvnCopyDialog import SvnCopyDialog |
929 from .SvnCopyDialog import SvnCopyDialog |
930 dlg = SvnCopyDialog(name, None, True, "--force" in opts) |
930 dlg = SvnCopyDialog(name, None, True, "--force" in opts) |
931 accepted = (dlg.exec() == QDialog.Accepted) |
931 accepted = (dlg.exec() == QDialog.DialogCode.Accepted) |
932 if accepted: |
932 if accepted: |
933 target, force = dlg.getData() |
933 target, force = dlg.getData() |
934 if not target: |
934 if not target: |
935 return False |
935 return False |
936 |
936 |
1054 else: |
1054 else: |
1055 url = self.svnNormalizeURL(reposURL) |
1055 url = self.svnNormalizeURL(reposURL) |
1056 from .SvnTagDialog import SvnTagDialog |
1056 from .SvnTagDialog import SvnTagDialog |
1057 dlg = SvnTagDialog(self.allTagsBranchesList, url, |
1057 dlg = SvnTagDialog(self.allTagsBranchesList, url, |
1058 self.otherData["standardLayout"]) |
1058 self.otherData["standardLayout"]) |
1059 if dlg.exec() == QDialog.Accepted: |
1059 if dlg.exec() == QDialog.DialogCode.Accepted: |
1060 tag, tagOp = dlg.getParameters() |
1060 tag, tagOp = dlg.getParameters() |
1061 if tag in self.allTagsBranchesList: |
1061 if tag in self.allTagsBranchesList: |
1062 self.allTagsBranchesList.remove(tag) |
1062 self.allTagsBranchesList.remove(tag) |
1063 self.allTagsBranchesList.insert(0, tag) |
1063 self.allTagsBranchesList.insert(0, tag) |
1064 else: |
1064 else: |
1143 self.tr("Revert changes"), |
1143 self.tr("Revert changes"), |
1144 self.tr( |
1144 self.tr( |
1145 "Do you really want to revert all changes to these files" |
1145 "Do you really want to revert all changes to these files" |
1146 " or directories?"), |
1146 " or directories?"), |
1147 name) |
1147 name) |
1148 yes = dia.exec() == QDialog.Accepted |
1148 yes = dia.exec() == QDialog.DialogCode.Accepted |
1149 else: |
1149 else: |
1150 yes = E5MessageBox.yesNo( |
1150 yes = E5MessageBox.yesNo( |
1151 None, |
1151 None, |
1152 self.tr("Revert changes"), |
1152 self.tr("Revert changes"), |
1153 self.tr("""Do you really want to revert all changes of""" |
1153 self.tr("""Do you really want to revert all changes of""" |
1196 else: |
1196 else: |
1197 url = self.svnNormalizeURL(reposURL) |
1197 url = self.svnNormalizeURL(reposURL) |
1198 from .SvnSwitchDialog import SvnSwitchDialog |
1198 from .SvnSwitchDialog import SvnSwitchDialog |
1199 dlg = SvnSwitchDialog(self.allTagsBranchesList, url, |
1199 dlg = SvnSwitchDialog(self.allTagsBranchesList, url, |
1200 self.otherData["standardLayout"]) |
1200 self.otherData["standardLayout"]) |
1201 if dlg.exec() == QDialog.Accepted: |
1201 if dlg.exec() == QDialog.DialogCode.Accepted: |
1202 tag, tagType = dlg.getParameters() |
1202 tag, tagType = dlg.getParameters() |
1203 if tag in self.allTagsBranchesList: |
1203 if tag in self.allTagsBranchesList: |
1204 self.allTagsBranchesList.remove(tag) |
1204 self.allTagsBranchesList.remove(tag) |
1205 self.allTagsBranchesList.insert(0, tag) |
1205 self.allTagsBranchesList.insert(0, tag) |
1206 else: |
1206 else: |
1259 |
1259 |
1260 opts = self.options['global'] |
1260 opts = self.options['global'] |
1261 from .SvnMergeDialog import SvnMergeDialog |
1261 from .SvnMergeDialog import SvnMergeDialog |
1262 dlg = SvnMergeDialog(self.mergeList[0], self.mergeList[1], |
1262 dlg = SvnMergeDialog(self.mergeList[0], self.mergeList[1], |
1263 self.mergeList[2], "--force" in opts) |
1263 self.mergeList[2], "--force" in opts) |
1264 if dlg.exec() == QDialog.Accepted: |
1264 if dlg.exec() == QDialog.DialogCode.Accepted: |
1265 urlrev1, urlrev2, target, force = dlg.getParameters() |
1265 urlrev1, urlrev2, target, force = dlg.getParameters() |
1266 else: |
1266 else: |
1267 return |
1267 return |
1268 |
1268 |
1269 # remember URL or revision |
1269 # remember URL or revision |
1655 |
1655 |
1656 @param name directory name of the working directory (string) |
1656 @param name directory name of the working directory (string) |
1657 """ |
1657 """ |
1658 from .SvnCommandDialog import SvnCommandDialog |
1658 from .SvnCommandDialog import SvnCommandDialog |
1659 dlg = SvnCommandDialog(self.commandHistory, self.wdHistory, name) |
1659 dlg = SvnCommandDialog(self.commandHistory, self.wdHistory, name) |
1660 if dlg.exec() == QDialog.Accepted: |
1660 if dlg.exec() == QDialog.DialogCode.Accepted: |
1661 command, wd = dlg.getData() |
1661 command, wd = dlg.getData() |
1662 commandList = Utilities.parseOptionString(command) |
1662 commandList = Utilities.parseOptionString(command) |
1663 |
1663 |
1664 # This moves any previous occurrence of these arguments to the head |
1664 # This moves any previous occurrence of these arguments to the head |
1665 # of the list. |
1665 # of the list. |
1819 """ |
1819 """ |
1820 from .SvnCopyDialog import SvnCopyDialog |
1820 from .SvnCopyDialog import SvnCopyDialog |
1821 rx_prot = re.compile('(file:|svn:|svn+ssh:|http:|https:).+') |
1821 rx_prot = re.compile('(file:|svn:|svn+ssh:|http:|https:).+') |
1822 dlg = SvnCopyDialog(name) |
1822 dlg = SvnCopyDialog(name) |
1823 res = False |
1823 res = False |
1824 if dlg.exec() == QDialog.Accepted: |
1824 if dlg.exec() == QDialog.DialogCode.Accepted: |
1825 target, force = dlg.getData() |
1825 target, force = dlg.getData() |
1826 |
1826 |
1827 client = self.getClient() |
1827 client = self.getClient() |
1828 if bool(rx_prot.fullmatch(target)): |
1828 if bool(rx_prot.fullmatch(target)): |
1829 target = self.__svnURL(target) |
1829 target = self.__svnURL(target) |
1880 @param name file/directory name (string or list of strings) |
1880 @param name file/directory name (string or list of strings) |
1881 @param recursive flag indicating a recursive set is requested |
1881 @param recursive flag indicating a recursive set is requested |
1882 """ |
1882 """ |
1883 from .SvnPropSetDialog import SvnPropSetDialog |
1883 from .SvnPropSetDialog import SvnPropSetDialog |
1884 dlg = SvnPropSetDialog(recursive) |
1884 dlg = SvnPropSetDialog(recursive) |
1885 if dlg.exec() == QDialog.Accepted: |
1885 if dlg.exec() == QDialog.DialogCode.Accepted: |
1886 propName, propValue, recurse = dlg.getData() |
1886 propName, propValue, recurse = dlg.getData() |
1887 if not propName: |
1887 if not propName: |
1888 E5MessageBox.critical( |
1888 E5MessageBox.critical( |
1889 self.__ui, |
1889 self.__ui, |
1890 self.tr("Subversion Set Property"), |
1890 self.tr("Subversion Set Property"), |
1931 @param name file/directory name (string or list of strings) |
1931 @param name file/directory name (string or list of strings) |
1932 @param recursive flag indicating a recursive list is requested |
1932 @param recursive flag indicating a recursive list is requested |
1933 """ |
1933 """ |
1934 from .SvnPropDelDialog import SvnPropDelDialog |
1934 from .SvnPropDelDialog import SvnPropDelDialog |
1935 dlg = SvnPropDelDialog(recursive) |
1935 dlg = SvnPropDelDialog(recursive) |
1936 if dlg.exec() == QDialog.Accepted: |
1936 if dlg.exec() == QDialog.DialogCode.Accepted: |
1937 propName, recurse = dlg.getData() |
1937 propName, recurse = dlg.getData() |
1938 |
1938 |
1939 if not propName: |
1939 if not propName: |
1940 E5MessageBox.critical( |
1940 E5MessageBox.critical( |
1941 self.__ui, |
1941 self.__ui, |
2049 project = e5App().getObject("Project") |
2049 project = e5App().getObject("Project") |
2050 if nam == project.ppath and not project.saveAllScripts(): |
2050 if nam == project.ppath and not project.saveAllScripts(): |
2051 return |
2051 return |
2052 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog |
2052 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog |
2053 dlg = SvnRevisionSelectionDialog() |
2053 dlg = SvnRevisionSelectionDialog() |
2054 if dlg.exec() == QDialog.Accepted: |
2054 if dlg.exec() == QDialog.DialogCode.Accepted: |
2055 revisions = dlg.getRevisions() |
2055 revisions = dlg.getRevisions() |
2056 if self.diff is None: |
2056 if self.diff is None: |
2057 from .SvnDiffDialog import SvnDiffDialog |
2057 from .SvnDiffDialog import SvnDiffDialog |
2058 self.diff = SvnDiffDialog(self) |
2058 self.diff = SvnDiffDialog(self) |
2059 self.diff.show() |
2059 self.diff.show() |
2092 dname = self.splitPath(names[0])[0] |
2092 dname = self.splitPath(names[0])[0] |
2093 |
2093 |
2094 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog |
2094 from .SvnUrlSelectionDialog import SvnUrlSelectionDialog |
2095 dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList, |
2095 dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList, |
2096 dname) |
2096 dname) |
2097 if dlg.exec() == QDialog.Accepted: |
2097 if dlg.exec() == QDialog.DialogCode.Accepted: |
2098 urls, summary = dlg.getURLs() |
2098 urls, summary = dlg.getURLs() |
2099 if self.diff is None: |
2099 if self.diff is None: |
2100 from .SvnDiffDialog import SvnDiffDialog |
2100 from .SvnDiffDialog import SvnDiffDialog |
2101 self.diff = SvnDiffDialog(self) |
2101 self.diff = SvnDiffDialog(self) |
2102 self.diff.show() |
2102 self.diff.show() |
2122 if isinstance(rev, int) or rev.isdecimal(): |
2122 if isinstance(rev, int) or rev.isdecimal(): |
2123 rev = pysvn.Revision( |
2123 rev = pysvn.Revision( |
2124 pysvn.opt_revision_kind.number, int(rev)) |
2124 pysvn.opt_revision_kind.number, int(rev)) |
2125 elif rev.startswith("{"): |
2125 elif rev.startswith("{"): |
2126 dateStr = rev[1:-1] |
2126 dateStr = rev[1:-1] |
2127 secs = QDateTime.fromString(dateStr, Qt.ISODate).toTime_t() |
2127 secs = QDateTime.fromString( |
|
2128 dateStr, Qt.DateFormat.ISODate).toTime_t() |
2128 rev = pysvn.Revision(pysvn.opt_revision_kind.date, secs) |
2129 rev = pysvn.Revision(pysvn.opt_revision_kind.date, secs) |
2129 elif rev == "HEAD": |
2130 elif rev == "HEAD": |
2130 rev = pysvn.Revision(pysvn.opt_revision_kind.head) |
2131 rev = pysvn.Revision(pysvn.opt_revision_kind.head) |
2131 elif rev == "COMMITTED": |
2132 elif rev == "COMMITTED": |
2132 rev = pysvn.Revision(pysvn.opt_revision_kind.committed) |
2133 rev = pysvn.Revision(pysvn.opt_revision_kind.committed) |
2161 raise ValueError("Wrong parameter type") |
2162 raise ValueError("Wrong parameter type") |
2162 |
2163 |
2163 if extended: |
2164 if extended: |
2164 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog |
2165 from .SvnRevisionSelectionDialog import SvnRevisionSelectionDialog |
2165 dlg = SvnRevisionSelectionDialog() |
2166 dlg = SvnRevisionSelectionDialog() |
2166 if dlg.exec() == QDialog.Accepted: |
2167 if dlg.exec() == QDialog.DialogCode.Accepted: |
2167 rev1, rev2 = dlg.getRevisions() |
2168 rev1, rev2 = dlg.getRevisions() |
2168 if rev1 == "WORKING": |
2169 if rev1 == "WORKING": |
2169 rev1 = "" |
2170 rev1 = "" |
2170 if rev2 == "WORKING": |
2171 if rev2 == "WORKING": |
2171 rev2 = "" |
2172 rev2 = "" |
2243 """ |
2244 """ |
2244 comment, ok = QInputDialog.getText( |
2245 comment, ok = QInputDialog.getText( |
2245 None, |
2246 None, |
2246 self.tr("Subversion Lock"), |
2247 self.tr("Subversion Lock"), |
2247 self.tr("Enter lock comment"), |
2248 self.tr("Enter lock comment"), |
2248 QLineEdit.Normal) |
2249 QLineEdit.EchoMode.Normal) |
2249 |
2250 |
2250 if not ok: |
2251 if not ok: |
2251 return |
2252 return |
2252 |
2253 |
2253 if isinstance(name, list): |
2254 if isinstance(name, list): |
2333 @param projectPath path name of the project (string) |
2334 @param projectPath path name of the project (string) |
2334 """ |
2335 """ |
2335 from .SvnRelocateDialog import SvnRelocateDialog |
2336 from .SvnRelocateDialog import SvnRelocateDialog |
2336 currUrl = self.svnGetReposName(projectPath) |
2337 currUrl = self.svnGetReposName(projectPath) |
2337 dlg = SvnRelocateDialog(currUrl) |
2338 dlg = SvnRelocateDialog(currUrl) |
2338 if dlg.exec() == QDialog.Accepted: |
2339 if dlg.exec() == QDialog.DialogCode.Accepted: |
2339 newUrl, inside = dlg.getData() |
2340 newUrl, inside = dlg.getData() |
2340 if inside: |
2341 if inside: |
2341 msg = "switch {0} {1}".format(newUrl, projectPath) |
2342 msg = "switch {0} {1}".format(newUrl, projectPath) |
2342 else: |
2343 else: |
2343 msg = "relocate {0} {1} {2}".format(currUrl, newUrl, |
2344 msg = "relocate {0} {1} {2}".format(currUrl, newUrl, |
2371 if url is None: |
2372 if url is None: |
2372 url, ok = QInputDialog.getText( |
2373 url, ok = QInputDialog.getText( |
2373 None, |
2374 None, |
2374 self.tr("Repository Browser"), |
2375 self.tr("Repository Browser"), |
2375 self.tr("Enter the repository URL."), |
2376 self.tr("Enter the repository URL."), |
2376 QLineEdit.Normal) |
2377 QLineEdit.EchoMode.Normal) |
2377 if not ok or not url: |
2378 if not ok or not url: |
2378 return |
2379 return |
2379 |
2380 |
2380 if self.repoBrowser is None: |
2381 if self.repoBrowser is None: |
2381 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
2382 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |