347 if not tag.startswith('tags') and \ |
347 if not tag.startswith('tags') and \ |
348 not tag.startswith('branches'): |
348 not tag.startswith('branches'): |
349 type_, ok = QInputDialog.getItem( |
349 type_, ok = QInputDialog.getItem( |
350 None, |
350 None, |
351 self.trUtf8("Subversion Checkout"), |
351 self.trUtf8("Subversion Checkout"), |
352 self.trUtf8("The tag must be a normal tag (tags) or" |
352 self.trUtf8( |
|
353 "The tag must be a normal tag (tags) or" |
353 " a branch tag (branches)." |
354 " a branch tag (branches)." |
354 " Please select from the list."), |
355 " Please select from the list."), |
355 self.tagTypeList, |
356 self.tagTypeList, |
356 0, False) |
357 0, False) |
357 if not ok: |
358 if not ok: |
411 if not tag.startswith('tags') and \ |
412 if not tag.startswith('tags') and \ |
412 not tag.startswith('branches'): |
413 not tag.startswith('branches'): |
413 type_, ok = QInputDialog.getItem( |
414 type_, ok = QInputDialog.getItem( |
414 None, |
415 None, |
415 self.trUtf8("Subversion Export"), |
416 self.trUtf8("Subversion Export"), |
416 self.trUtf8("The tag must be a normal tag (tags) or" |
417 self.trUtf8( |
|
418 "The tag must be a normal tag (tags) or" |
417 " a branch tag (branches)." |
419 " a branch tag (branches)." |
418 " Please select from the list."), |
420 " Please select from the list."), |
419 self.tagTypeList, |
421 self.tagTypeList, |
420 0, False) |
422 0, False) |
421 if not ok: |
423 if not ok: |
1064 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
1066 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
1065 if not rx_base.exactMatch(reposURL): |
1067 if not rx_base.exactMatch(reposURL): |
1066 E5MessageBox.critical( |
1068 E5MessageBox.critical( |
1067 self.__ui, |
1069 self.__ui, |
1068 self.trUtf8("Subversion Error"), |
1070 self.trUtf8("Subversion Error"), |
1069 self.trUtf8("""The URL of the project repository has an""" |
1071 self.trUtf8( |
|
1072 """The URL of the project repository has an""" |
1070 """ invalid format. The tag operation will""" |
1073 """ invalid format. The tag operation will""" |
1071 """ be aborted""")) |
1074 """ be aborted""")) |
1072 return |
1075 return |
1073 |
1076 |
1074 reposRoot = rx_base.cap(1) |
1077 reposRoot = rx_base.cap(1) |
1131 project = e5App().getObject("Project") |
1134 project = e5App().getObject("Project") |
1132 names = [project.getRelativePath(nam) for nam in name] |
1135 names = [project.getRelativePath(nam) for nam in name] |
1133 if names[0]: |
1136 if names[0]: |
1134 from UI.DeleteFilesConfirmationDialog import \ |
1137 from UI.DeleteFilesConfirmationDialog import \ |
1135 DeleteFilesConfirmationDialog |
1138 DeleteFilesConfirmationDialog |
1136 dia = DeleteFilesConfirmationDialog(self.parent(), |
1139 dia = DeleteFilesConfirmationDialog( |
|
1140 self.parent(), |
1137 self.trUtf8("Revert changes"), |
1141 self.trUtf8("Revert changes"), |
1138 self.trUtf8( |
1142 self.trUtf8( |
1139 "Do you really want to revert all changes to these files" |
1143 "Do you really want to revert all changes to these files" |
1140 " or directories?"), |
1144 " or directories?"), |
1141 name) |
1145 name) |
1205 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
1209 rx_base = QRegExp('(.+)/(trunk|tags|branches).*') |
1206 if not rx_base.exactMatch(reposURL): |
1210 if not rx_base.exactMatch(reposURL): |
1207 E5MessageBox.critical( |
1211 E5MessageBox.critical( |
1208 self.__ui, |
1212 self.__ui, |
1209 self.trUtf8("Subversion Error"), |
1213 self.trUtf8("Subversion Error"), |
1210 self.trUtf8("""The URL of the project repository has an""" |
1214 self.trUtf8( |
|
1215 """The URL of the project repository has an""" |
1211 """ invalid format. The switch operation will""" |
1216 """ invalid format. The switch operation will""" |
1212 """ be aborted""")) |
1217 """ be aborted""")) |
1213 return False |
1218 return False |
1214 |
1219 |
1215 reposRoot = rx_base.cap(1) |
1220 reposRoot = rx_base.cap(1) |
1225 else: |
1230 else: |
1226 url = self.__svnURL(tag) |
1231 url = self.__svnURL(tag) |
1227 tn = url |
1232 tn = url |
1228 |
1233 |
1229 client = self.getClient() |
1234 client = self.getClient() |
1230 dlg = \ |
1235 dlg = SvnDialog(self.trUtf8('Switching to {0}').format(tn), |
1231 SvnDialog(self.trUtf8('Switching to {0}').format(tn), |
1236 "switch {0} {1}".format(url, name), |
1232 "switch {0} {1}".format(url, name), |
1237 client) |
1233 client) |
|
1234 QApplication.processEvents() |
1238 QApplication.processEvents() |
1235 locker = QMutexLocker(self.vcsExecutionMutex) |
1239 locker = QMutexLocker(self.vcsExecutionMutex) |
1236 try: |
1240 try: |
1237 rev = client.switch(name, url) |
1241 rev = client.switch(name, url) |
1238 dlg.showMessage(self.trUtf8("Revision {0}.\n").format(rev.number)) |
1242 dlg.showMessage(self.trUtf8("Revision {0}.\n").format(rev.number)) |
1609 Public method used to cleanup the working copy. |
1613 Public method used to cleanup the working copy. |
1610 |
1614 |
1611 @param name directory name to be cleaned up (string) |
1615 @param name directory name to be cleaned up (string) |
1612 """ |
1616 """ |
1613 client = self.getClient() |
1617 client = self.getClient() |
1614 dlg = \ |
1618 dlg = SvnDialog(self.trUtf8('Cleaning up {0}').format(name), |
1615 SvnDialog(self.trUtf8('Cleaning up {0}').format(name), |
1619 "cleanup {0}".format(name), |
1616 "cleanup {0}".format(name), |
1620 client) |
1617 client) |
|
1618 QApplication.processEvents() |
1621 QApplication.processEvents() |
1619 locker = QMutexLocker(self.vcsExecutionMutex) |
1622 locker = QMutexLocker(self.vcsExecutionMutex) |
1620 try: |
1623 try: |
1621 client.cleanup(name) |
1624 client.cleanup(name) |
1622 except pysvn.ClientError as e: |
1625 except pysvn.ClientError as e: |
1698 apiVersion = "{0} {1}".format( |
1701 apiVersion = "{0} {1}".format( |
1699 ".".join([str(v) for v in pysvn.svn_api_version[:3]]), |
1702 ".".join([str(v) for v in pysvn.svn_api_version[:3]]), |
1700 pysvn.svn_api_version[3]) |
1703 pysvn.svn_api_version[3]) |
1701 else: |
1704 else: |
1702 apiVersion = QApplication.translate('subversion', "unknown") |
1705 apiVersion = QApplication.translate('subversion', "unknown") |
1703 return QApplication.translate('subversion', |
1706 return QApplication.translate( |
|
1707 'subversion', |
1704 """<h3>Repository information</h3>""" |
1708 """<h3>Repository information</h3>""" |
1705 """<table>""" |
1709 """<table>""" |
1706 """<tr><td><b>PySvn V.</b></td><td>{0}</td></tr>""" |
1710 """<tr><td><b>PySvn V.</b></td><td>{0}</td></tr>""" |
1707 """<tr><td><b>Subversion V.</b></td><td>{1}</td></tr>""" |
1711 """<tr><td><b>Subversion V.</b></td><td>{1}</td></tr>""" |
1708 """<tr><td><b>Subversion API V.</b></td><td>{2}</td></tr>""" |
1712 """<tr><td><b>Subversion API V.</b></td><td>{2}</td></tr>""" |
1765 cwd = os.getcwd() |
1769 cwd = os.getcwd() |
1766 os.chdir(dname) |
1770 os.chdir(dname) |
1767 opts = self.options['global'] |
1771 opts = self.options['global'] |
1768 recurse = "--non-recursive" not in opts |
1772 recurse = "--non-recursive" not in opts |
1769 client = self.getClient() |
1773 client = self.getClient() |
1770 dlg = \ |
1774 dlg = SvnDialog(self.trUtf8('Resolving conficts'), |
1771 SvnDialog(self.trUtf8('Resolving conficts'), |
1775 "resolved{0} {1}".format( |
1772 "resolved{0} {1}".format( |
1776 (not recurse) and " --non-recursive" or "", |
1773 (not recurse) and " --non-recursive" or "", |
1777 " ".join(fnames)), |
1774 " ".join(fnames)), |
1778 client) |
1775 client) |
|
1776 QApplication.processEvents() |
1779 QApplication.processEvents() |
1777 try: |
1780 try: |
1778 for name in fnames: |
1781 for name in fnames: |
1779 client.resolved(name, recurse=recurse) |
1782 client.resolved(name, recurse=recurse) |
1780 except pysvn.ClientError as e: |
1783 except pysvn.ClientError as e: |