168 v.append(0) |
168 v.append(0) |
169 self.version = tuple(v) |
169 self.version = tuple(v) |
170 return True, errMsg |
170 return True, errMsg |
171 else: |
171 else: |
172 if finished: |
172 if finished: |
173 errMsg = self.trUtf8( |
173 errMsg = self.tr( |
174 "The svn process finished with the exit code {0}")\ |
174 "The svn process finished with the exit code {0}")\ |
175 .format(process.exitCode()) |
175 .format(process.exitCode()) |
176 else: |
176 else: |
177 errMsg = self.trUtf8( |
177 errMsg = self.tr( |
178 "The svn process did not finish within 30s.") |
178 "The svn process did not finish within 30s.") |
179 else: |
179 else: |
180 errMsg = self.trUtf8("Could not start the svn executable.") |
180 errMsg = self.tr("Could not start the svn executable.") |
181 |
181 |
182 return False, errMsg |
182 return False, errMsg |
183 |
183 |
184 def vcsInit(self, vcsDir, noDialog=False): |
184 def vcsInit(self, vcsDir, noDialog=False): |
185 """ |
185 """ |
205 """ |
205 """ |
206 success = self.vcsImport(vcsDataDict, project.ppath)[0] |
206 success = self.vcsImport(vcsDataDict, project.ppath)[0] |
207 if not success: |
207 if not success: |
208 E5MessageBox.critical( |
208 E5MessageBox.critical( |
209 self.__ui, |
209 self.__ui, |
210 self.trUtf8("Create project in repository"), |
210 self.tr("Create project in repository"), |
211 self.trUtf8( |
211 self.tr( |
212 """The project could not be created in the repository.""" |
212 """The project could not be created in the repository.""" |
213 """ Maybe the given repository doesn't exist or the""" |
213 """ Maybe the given repository doesn't exist or the""" |
214 """ repository server is down.""")) |
214 """ repository server is down.""")) |
215 else: |
215 else: |
216 cwdIsPpath = False |
216 cwdIsPpath = False |
229 if not os.path.isfile(pfn): |
229 if not os.path.isfile(pfn): |
230 pfn += "z" |
230 pfn += "z" |
231 if not os.path.isfile(pfn): |
231 if not os.path.isfile(pfn): |
232 E5MessageBox.critical( |
232 E5MessageBox.critical( |
233 self.__ui, |
233 self.__ui, |
234 self.trUtf8("New project"), |
234 self.tr("New project"), |
235 self.trUtf8( |
235 self.tr( |
236 """The project could not be checked out of the""" |
236 """The project could not be checked out of the""" |
237 """ repository.<br />""" |
237 """ repository.<br />""" |
238 """Restoring the original contents.""")) |
238 """Restoring the original contents.""")) |
239 if os.getcwd() == project.ppath: |
239 if os.getcwd() == project.ppath: |
240 os.chdir(os.path.dirname(project.ppath)) |
240 os.chdir(os.path.dirname(project.ppath)) |
304 if noDialog: |
304 if noDialog: |
305 status = self.startSynchronizedProcess( |
305 status = self.startSynchronizedProcess( |
306 QProcess(), "svn", args, os.path.join(tmpDir, project)) |
306 QProcess(), "svn", args, os.path.join(tmpDir, project)) |
307 else: |
307 else: |
308 dia = SvnDialog( |
308 dia = SvnDialog( |
309 self.trUtf8('Importing project into Subversion repository')) |
309 self.tr('Importing project into Subversion repository')) |
310 res = dia.startProcess(args, os.path.join(tmpDir, project)) |
310 res = dia.startProcess(args, os.path.join(tmpDir, project)) |
311 if res: |
311 if res: |
312 dia.exec_() |
312 dia.exec_() |
313 status = dia.normalExit() |
313 status = dia.normalExit() |
314 |
314 |
342 else: |
342 else: |
343 if not tag.startswith('tags') and \ |
343 if not tag.startswith('tags') and \ |
344 not tag.startswith('branches'): |
344 not tag.startswith('branches'): |
345 type, ok = QInputDialog.getItem( |
345 type, ok = QInputDialog.getItem( |
346 None, |
346 None, |
347 self.trUtf8("Subversion Checkout"), |
347 self.tr("Subversion Checkout"), |
348 self.trUtf8( |
348 self.tr( |
349 "The tag must be a normal tag (tags) or" |
349 "The tag must be a normal tag (tags) or" |
350 " a branch tag (branches)." |
350 " a branch tag (branches)." |
351 " Please select from the list."), |
351 " Please select from the list."), |
352 self.tagTypeList, |
352 self.tagTypeList, |
353 0, False) |
353 0, False) |
367 |
367 |
368 if noDialog: |
368 if noDialog: |
369 return self.startSynchronizedProcess(QProcess(), 'svn', args) |
369 return self.startSynchronizedProcess(QProcess(), 'svn', args) |
370 else: |
370 else: |
371 dia = SvnDialog( |
371 dia = SvnDialog( |
372 self.trUtf8('Checking project out of Subversion repository')) |
372 self.tr('Checking project out of Subversion repository')) |
373 res = dia.startProcess(args) |
373 res = dia.startProcess(args) |
374 if res: |
374 if res: |
375 dia.exec_() |
375 dia.exec_() |
376 return dia.normalExit() |
376 return dia.normalExit() |
377 |
377 |
398 else: |
398 else: |
399 if not tag.startswith('tags') and \ |
399 if not tag.startswith('tags') and \ |
400 not tag.startswith('branches'): |
400 not tag.startswith('branches'): |
401 type, ok = QInputDialog.getItem( |
401 type, ok = QInputDialog.getItem( |
402 None, |
402 None, |
403 self.trUtf8("Subversion Export"), |
403 self.tr("Subversion Export"), |
404 self.trUtf8( |
404 self.tr( |
405 "The tag must be a normal tag (tags) or" |
405 "The tag must be a normal tag (tags) or" |
406 " a branch tag (branches)." |
406 " a branch tag (branches)." |
407 " Please select from the list."), |
407 " Please select from the list."), |
408 self.tagTypeList, |
408 self.tagTypeList, |
409 0, False) |
409 0, False) |
420 args.append("--force") |
420 args.append("--force") |
421 args.append(self.__svnURL(svnUrl)) |
421 args.append(self.__svnURL(svnUrl)) |
422 args.append(projectDir) |
422 args.append(projectDir) |
423 |
423 |
424 dia = SvnDialog( |
424 dia = SvnDialog( |
425 self.trUtf8('Exporting project from Subversion repository')) |
425 self.tr('Exporting project from Subversion repository')) |
426 res = dia.startProcess(args) |
426 res = dia.startProcess(args) |
427 if res: |
427 if res: |
428 dia.exec_() |
428 dia.exec_() |
429 return dia.normalExit() |
429 return dia.normalExit() |
430 |
430 |
490 break |
490 break |
491 |
491 |
492 if not ok: |
492 if not ok: |
493 res = E5MessageBox.yesNo( |
493 res = E5MessageBox.yesNo( |
494 self.__ui, |
494 self.__ui, |
495 self.trUtf8("Commit Changes"), |
495 self.tr("Commit Changes"), |
496 self.trUtf8( |
496 self.tr( |
497 """The commit affects files, that have unsaved""" |
497 """The commit affects files, that have unsaved""" |
498 """ changes. Shall the commit be continued?"""), |
498 """ changes. Shall the commit be continued?"""), |
499 icon=E5MessageBox.Warning) |
499 icon=E5MessageBox.Warning) |
500 if not res: |
500 if not res: |
501 return |
501 return |
539 |
539 |
540 if noDialog: |
540 if noDialog: |
541 self.startSynchronizedProcess(QProcess(), "svn", args, dname) |
541 self.startSynchronizedProcess(QProcess(), "svn", args, dname) |
542 else: |
542 else: |
543 dia = SvnDialog( |
543 dia = SvnDialog( |
544 self.trUtf8('Commiting changes to Subversion repository')) |
544 self.tr('Commiting changes to Subversion repository')) |
545 res = dia.startProcess(args, dname) |
545 res = dia.startProcess(args, dname) |
546 if res: |
546 if res: |
547 dia.exec_() |
547 dia.exec_() |
548 self.committed.emit() |
548 self.committed.emit() |
549 self.checkVCSStatus() |
549 self.checkVCSStatus() |
576 if noDialog: |
576 if noDialog: |
577 self.startSynchronizedProcess(QProcess(), "svn", args, dname) |
577 self.startSynchronizedProcess(QProcess(), "svn", args, dname) |
578 res = False |
578 res = False |
579 else: |
579 else: |
580 dia = SvnDialog( |
580 dia = SvnDialog( |
581 self.trUtf8('Synchronizing with the Subversion repository')) |
581 self.tr('Synchronizing with the Subversion repository')) |
582 res = dia.startProcess(args, dname, True) |
582 res = dia.startProcess(args, dname, True) |
583 if res: |
583 if res: |
584 dia.exec_() |
584 dia.exec_() |
585 res = dia.hasAddOrDelete() |
585 res = dia.hasAddOrDelete() |
586 self.checkVCSStatus() |
586 self.checkVCSStatus() |
672 |
672 |
673 if noDialog: |
673 if noDialog: |
674 self.startSynchronizedProcess(QProcess(), "svn", args, wdir) |
674 self.startSynchronizedProcess(QProcess(), "svn", args, wdir) |
675 else: |
675 else: |
676 dia = SvnDialog( |
676 dia = SvnDialog( |
677 self.trUtf8('Adding files/directories to the Subversion' |
677 self.tr('Adding files/directories to the Subversion' |
678 ' repository')) |
678 ' repository')) |
679 res = dia.startProcess(args, wdir) |
679 res = dia.startProcess(args, wdir) |
680 if res: |
680 if res: |
681 dia.exec_() |
681 dia.exec_() |
682 |
682 |
683 def vcsAddBinary(self, name, isDir=False): |
683 def vcsAddBinary(self, name, isDir=False): |
762 self.addArguments(args, path) |
762 self.addArguments(args, path) |
763 else: |
763 else: |
764 args.append(path) |
764 args.append(path) |
765 |
765 |
766 dia = SvnDialog( |
766 dia = SvnDialog( |
767 self.trUtf8('Adding directory trees to the Subversion repository')) |
767 self.tr('Adding directory trees to the Subversion repository')) |
768 res = dia.startProcess(args, dname) |
768 res = dia.startProcess(args, dname) |
769 if res: |
769 if res: |
770 dia.exec_() |
770 dia.exec_() |
771 |
771 |
772 def vcsRemove(self, name, project=False, noDialog=False): |
772 def vcsRemove(self, name, project=False, noDialog=False): |
797 |
797 |
798 if noDialog: |
798 if noDialog: |
799 res = self.startSynchronizedProcess(QProcess(), "svn", args) |
799 res = self.startSynchronizedProcess(QProcess(), "svn", args) |
800 else: |
800 else: |
801 dia = SvnDialog( |
801 dia = SvnDialog( |
802 self.trUtf8('Removing files/directories from the Subversion' |
802 self.tr('Removing files/directories from the Subversion' |
803 ' repository')) |
803 ' repository')) |
804 res = dia.startProcess(args) |
804 res = dia.startProcess(args) |
805 if res: |
805 if res: |
806 dia.exec_() |
806 dia.exec_() |
807 res = dia.normalExit() |
807 res = dia.normalExit() |
808 |
808 |
856 args.append(target) |
856 args.append(target) |
857 |
857 |
858 if noDialog: |
858 if noDialog: |
859 res = self.startSynchronizedProcess(QProcess(), "svn", args) |
859 res = self.startSynchronizedProcess(QProcess(), "svn", args) |
860 else: |
860 else: |
861 dia = SvnDialog(self.trUtf8('Moving {0}') |
861 dia = SvnDialog(self.tr('Moving {0}') |
862 .format(name)) |
862 .format(name)) |
863 res = dia.startProcess(args) |
863 res = dia.startProcess(args) |
864 if res: |
864 if res: |
865 dia.exec_() |
865 dia.exec_() |
866 res = dia.normalExit() |
866 res = dia.normalExit() |
885 @param name file/directory name to show the log of (string) |
885 @param name file/directory name to show the log of (string) |
886 """ |
886 """ |
887 isFile = os.path.isfile(name) |
887 isFile = os.path.isfile(name) |
888 noEntries, ok = QInputDialog.getInt( |
888 noEntries, ok = QInputDialog.getInt( |
889 None, |
889 None, |
890 self.trUtf8("Subversion Log"), |
890 self.tr("Subversion Log"), |
891 self.trUtf8("Select number of entries to show."), |
891 self.tr("Select number of entries to show."), |
892 self.getPlugin().getPreferences("LogLimit"), 1, 999999, 1) |
892 self.getPlugin().getPreferences("LogLimit"), 1, 999999, 1) |
893 if ok: |
893 if ok: |
894 from .SvnLogDialog import SvnLogDialog |
894 from .SvnLogDialog import SvnLogDialog |
895 self.log = SvnLogDialog(self, isFile=isFile) |
895 self.log = SvnLogDialog(self, isFile=isFile) |
896 self.log.show() |
896 self.log.show() |
951 |
951 |
952 reposURL = self.svnGetReposName(dname) |
952 reposURL = self.svnGetReposName(dname) |
953 if reposURL is None: |
953 if reposURL is None: |
954 E5MessageBox.critical( |
954 E5MessageBox.critical( |
955 self.__ui, |
955 self.__ui, |
956 self.trUtf8("Subversion Error"), |
956 self.tr("Subversion Error"), |
957 self.trUtf8( |
957 self.tr( |
958 """The URL of the project repository could not be""" |
958 """The URL of the project repository could not be""" |
959 """ retrieved from the working copy. The tag operation""" |
959 """ retrieved from the working copy. The tag operation""" |
960 """ will be aborted""")) |
960 """ will be aborted""")) |
961 return |
961 return |
962 |
962 |
978 if self.otherData["standardLayout"]: |
978 if self.otherData["standardLayout"]: |
979 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
979 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
980 if not rx_base.exactMatch(reposURL): |
980 if not rx_base.exactMatch(reposURL): |
981 E5MessageBox.critical( |
981 E5MessageBox.critical( |
982 self.__ui, |
982 self.__ui, |
983 self.trUtf8("Subversion Error"), |
983 self.tr("Subversion Error"), |
984 self.trUtf8( |
984 self.tr( |
985 """The URL of the project repository has an""" |
985 """The URL of the project repository has an""" |
986 """ invalid format. The tag operation will""" |
986 """ invalid format. The tag operation will""" |
987 """ be aborted""")) |
987 """ be aborted""")) |
988 return |
988 return |
989 |
989 |
1011 self.addArguments(args, self.options['tag']) |
1011 self.addArguments(args, self.options['tag']) |
1012 args.append('--message') |
1012 args.append('--message') |
1013 args.append('Deleted tag <{0}>'.format(tag)) |
1013 args.append('Deleted tag <{0}>'.format(tag)) |
1014 args.append(url) |
1014 args.append(url) |
1015 |
1015 |
1016 dia = SvnDialog(self.trUtf8('Tagging {0} in the Subversion repository') |
1016 dia = SvnDialog(self.tr('Tagging {0} in the Subversion repository') |
1017 .format(name)) |
1017 .format(name)) |
1018 res = dia.startProcess(args) |
1018 res = dia.startProcess(args) |
1019 if res: |
1019 if res: |
1020 dia.exec_() |
1020 dia.exec_() |
1021 |
1021 |
1042 if names[0]: |
1042 if names[0]: |
1043 from UI.DeleteFilesConfirmationDialog import \ |
1043 from UI.DeleteFilesConfirmationDialog import \ |
1044 DeleteFilesConfirmationDialog |
1044 DeleteFilesConfirmationDialog |
1045 dlg = DeleteFilesConfirmationDialog( |
1045 dlg = DeleteFilesConfirmationDialog( |
1046 self.parent(), |
1046 self.parent(), |
1047 self.trUtf8("Revert changes"), |
1047 self.tr("Revert changes"), |
1048 self.trUtf8("Do you really want to revert all changes to" |
1048 self.tr("Do you really want to revert all changes to" |
1049 " these files or directories?"), |
1049 " these files or directories?"), |
1050 names) |
1050 names) |
1051 yes = dlg.exec_() == QDialog.Accepted |
1051 yes = dlg.exec_() == QDialog.Accepted |
1052 else: |
1052 else: |
1053 yes = E5MessageBox.yesNo( |
1053 yes = E5MessageBox.yesNo( |
1054 None, |
1054 None, |
1055 self.trUtf8("Revert changes"), |
1055 self.tr("Revert changes"), |
1056 self.trUtf8("""Do you really want to revert all changes of""" |
1056 self.tr("""Do you really want to revert all changes of""" |
1057 """ the project?""")) |
1057 """ the project?""")) |
1058 if yes: |
1058 if yes: |
1059 dia = SvnDialog(self.trUtf8('Reverting changes')) |
1059 dia = SvnDialog(self.tr('Reverting changes')) |
1060 res = dia.startProcess(args) |
1060 res = dia.startProcess(args) |
1061 if res: |
1061 if res: |
1062 dia.exec_() |
1062 dia.exec_() |
1063 self.checkVCSStatus() |
1063 self.checkVCSStatus() |
1064 |
1064 |
1073 |
1073 |
1074 reposURL = self.svnGetReposName(dname) |
1074 reposURL = self.svnGetReposName(dname) |
1075 if reposURL is None: |
1075 if reposURL is None: |
1076 E5MessageBox.critical( |
1076 E5MessageBox.critical( |
1077 self.__ui, |
1077 self.__ui, |
1078 self.trUtf8("Subversion Error"), |
1078 self.tr("Subversion Error"), |
1079 self.trUtf8( |
1079 self.tr( |
1080 """The URL of the project repository could not be""" |
1080 """The URL of the project repository could not be""" |
1081 """ retrieved from the working copy. The switch""" |
1081 """ retrieved from the working copy. The switch""" |
1082 """ operation will be aborted""")) |
1082 """ operation will be aborted""")) |
1083 return False |
1083 return False |
1084 |
1084 |
1100 if self.otherData["standardLayout"]: |
1100 if self.otherData["standardLayout"]: |
1101 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
1101 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
1102 if not rx_base.exactMatch(reposURL): |
1102 if not rx_base.exactMatch(reposURL): |
1103 E5MessageBox.critical( |
1103 E5MessageBox.critical( |
1104 self.__ui, |
1104 self.__ui, |
1105 self.trUtf8("Subversion Error"), |
1105 self.tr("Subversion Error"), |
1106 self.trUtf8( |
1106 self.tr( |
1107 """The URL of the project repository has an""" |
1107 """The URL of the project repository has an""" |
1108 """ invalid format. The switch operation will""" |
1108 """ invalid format. The switch operation will""" |
1109 """ be aborted""")) |
1109 """ be aborted""")) |
1110 return False |
1110 return False |
1111 |
1111 |
1129 args.append('--accept') |
1129 args.append('--accept') |
1130 args.append('postpone') |
1130 args.append('postpone') |
1131 args.append(url) |
1131 args.append(url) |
1132 args.append(name) |
1132 args.append(name) |
1133 |
1133 |
1134 dia = SvnDialog(self.trUtf8('Switching to {0}') |
1134 dia = SvnDialog(self.tr('Switching to {0}') |
1135 .format(tn)) |
1135 .format(tn)) |
1136 res = dia.startProcess(args, setLanguage=True) |
1136 res = dia.startProcess(args, setLanguage=True) |
1137 if res: |
1137 if res: |
1138 dia.exec_() |
1138 dia.exec_() |
1139 res = dia.hasAddOrDelete() |
1139 res = dia.hasAddOrDelete() |
1194 else: |
1194 else: |
1195 args.append(self.__svnURL(urlrev1)) |
1195 args.append(self.__svnURL(urlrev1)) |
1196 args.append(self.__svnURL(urlrev2)) |
1196 args.append(self.__svnURL(urlrev2)) |
1197 args.append(fname) |
1197 args.append(fname) |
1198 |
1198 |
1199 dia = SvnDialog(self.trUtf8('Merging {0}').format(name)) |
1199 dia = SvnDialog(self.tr('Merging {0}').format(name)) |
1200 res = dia.startProcess(args, dname) |
1200 res = dia.startProcess(args, dname) |
1201 if res: |
1201 if res: |
1202 dia.exec_() |
1202 dia.exec_() |
1203 |
1203 |
1204 def vcsRegisteredState(self, name): |
1204 def vcsRegisteredState(self, name): |
1490 self.wdHistory.insert(0, wd) |
1490 self.wdHistory.insert(0, wd) |
1491 |
1491 |
1492 args = [] |
1492 args = [] |
1493 self.addArguments(args, commandList) |
1493 self.addArguments(args, commandList) |
1494 |
1494 |
1495 dia = SvnDialog(self.trUtf8('Subversion command')) |
1495 dia = SvnDialog(self.tr('Subversion command')) |
1496 res = dia.startProcess(args, wd) |
1496 res = dia.startProcess(args, wd) |
1497 if res: |
1497 if res: |
1498 dia.exec_() |
1498 dia.exec_() |
1499 |
1499 |
1500 def vcsOptionsDialog(self, project, archive, editable=False, parent=None): |
1500 def vcsOptionsDialog(self, project, archive, editable=False, parent=None): |
1691 args.append('Copying {0} to {1}'.format(name, target)) |
1691 args.append('Copying {0} to {1}'.format(name, target)) |
1692 target = self.__svnURL(target) |
1692 target = self.__svnURL(target) |
1693 args.append(name) |
1693 args.append(name) |
1694 args.append(target) |
1694 args.append(target) |
1695 |
1695 |
1696 dia = SvnDialog(self.trUtf8('Copying {0}') |
1696 dia = SvnDialog(self.tr('Copying {0}') |
1697 .format(name)) |
1697 .format(name)) |
1698 res = dia.startProcess(args) |
1698 res = dia.startProcess(args) |
1699 if res: |
1699 if res: |
1700 dia.exec_() |
1700 dia.exec_() |
1701 res = dia.normalExit() |
1701 res = dia.normalExit() |
1732 if dlg.exec_() == QDialog.Accepted: |
1732 if dlg.exec_() == QDialog.Accepted: |
1733 propName, fileFlag, propValue = dlg.getData() |
1733 propName, fileFlag, propValue = dlg.getData() |
1734 if not propName: |
1734 if not propName: |
1735 E5MessageBox.critical( |
1735 E5MessageBox.critical( |
1736 self.__ui, |
1736 self.__ui, |
1737 self.trUtf8("Subversion Set Property"), |
1737 self.tr("Subversion Set Property"), |
1738 self.trUtf8("""You have to supply a property name.""" |
1738 self.tr("""You have to supply a property name.""" |
1739 """ Aborting.""")) |
1739 """ Aborting.""")) |
1740 return |
1740 return |
1741 |
1741 |
1742 args = [] |
1742 args = [] |
1743 args.append('propset') |
1743 args.append('propset') |
1744 self.addArguments(args, self.options['global']) |
1744 self.addArguments(args, self.options['global']) |
1753 self.addArguments(args, fnames) |
1753 self.addArguments(args, fnames) |
1754 else: |
1754 else: |
1755 dname, fname = self.splitPath(name) |
1755 dname, fname = self.splitPath(name) |
1756 args.append(fname) |
1756 args.append(fname) |
1757 |
1757 |
1758 dia = SvnDialog(self.trUtf8('Subversion Set Property')) |
1758 dia = SvnDialog(self.tr('Subversion Set Property')) |
1759 res = dia.startProcess(args, dname) |
1759 res = dia.startProcess(args, dname) |
1760 if res: |
1760 if res: |
1761 dia.exec_() |
1761 dia.exec_() |
1762 |
1762 |
1763 def svnDelProp(self, name, recursive=False): |
1763 def svnDelProp(self, name, recursive=False): |
1767 @param name file/directory name (string or list of strings) |
1767 @param name file/directory name (string or list of strings) |
1768 @param recursive flag indicating a recursive list is requested |
1768 @param recursive flag indicating a recursive list is requested |
1769 """ |
1769 """ |
1770 propName, ok = QInputDialog.getText( |
1770 propName, ok = QInputDialog.getText( |
1771 None, |
1771 None, |
1772 self.trUtf8("Subversion Delete Property"), |
1772 self.tr("Subversion Delete Property"), |
1773 self.trUtf8("Enter property name"), |
1773 self.tr("Enter property name"), |
1774 QLineEdit.Normal) |
1774 QLineEdit.Normal) |
1775 |
1775 |
1776 if not ok: |
1776 if not ok: |
1777 return |
1777 return |
1778 |
1778 |
1779 if not propName: |
1779 if not propName: |
1780 E5MessageBox.critical( |
1780 E5MessageBox.critical( |
1781 self.__ui, |
1781 self.__ui, |
1782 self.trUtf8("Subversion Delete Property"), |
1782 self.tr("Subversion Delete Property"), |
1783 self.trUtf8("""You have to supply a property name.""" |
1783 self.tr("""You have to supply a property name.""" |
1784 """ Aborting.""")) |
1784 """ Aborting.""")) |
1785 return |
1785 return |
1786 |
1786 |
1787 args = [] |
1787 args = [] |
1788 args.append('propdel') |
1788 args.append('propdel') |
1789 self.addArguments(args, self.options['global']) |
1789 self.addArguments(args, self.options['global']) |
1795 self.addArguments(args, fnames) |
1795 self.addArguments(args, fnames) |
1796 else: |
1796 else: |
1797 dname, fname = self.splitPath(name) |
1797 dname, fname = self.splitPath(name) |
1798 args.append(fname) |
1798 args.append(fname) |
1799 |
1799 |
1800 dia = SvnDialog(self.trUtf8('Subversion Delete Property')) |
1800 dia = SvnDialog(self.tr('Subversion Delete Property')) |
1801 res = dia.startProcess(args, dname) |
1801 res = dia.startProcess(args, dname) |
1802 if res: |
1802 if res: |
1803 dia.exec_() |
1803 dia.exec_() |
1804 |
1804 |
1805 def svnListTagBranch(self, path, tags=True): |
1805 def svnListTagBranch(self, path, tags=True): |
1952 else: |
1952 else: |
1953 error = str( |
1953 error = str( |
1954 process.readAllStandardError(), |
1954 process.readAllStandardError(), |
1955 Preferences.getSystem("IOEncoding"), 'replace') |
1955 Preferences.getSystem("IOEncoding"), 'replace') |
1956 else: |
1956 else: |
1957 error = self.trUtf8( |
1957 error = self.tr( |
1958 "The svn process did not finish within 30s.") |
1958 "The svn process did not finish within 30s.") |
1959 else: |
1959 else: |
1960 error = self.trUtf8( |
1960 error = self.tr( |
1961 'The process {0} could not be started. ' |
1961 'The process {0} could not be started. ' |
1962 'Ensure, that it is in the search path.').format('svn') |
1962 'Ensure, that it is in the search path.').format('svn') |
1963 |
1963 |
1964 return output, error |
1964 return output, error |
1965 |
1965 |
1992 |
1992 |
1993 output1, error = self.__svnGetFileForRevision(name, rev=rev1) |
1993 output1, error = self.__svnGetFileForRevision(name, rev=rev1) |
1994 if error: |
1994 if error: |
1995 E5MessageBox.critical( |
1995 E5MessageBox.critical( |
1996 self.__ui, |
1996 self.__ui, |
1997 self.trUtf8("Subversion Side-by-Side Difference"), |
1997 self.tr("Subversion Side-by-Side Difference"), |
1998 error) |
1998 error) |
1999 return |
1999 return |
2000 name1 = "{0} (rev. {1})".format(name, rev1 and rev1 or ".") |
2000 name1 = "{0} (rev. {1})".format(name, rev1 and rev1 or ".") |
2001 |
2001 |
2002 if rev2: |
2002 if rev2: |
2003 output2, error = self.__svnGetFileForRevision(name, rev=rev2) |
2003 output2, error = self.__svnGetFileForRevision(name, rev=rev2) |
2004 if error: |
2004 if error: |
2005 E5MessageBox.critical( |
2005 E5MessageBox.critical( |
2006 self.__ui, |
2006 self.__ui, |
2007 self.trUtf8("Subversion Side-by-Side Difference"), |
2007 self.tr("Subversion Side-by-Side Difference"), |
2008 error) |
2008 error) |
2009 return |
2009 return |
2010 name2 = "{0} (rev. {1})".format(name, rev2) |
2010 name2 = "{0} (rev. {1})".format(name, rev2) |
2011 else: |
2011 else: |
2012 try: |
2012 try: |
2063 else: |
2063 else: |
2064 dname, fname = self.splitPath(name) |
2064 dname, fname = self.splitPath(name) |
2065 args.append(fname) |
2065 args.append(fname) |
2066 |
2066 |
2067 dia = SvnDialog( |
2067 dia = SvnDialog( |
2068 self.trUtf8('Locking in the Subversion repository'), parent) |
2068 self.tr('Locking in the Subversion repository'), parent) |
2069 res = dia.startProcess(args, dname) |
2069 res = dia.startProcess(args, dname) |
2070 if res: |
2070 if res: |
2071 dia.exec_() |
2071 dia.exec_() |
2072 |
2072 |
2073 def svnUnlock(self, name, breakIt=False, parent=None): |
2073 def svnUnlock(self, name, breakIt=False, parent=None): |
2091 else: |
2091 else: |
2092 dname, fname = self.splitPath(name) |
2092 dname, fname = self.splitPath(name) |
2093 args.append(fname) |
2093 args.append(fname) |
2094 |
2094 |
2095 dia = SvnDialog( |
2095 dia = SvnDialog( |
2096 self.trUtf8('Unlocking in the Subversion repository'), parent) |
2096 self.tr('Unlocking in the Subversion repository'), parent) |
2097 res = dia.startProcess(args, dname) |
2097 res = dia.startProcess(args, dname) |
2098 if res: |
2098 if res: |
2099 dia.exec_() |
2099 dia.exec_() |
2100 |
2100 |
2101 def svnRelocate(self, projectPath): |
2101 def svnRelocate(self, projectPath): |
2115 args.append('--relocate') |
2115 args.append('--relocate') |
2116 args.append(currUrl) |
2116 args.append(currUrl) |
2117 args.append(newUrl) |
2117 args.append(newUrl) |
2118 args.append(projectPath) |
2118 args.append(projectPath) |
2119 |
2119 |
2120 dia = SvnDialog(self.trUtf8('Relocating')) |
2120 dia = SvnDialog(self.tr('Relocating')) |
2121 res = dia.startProcess(args) |
2121 res = dia.startProcess(args) |
2122 if res: |
2122 if res: |
2123 dia.exec_() |
2123 dia.exec_() |
2124 |
2124 |
2125 def svnRepoBrowser(self, projectPath=None): |
2125 def svnRepoBrowser(self, projectPath=None): |
2134 url = None |
2134 url = None |
2135 |
2135 |
2136 if url is None: |
2136 if url is None: |
2137 url, ok = QInputDialog.getText( |
2137 url, ok = QInputDialog.getText( |
2138 None, |
2138 None, |
2139 self.trUtf8("Repository Browser"), |
2139 self.tr("Repository Browser"), |
2140 self.trUtf8("Enter the repository URL."), |
2140 self.tr("Enter the repository URL."), |
2141 QLineEdit.Normal) |
2141 QLineEdit.Normal) |
2142 if not ok or not url: |
2142 if not ok or not url: |
2143 return |
2143 return |
2144 |
2144 |
2145 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
2145 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog |
2166 self.addArguments(args, fnames) |
2166 self.addArguments(args, fnames) |
2167 else: |
2167 else: |
2168 dname, fname = self.splitPath(names) |
2168 dname, fname = self.splitPath(names) |
2169 args.append(fname) |
2169 args.append(fname) |
2170 |
2170 |
2171 dia = SvnDialog(self.trUtf8('Remove from changelist')) |
2171 dia = SvnDialog(self.tr('Remove from changelist')) |
2172 res = dia.startProcess(args, dname) |
2172 res = dia.startProcess(args, dname) |
2173 if res: |
2173 if res: |
2174 dia.exec_() |
2174 dia.exec_() |
2175 |
2175 |
2176 def svnAddToChangelist(self, names): |
2176 def svnAddToChangelist(self, names): |
2182 @param names name or list of names of file or directory to add |
2182 @param names name or list of names of file or directory to add |
2183 (string) |
2183 (string) |
2184 """ |
2184 """ |
2185 clname, ok = QInputDialog.getItem( |
2185 clname, ok = QInputDialog.getItem( |
2186 None, |
2186 None, |
2187 self.trUtf8("Add to changelist"), |
2187 self.tr("Add to changelist"), |
2188 self.trUtf8("Enter name of the changelist:"), |
2188 self.tr("Enter name of the changelist:"), |
2189 sorted(self.svnGetChangelists()), |
2189 sorted(self.svnGetChangelists()), |
2190 0, True) |
2190 0, True) |
2191 if not ok or not clname: |
2191 if not ok or not clname: |
2192 return |
2192 return |
2193 |
2193 |
2201 self.addArguments(args, fnames) |
2201 self.addArguments(args, fnames) |
2202 else: |
2202 else: |
2203 dname, fname = self.splitPath(names) |
2203 dname, fname = self.splitPath(names) |
2204 args.append(fname) |
2204 args.append(fname) |
2205 |
2205 |
2206 dia = SvnDialog(self.trUtf8('Remove from changelist')) |
2206 dia = SvnDialog(self.tr('Remove from changelist')) |
2207 res = dia.startProcess(args, dname) |
2207 res = dia.startProcess(args, dname) |
2208 if res: |
2208 if res: |
2209 dia.exec_() |
2209 dia.exec_() |
2210 |
2210 |
2211 def svnShowChangelists(self, path): |
2211 def svnShowChangelists(self, path): |