Plugins/VcsPlugins/vcsSubversion/SvnOptionsDialog.py

branch
Py2 comp.
changeset 3057
10516539f238
parent 2525
8b507a9a2d40
parent 3009
bf5ae5d7477d
child 3145
a9de05d4a22f
equal deleted inserted replaced
3056:9986ec0e559a 3057:10516539f238
2 2
3 # Copyright (c) 2002 - 2013 Detlev Offenbach <detlev@die-offenbachs.de> 3 # Copyright (c) 2002 - 2013 Detlev Offenbach <detlev@die-offenbachs.de>
4 # 4 #
5 5
6 """ 6 """
7 Module implementing a dialog to enter options used to start a project in the VCS. 7 Module implementing a dialog to enter options used to start a project in
8 the VCS.
8 """ 9 """
9 10
10 from __future__ import unicode_literals # __IGNORE_WARNING__ 11 from __future__ import unicode_literals # __IGNORE_WARNING__
11 12
12 import os 13 import os
66 self.trUtf8("Select Repository-Directory"), 67 self.trUtf8("Select Repository-Directory"),
67 self.vcsUrlEdit.text(), 68 self.vcsUrlEdit.text(),
68 E5FileDialog.Options(E5FileDialog.ShowDirsOnly)) 69 E5FileDialog.Options(E5FileDialog.ShowDirsOnly))
69 70
70 if directory: 71 if directory:
71 self.vcsUrlEdit.setText(Utilities.toNativeSeparators(directory)) 72 self.vcsUrlEdit.setText(
73 Utilities.toNativeSeparators(directory))
72 else: 74 else:
73 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog 75 from .SvnRepoBrowserDialog import SvnRepoBrowserDialog
74 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self) 76 dlg = SvnRepoBrowserDialog(self.vcs, mode="select", parent=self)
75 dlg.start(self.protocolCombo.currentText() + self.vcsUrlEdit.text()) 77 dlg.start(
78 self.protocolCombo.currentText() + self.vcsUrlEdit.text())
76 if dlg.exec_() == QDialog.Accepted: 79 if dlg.exec_() == QDialog.Accepted:
77 url = dlg.getSelectedUrl() 80 url = dlg.getSelectedUrl()
78 if url: 81 if url:
79 protocol = url.split("://")[0] 82 protocol = url.split("://")[0]
80 path = url.split("://")[1] 83 path = url.split("://")[1]
84 87
85 @pyqtSlot(str) 88 @pyqtSlot(str)
86 def on_protocolCombo_activated(self, protocol): 89 def on_protocolCombo_activated(self, protocol):
87 """ 90 """
88 Private slot to switch the status of the directory selection button. 91 Private slot to switch the status of the directory selection button.
92
93 @param protocol selected protocol (string)
89 """ 94 """
90 if protocol == "file://": 95 if protocol == "file://":
91 self.networkPath = self.vcsUrlEdit.text() 96 self.networkPath = self.vcsUrlEdit.text()
92 self.vcsUrlEdit.setText(self.localPath) 97 self.vcsUrlEdit.setText(self.localPath)
93 self.vcsUrlLabel.setText(self.trUtf8("Pat&h:")) 98 self.vcsUrlLabel.setText(self.trUtf8("Pat&h:"))

eric ide

mercurial