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

branch
eric7
changeset 11006
a671918232f3
parent 10683
779cda568acb
child 11090
f5f5f5803935
equal deleted inserted replaced
11005:b918c6c2736b 11006:a671918232f3
329 if noDialog: 329 if noDialog:
330 status = self.startSynchronizedProcess( 330 status = self.startSynchronizedProcess(
331 QProcess(), "svn", args, os.path.join(tmpDir, project) 331 QProcess(), "svn", args, os.path.join(tmpDir, project)
332 ) 332 )
333 else: 333 else:
334 dia = SvnDialog(self.tr("Importing project into Subversion repository")) 334 dia = SvnDialog(
335 self.tr("Importing project into Subversion repository"),
336 parent=self.__ui,
337 )
335 res = dia.startProcess(args, os.path.join(tmpDir, project)) 338 res = dia.startProcess(args, os.path.join(tmpDir, project))
336 if res: 339 if res:
337 dia.exec() 340 dia.exec()
338 status = dia.normalExit() 341 status = dia.normalExit()
339 342
397 args.append(projectDir) 400 args.append(projectDir)
398 401
399 if noDialog: 402 if noDialog:
400 return self.startSynchronizedProcess(QProcess(), "svn", args) 403 return self.startSynchronizedProcess(QProcess(), "svn", args)
401 else: 404 else:
402 dia = SvnDialog(self.tr("Checking project out of Subversion repository")) 405 dia = SvnDialog(
406 self.tr("Checking project out of Subversion repository"),
407 parent=self.__ui,
408 )
403 res = dia.startProcess(args) 409 res = dia.startProcess(args)
404 if res: 410 if res:
405 dia.exec() 411 dia.exec()
406 return dia.normalExit() 412 return dia.normalExit()
407 413
454 self.addArguments(args, self.options["global"]) 460 self.addArguments(args, self.options["global"])
455 args.append("--force") 461 args.append("--force")
456 args.append(self.__svnURL(svnUrl)) 462 args.append(self.__svnURL(svnUrl))
457 args.append(projectDir) 463 args.append(projectDir)
458 464
459 dia = SvnDialog(self.tr("Exporting project from Subversion repository")) 465 dia = SvnDialog(
466 self.tr("Exporting project from Subversion repository"),
467 parent=self.__ui,
468 )
460 res = dia.startProcess(args) 469 res = dia.startProcess(args)
461 if res: 470 if res:
462 dia.exec() 471 dia.exec()
463 return dia.normalExit() 472 return dia.normalExit()
464 473
577 noDialog = False 586 noDialog = False
578 587
579 if noDialog: 588 if noDialog:
580 self.startSynchronizedProcess(QProcess(), "svn", args, dname) 589 self.startSynchronizedProcess(QProcess(), "svn", args, dname)
581 else: 590 else:
582 dia = SvnDialog(self.tr("Commiting changes to Subversion repository")) 591 dia = SvnDialog(
592 self.tr("Commiting changes to Subversion repository"),
593 parent=self.__ui,
594 )
583 res = dia.startProcess(args, dname) 595 res = dia.startProcess(args, dname)
584 if res: 596 if res:
585 dia.exec() 597 dia.exec()
586 self.committed.emit() 598 self.committed.emit()
587 self.checkVCSStatus() 599 self.checkVCSStatus()
652 664
653 if noDialog: 665 if noDialog:
654 self.startSynchronizedProcess(QProcess(), "svn", args, dname) 666 self.startSynchronizedProcess(QProcess(), "svn", args, dname)
655 res = False 667 res = False
656 else: 668 else:
657 dia = SvnDialog(self.tr("Synchronizing with the Subversion repository")) 669 dia = SvnDialog(
670 self.tr("Synchronizing with the Subversion repository"),
671 parent=self.__ui,
672 )
658 res = dia.startProcess(args, dname, True) 673 res = dia.startProcess(args, dname, True)
659 if res: 674 if res:
660 dia.exec() 675 dia.exec()
661 res = dia.hasAddOrDelete() 676 res = dia.hasAddOrDelete()
662 self.checkVCSStatus() 677 self.checkVCSStatus()
754 769
755 if noDialog: 770 if noDialog:
756 self.startSynchronizedProcess(QProcess(), "svn", args, wdir) 771 self.startSynchronizedProcess(QProcess(), "svn", args, wdir)
757 else: 772 else:
758 dia = SvnDialog( 773 dia = SvnDialog(
759 self.tr("Adding files/directories to the Subversion repository") 774 self.tr("Adding files/directories to the Subversion repository"),
775 parent=self.__ui,
760 ) 776 )
761 res = dia.startProcess(args, wdir) 777 res = dia.startProcess(args, wdir)
762 if res: 778 if res:
763 dia.exec() 779 dia.exec()
764 780
847 if isinstance(path, list): 863 if isinstance(path, list):
848 self.addArguments(args, path) 864 self.addArguments(args, path)
849 else: 865 else:
850 args.append(path) 866 args.append(path)
851 867
852 dia = SvnDialog(self.tr("Adding directory trees to the Subversion repository")) 868 dia = SvnDialog(
869 self.tr("Adding directory trees to the Subversion repository"),
870 parent=self.__ui,
871 )
853 res = dia.startProcess(args, dname) 872 res = dia.startProcess(args, dname)
854 if res: 873 if res:
855 dia.exec() 874 dia.exec()
856 875
857 def vcsRemove(self, name, project=False, noDialog=False): # noqa: U100 876 def vcsRemove(self, name, project=False, noDialog=False): # noqa: U100
884 903
885 if noDialog: 904 if noDialog:
886 res = self.startSynchronizedProcess(QProcess(), "svn", args) 905 res = self.startSynchronizedProcess(QProcess(), "svn", args)
887 else: 906 else:
888 dia = SvnDialog( 907 dia = SvnDialog(
889 self.tr("Removing files/directories from the Subversion repository") 908 self.tr("Removing files/directories from the Subversion repository"),
909 parent=self.__ui,
890 ) 910 )
891 res = dia.startProcess(args) 911 res = dia.startProcess(args)
892 if res: 912 if res:
893 dia.exec() 913 dia.exec()
894 res = dia.normalExit() 914 res = dia.normalExit()
923 if target is None: 943 if target is None:
924 return False 944 return False
925 force = True 945 force = True
926 accepted = True 946 accepted = True
927 else: 947 else:
928 dlg = SvnCopyDialog(name, None, True, force) 948 dlg = SvnCopyDialog(name, parent=self.__ui, move=True, force=force)
929 accepted = dlg.exec() == QDialog.DialogCode.Accepted 949 accepted = dlg.exec() == QDialog.DialogCode.Accepted
930 if accepted: 950 if accepted:
931 target, force = dlg.getData() 951 target, force = dlg.getData()
932 if not target: 952 if not target:
933 return False 953 return False
948 args.append(target) 968 args.append(target)
949 969
950 if noDialog: 970 if noDialog:
951 res = self.startSynchronizedProcess(QProcess(), "svn", args) 971 res = self.startSynchronizedProcess(QProcess(), "svn", args)
952 else: 972 else:
953 dia = SvnDialog(self.tr("Moving {0}").format(name)) 973 dia = SvnDialog(self.tr("Moving {0}").format(name), parent=self.__ui)
954 res = dia.startProcess(args) 974 res = dia.startProcess(args)
955 if res: 975 if res:
956 dia.exec() 976 dia.exec()
957 res = dia.normalExit() 977 res = dia.normalExit()
958 if res and rx_prot.fullmatch(target) is None: 978 if res and rx_prot.fullmatch(target) is None:
1043 1063
1044 url = ( 1064 url = (
1045 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL) 1065 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL)
1046 ) 1066 )
1047 dlg = SvnTagDialog( 1067 dlg = SvnTagDialog(
1048 self.allTagsBranchesList, url, self.otherData["standardLayout"] 1068 self.allTagsBranchesList,
1069 url,
1070 self.otherData["standardLayout"],
1071 parent=self.__ui,
1049 ) 1072 )
1050 if dlg.exec() == QDialog.DialogCode.Accepted: 1073 if dlg.exec() == QDialog.DialogCode.Accepted:
1051 tag, tagOp = dlg.getParameters() 1074 tag, tagOp = dlg.getParameters()
1052 if tag in self.allTagsBranchesList: 1075 if tag in self.allTagsBranchesList:
1053 self.allTagsBranchesList.remove(tag) 1076 self.allTagsBranchesList.remove(tag)
1094 args.append("--message") 1117 args.append("--message")
1095 args.append("Deleted tag <{0}>".format(tag)) 1118 args.append("Deleted tag <{0}>".format(tag))
1096 args.append(url) 1119 args.append(url)
1097 1120
1098 dia = SvnDialog( 1121 dia = SvnDialog(
1099 self.tr("Tagging {0} in the Subversion repository").format(name) 1122 self.tr("Tagging {0} in the Subversion repository").format(name),
1123 parent=self.__ui,
1100 ) 1124 )
1101 res = dia.startProcess(args) 1125 res = dia.startProcess(args)
1102 if res: 1126 if res:
1103 dia.exec() 1127 dia.exec()
1104 1128
1145 """Do you really want to revert all changes of""" 1169 """Do you really want to revert all changes of"""
1146 """ the project?""" 1170 """ the project?"""
1147 ), 1171 ),
1148 ) 1172 )
1149 if yes: 1173 if yes:
1150 dia = SvnDialog(self.tr("Reverting changes")) 1174 dia = SvnDialog(self.tr("Reverting changes"), parent=self.__ui)
1151 res = dia.startProcess(args) 1175 res = dia.startProcess(args)
1152 if res: 1176 if res:
1153 dia.exec() 1177 dia.exec()
1154 self.checkVCSStatus() 1178 self.checkVCSStatus()
1155 1179
1195 1219
1196 url = ( 1220 url = (
1197 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL) 1221 None if self.otherData["standardLayout"] else self.svnNormalizeURL(reposURL)
1198 ) 1222 )
1199 dlg = SvnSwitchDialog( 1223 dlg = SvnSwitchDialog(
1200 self.allTagsBranchesList, url, self.otherData["standardLayout"] 1224 self.allTagsBranchesList,
1225 url,
1226 self.otherData["standardLayout"],
1227 parent=self.__ui,
1201 ) 1228 )
1202 if dlg.exec() == QDialog.DialogCode.Accepted: 1229 if dlg.exec() == QDialog.DialogCode.Accepted:
1203 tag, tagType = dlg.getParameters() 1230 tag, tagType = dlg.getParameters()
1204 if tag in self.allTagsBranchesList: 1231 if tag in self.allTagsBranchesList:
1205 self.allTagsBranchesList.remove(tag) 1232 self.allTagsBranchesList.remove(tag)
1241 args.append("--accept") 1268 args.append("--accept")
1242 args.append("postpone") 1269 args.append("postpone")
1243 args.append(url) 1270 args.append(url)
1244 args.append(name) 1271 args.append(name)
1245 1272
1246 dia = SvnDialog(self.tr("Switching to {0}").format(tn)) 1273 dia = SvnDialog(self.tr("Switching to {0}").format(tn), parent=self.__ui)
1247 res = dia.startProcess(args, setLanguage=True) 1274 res = dia.startProcess(args, setLanguage=True)
1248 if res: 1275 if res:
1249 dia.exec() 1276 dia.exec()
1250 res = dia.hasAddOrDelete() 1277 res = dia.hasAddOrDelete()
1251 self.checkVCSStatus() 1278 self.checkVCSStatus()
1266 force = "--force" in opts 1293 force = "--force" in opts
1267 if force: 1294 if force:
1268 del opts[opts.index("--force")] 1295 del opts[opts.index("--force")]
1269 1296
1270 dlg = SvnMergeDialog( 1297 dlg = SvnMergeDialog(
1271 self.mergeList[0], self.mergeList[1], self.mergeList[2], force 1298 self.mergeList[0],
1299 self.mergeList[1],
1300 self.mergeList[2],
1301 force=force,
1302 parent=self.__ui,
1272 ) 1303 )
1273 if dlg.exec() == QDialog.DialogCode.Accepted: 1304 if dlg.exec() == QDialog.DialogCode.Accepted:
1274 urlrev1, urlrev2, target, force = dlg.getParameters() 1305 urlrev1, urlrev2, target, force = dlg.getParameters()
1275 else: 1306 else:
1276 return 1307 return
1308 else: 1339 else:
1309 args.append(self.__svnURL(urlrev1)) 1340 args.append(self.__svnURL(urlrev1))
1310 args.append(self.__svnURL(urlrev2)) 1341 args.append(self.__svnURL(urlrev2))
1311 args.append(fname) 1342 args.append(fname)
1312 1343
1313 dia = SvnDialog(self.tr("Merging {0}").format(name)) 1344 dia = SvnDialog(self.tr("Merging {0}").format(name), parent=self.__ui)
1314 res = dia.startProcess(args, dname) 1345 res = dia.startProcess(args, dname)
1315 if res: 1346 if res:
1316 dia.exec() 1347 dia.exec()
1317 1348
1318 def vcsRegisteredState(self, name): 1349 def vcsRegisteredState(self, name):
1597 args = [] 1628 args = []
1598 args.append("cleanup") 1629 args.append("cleanup")
1599 self.addArguments(args, self.options["global"]) 1630 self.addArguments(args, self.options["global"])
1600 args.append(name) 1631 args.append(name)
1601 1632
1602 dia = SvnDialog(self.tr("Cleaning up {0}").format(name)) 1633 dia = SvnDialog(self.tr("Cleaning up {0}").format(name), parent=self.__ui)
1603 res = dia.startProcess(args) 1634 res = dia.startProcess(args)
1604 if res: 1635 if res:
1605 dia.exec() 1636 dia.exec()
1606 1637
1607 def vcsCommandLine(self, name): 1638 def vcsCommandLine(self, name):
1611 @param name directory name of the working directory 1642 @param name directory name of the working directory
1612 @type str 1643 @type str
1613 """ 1644 """
1614 from .SvnCommandDialog import SvnCommandDialog 1645 from .SvnCommandDialog import SvnCommandDialog
1615 1646
1616 dlg = SvnCommandDialog(self.commandHistory, self.wdHistory, name) 1647 dlg = SvnCommandDialog(
1648 self.commandHistory, self.wdHistory, name, parent=self.__ui
1649 )
1617 if dlg.exec() == QDialog.DialogCode.Accepted: 1650 if dlg.exec() == QDialog.DialogCode.Accepted:
1618 command, wd = dlg.getData() 1651 command, wd = dlg.getData()
1619 commandList = Utilities.parseOptionString(command) 1652 commandList = Utilities.parseOptionString(command)
1620 1653
1621 # This moves any previous occurrence of these arguments to the head 1654 # This moves any previous occurrence of these arguments to the head
1628 self.wdHistory.insert(0, wd) 1661 self.wdHistory.insert(0, wd)
1629 1662
1630 args = [] 1663 args = []
1631 self.addArguments(args, commandList) 1664 self.addArguments(args, commandList)
1632 1665
1633 dia = SvnDialog(self.tr("Subversion command")) 1666 dia = SvnDialog(self.tr("Subversion command"), parent=self.__ui)
1634 res = dia.startProcess(args, wd) 1667 res = dia.startProcess(args, wd)
1635 if res: 1668 if res:
1636 dia.exec() 1669 dia.exec()
1637 1670
1638 def vcsOptionsDialog( 1671 def vcsOptionsDialog(
1811 else: 1844 else:
1812 if os.path.isdir(name): 1845 if os.path.isdir(name):
1813 args.append("--recursive") 1846 args.append("--recursive")
1814 args.append(name) 1847 args.append(name)
1815 1848
1816 dia = SvnDialog(self.tr("Resolving conficts")) 1849 dia = SvnDialog(self.tr("Resolving conficts"), parent=self.__ui)
1817 res = dia.startProcess(args) 1850 res = dia.startProcess(args)
1818 if res: 1851 if res:
1819 dia.exec() 1852 dia.exec()
1820 self.checkVCSStatus() 1853 self.checkVCSStatus()
1821 1854
1831 @rtype bool 1864 @rtype bool
1832 """ 1865 """
1833 from .SvnCopyDialog import SvnCopyDialog 1866 from .SvnCopyDialog import SvnCopyDialog
1834 1867
1835 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+") 1868 rx_prot = re.compile("(file:|svn:|svn+ssh:|http:|https:).+")
1836 dlg = SvnCopyDialog(name) 1869 dlg = SvnCopyDialog(name, parent=self.__ui)
1837 res = False 1870 res = False
1838 if dlg.exec() == QDialog.DialogCode.Accepted: 1871 if dlg.exec() == QDialog.DialogCode.Accepted:
1839 target, force = dlg.getData() 1872 target, force = dlg.getData()
1840 1873
1841 args = [] 1874 args = []
1847 args.append("Copying {0} to {1}".format(name, target)) 1880 args.append("Copying {0} to {1}".format(name, target))
1848 target = self.__svnURL(target) 1881 target = self.__svnURL(target)
1849 args.append(name) 1882 args.append(name)
1850 args.append(target) 1883 args.append(target)
1851 1884
1852 dia = SvnDialog(self.tr("Copying {0}").format(name)) 1885 dia = SvnDialog(self.tr("Copying {0}").format(name), parent=self.__ui)
1853 res = dia.startProcess(args) 1886 res = dia.startProcess(args)
1854 if res: 1887 if res:
1855 dia.exec() 1888 dia.exec()
1856 res = dia.normalExit() 1889 res = dia.normalExit()
1857 if ( 1890 if (
1891 @param recursive flag indicating a recursive list is requested 1924 @param recursive flag indicating a recursive list is requested
1892 @type bool 1925 @type bool
1893 """ 1926 """
1894 from .SvnPropSetDialog import SvnPropSetDialog 1927 from .SvnPropSetDialog import SvnPropSetDialog
1895 1928
1896 dlg = SvnPropSetDialog() 1929 dlg = SvnPropSetDialog(parent=self.__ui)
1897 if dlg.exec() == QDialog.DialogCode.Accepted: 1930 if dlg.exec() == QDialog.DialogCode.Accepted:
1898 propName, fileFlag, propValue = dlg.getData() 1931 propName, fileFlag, propValue = dlg.getData()
1899 if not propName: 1932 if not propName:
1900 EricMessageBox.critical( 1933 EricMessageBox.critical(
1901 self.__ui, 1934 self.__ui,
1918 self.addArguments(args, fnames) 1951 self.addArguments(args, fnames)
1919 else: 1952 else:
1920 dname, fname = self.splitPath(name) 1953 dname, fname = self.splitPath(name)
1921 args.append(fname) 1954 args.append(fname)
1922 1955
1923 dia = SvnDialog(self.tr("Subversion Set Property")) 1956 dia = SvnDialog(self.tr("Subversion Set Property"), parent=self.__ui)
1924 res = dia.startProcess(args, dname) 1957 res = dia.startProcess(args, dname)
1925 if res: 1958 if res:
1926 dia.exec() 1959 dia.exec()
1927 1960
1928 def svnDelProp(self, name, recursive=False): 1961 def svnDelProp(self, name, recursive=False):
1963 self.addArguments(args, fnames) 1996 self.addArguments(args, fnames)
1964 else: 1997 else:
1965 dname, fname = self.splitPath(name) 1998 dname, fname = self.splitPath(name)
1966 args.append(fname) 1999 args.append(fname)
1967 2000
1968 dia = SvnDialog(self.tr("Subversion Delete Property")) 2001 dia = SvnDialog(self.tr("Subversion Delete Property"), parent=self.__ui)
1969 res = dia.startProcess(args, dname) 2002 res = dia.startProcess(args, dname)
1970 if res: 2003 if res:
1971 dia.exec() 2004 dia.exec()
1972 2005
1973 def svnListTagBranch(self, path, tags=True): 2006 def svnListTagBranch(self, path, tags=True):
2046 return 2079 return
2047 else: 2080 else:
2048 project = ericApp().getObject("Project") 2081 project = ericApp().getObject("Project")
2049 if nam == project.ppath and not project.saveAllScripts(): 2082 if nam == project.ppath and not project.saveAllScripts():
2050 return 2083 return
2051 dlg = SvnRevisionSelectionDialog() 2084 dlg = SvnRevisionSelectionDialog(parent=self.__ui)
2052 if dlg.exec() == QDialog.DialogCode.Accepted: 2085 if dlg.exec() == QDialog.DialogCode.Accepted:
2053 revisions = dlg.getRevisions() 2086 revisions = dlg.getRevisions()
2054 self.diff = SvnDiffDialog(self) 2087 self.diff = SvnDiffDialog(self)
2055 self.diff.show() 2088 self.diff.show()
2056 self.diff.start(name, revisions) 2089 self.diff.start(name, revisions)
2084 if nam == project.ppath and not project.saveAllScripts(): 2117 if nam == project.ppath and not project.saveAllScripts():
2085 return 2118 return
2086 2119
2087 dname = self.splitPath(names[0])[0] 2120 dname = self.splitPath(names[0])[0]
2088 2121
2089 dlg = SvnUrlSelectionDialog(self, self.tagsList, self.branchesList, dname) 2122 dlg = SvnUrlSelectionDialog(
2123 self, self.tagsList, self.branchesList, dname, parent=self.__ui
2124 )
2090 if dlg.exec() == QDialog.DialogCode.Accepted: 2125 if dlg.exec() == QDialog.DialogCode.Accepted:
2091 urls, summary = dlg.getURLs() 2126 urls, summary = dlg.getURLs()
2092 self.diff = SvnDiffDialog(self) 2127 self.diff = SvnDiffDialog(self)
2093 self.diff.show() 2128 self.diff.show()
2094 QApplication.processEvents() 2129 QApplication.processEvents()
2163 2198
2164 if isinstance(name, list): 2199 if isinstance(name, list):
2165 raise ValueError("Wrong parameter type") 2200 raise ValueError("Wrong parameter type")
2166 2201
2167 if extended: 2202 if extended:
2168 dlg = SvnRevisionSelectionDialog() 2203 dlg = SvnRevisionSelectionDialog(parent=self.__ui)
2169 if dlg.exec() == QDialog.DialogCode.Accepted: 2204 if dlg.exec() == QDialog.DialogCode.Accepted:
2170 rev1, rev2 = dlg.getRevisions() 2205 rev1, rev2 = dlg.getRevisions()
2171 if rev1 == "WORKING": 2206 if rev1 == "WORKING":
2172 rev1 = "" 2207 rev1 = ""
2173 if rev2 == "WORKING": 2208 if rev2 == "WORKING":
2255 self.addArguments(args, fnames) 2290 self.addArguments(args, fnames)
2256 else: 2291 else:
2257 dname, fname = self.splitPath(name) 2292 dname, fname = self.splitPath(name)
2258 args.append(fname) 2293 args.append(fname)
2259 2294
2260 dia = SvnDialog(self.tr("Locking in the Subversion repository"), parent) 2295 dia = SvnDialog(self.tr("Locking in the Subversion repository"), parent=parent)
2261 res = dia.startProcess(args, dname) 2296 res = dia.startProcess(args, dname)
2262 if res: 2297 if res:
2263 dia.exec() 2298 dia.exec()
2264 2299
2265 def svnUnlock(self, name, breakIt=False, parent=None): 2300 def svnUnlock(self, name, breakIt=False, parent=None):
2283 self.addArguments(args, fnames) 2318 self.addArguments(args, fnames)
2284 else: 2319 else:
2285 dname, fname = self.splitPath(name) 2320 dname, fname = self.splitPath(name)
2286 args.append(fname) 2321 args.append(fname)
2287 2322
2288 dia = SvnDialog(self.tr("Unlocking in the Subversion repository"), parent) 2323 dia = SvnDialog(
2324 self.tr("Unlocking in the Subversion repository"), parent=parent
2325 )
2289 res = dia.startProcess(args, dname) 2326 res = dia.startProcess(args, dname)
2290 if res: 2327 if res:
2291 dia.exec() 2328 dia.exec()
2292 2329
2293 def svnRelocate(self, projectPath): 2330 def svnRelocate(self, projectPath):
2298 @type str 2335 @type str
2299 """ 2336 """
2300 from .SvnRelocateDialog import SvnRelocateDialog 2337 from .SvnRelocateDialog import SvnRelocateDialog
2301 2338
2302 currUrl = self.svnGetReposName(projectPath) 2339 currUrl = self.svnGetReposName(projectPath)
2303 dlg = SvnRelocateDialog(currUrl) 2340 dlg = SvnRelocateDialog(currUrl, parent=self.__ui)
2304 if dlg.exec() == QDialog.DialogCode.Accepted: 2341 if dlg.exec() == QDialog.DialogCode.Accepted:
2305 newUrl, inside = dlg.getData() 2342 newUrl, inside = dlg.getData()
2306 args = [] 2343 args = []
2307 args.append("switch") 2344 args.append("switch")
2308 if not inside: 2345 if not inside:
2309 args.append("--relocate") 2346 args.append("--relocate")
2310 args.append(currUrl) 2347 args.append(currUrl)
2311 args.append(newUrl) 2348 args.append(newUrl)
2312 args.append(projectPath) 2349 args.append(projectPath)
2313 2350
2314 dia = SvnDialog(self.tr("Relocating")) 2351 dia = SvnDialog(self.tr("Relocating"), parent=self.__ui)
2315 res = dia.startProcess(args) 2352 res = dia.startProcess(args)
2316 if res: 2353 if res:
2317 dia.exec() 2354 dia.exec()
2318 2355
2319 def svnRepoBrowser(self, projectPath=None): 2356 def svnRepoBrowser(self, projectPath=None):
2362 self.addArguments(args, fnames) 2399 self.addArguments(args, fnames)
2363 else: 2400 else:
2364 dname, fname = self.splitPath(names) 2401 dname, fname = self.splitPath(names)
2365 args.append(fname) 2402 args.append(fname)
2366 2403
2367 dia = SvnDialog(self.tr("Remove from changelist")) 2404 dia = SvnDialog(self.tr("Remove from changelist"), parent=self.__ui)
2368 res = dia.startProcess(args, dname) 2405 res = dia.startProcess(args, dname)
2369 if res: 2406 if res:
2370 dia.exec() 2407 dia.exec()
2371 2408
2372 def svnAddToChangelist(self, names): 2409 def svnAddToChangelist(self, names):
2399 self.addArguments(args, fnames) 2436 self.addArguments(args, fnames)
2400 else: 2437 else:
2401 dname, fname = self.splitPath(names) 2438 dname, fname = self.splitPath(names)
2402 args.append(fname) 2439 args.append(fname)
2403 2440
2404 dia = SvnDialog(self.tr("Remove from changelist")) 2441 dia = SvnDialog(self.tr("Remove from changelist"), parent=self.__ui)
2405 res = dia.startProcess(args, dname) 2442 res = dia.startProcess(args, dname)
2406 if res: 2443 if res:
2407 dia.exec() 2444 dia.exec()
2408 2445
2409 def svnShowChangelists(self, path): 2446 def svnShowChangelists(self, path):
2469 """ 2506 """
2470 args = [] 2507 args = []
2471 args.append("upgrade") 2508 args.append("upgrade")
2472 args.append(".") 2509 args.append(".")
2473 2510
2474 dia = SvnDialog(self.tr("Upgrade")) 2511 dia = SvnDialog(self.tr("Upgrade"), parent=self.__ui)
2475 res = dia.startProcess(args, path) 2512 res = dia.startProcess(args, path)
2476 if res: 2513 if res:
2477 dia.exec() 2514 dia.exec()
2478 2515
2479 ########################################################################### 2516 ###########################################################################

eric ide

mercurial