9 |
9 |
10 from PyQt4.QtCore import * |
10 from PyQt4.QtCore import * |
11 from PyQt4.QtGui import * |
11 from PyQt4.QtGui import * |
12 |
12 |
13 from E5Gui.E5Application import e5App |
13 from E5Gui.E5Application import e5App |
|
14 from E5Gui import E5MessageBox |
14 |
15 |
15 import pysvn |
16 import pysvn |
16 |
17 |
17 from .Ui_SvnUrlSelectionDialog import Ui_SvnUrlSelectionDialog |
18 from .Ui_SvnUrlSelectionDialog import Ui_SvnUrlSelectionDialog |
18 |
|
19 |
19 |
20 class SvnUrlSelectionDialog(QDialog, Ui_SvnUrlSelectionDialog): |
20 class SvnUrlSelectionDialog(QDialog, Ui_SvnUrlSelectionDialog): |
21 """ |
21 """ |
22 Class implementing a dialog to enter the URLs for the svn diff command. |
22 Class implementing a dialog to enter the URLs for the svn diff command. |
23 """ |
23 """ |
45 self.typeCombo1.addItems(["trunk/", "tags/", "branches/"]) |
45 self.typeCombo1.addItems(["trunk/", "tags/", "branches/"]) |
46 self.typeCombo2.addItems(["trunk/", "tags/", "branches/"]) |
46 self.typeCombo2.addItems(["trunk/", "tags/", "branches/"]) |
47 |
47 |
48 reposURL = self.vcs.svnGetReposName(path) |
48 reposURL = self.vcs.svnGetReposName(path) |
49 if reposURL is None: |
49 if reposURL is None: |
50 QMessageBox.critical(None, |
50 E5MessageBox.critical(self, |
51 self.trUtf8("Subversion Error"), |
51 self.trUtf8("Subversion Error"), |
52 self.trUtf8("""The URL of the project repository could not be""" |
52 self.trUtf8("""The URL of the project repository could not be""" |
53 """ retrieved from the working copy. The operation will""" |
53 """ retrieved from the working copy. The operation will""" |
54 """ be aborted""")) |
54 """ be aborted""")) |
55 self.reject() |
55 self.reject() |
57 |
57 |
58 if self.vcs.otherData["standardLayout"]: |
58 if self.vcs.otherData["standardLayout"]: |
59 # determine the base path of the project in the repository |
59 # determine the base path of the project in the repository |
60 rx_base = QRegExp('(.+/)(trunk|tags|branches).*') |
60 rx_base = QRegExp('(.+/)(trunk|tags|branches).*') |
61 if not rx_base.exactMatch(reposURL): |
61 if not rx_base.exactMatch(reposURL): |
62 QMessageBox.critical(None, |
62 E5MessageBox.critical(self, |
63 self.trUtf8("Subversion Error"), |
63 self.trUtf8("Subversion Error"), |
64 self.trUtf8("""The URL of the project repository has an""" |
64 self.trUtf8("""The URL of the project repository has an""" |
65 """ invalid format. The operation will""" |
65 """ invalid format. The operation will""" |
66 """ be aborted""")) |
66 """ be aborted""")) |
67 self.reject() |
67 self.reject() |