37 |
37 |
38 @param vcs reference to the vcs object |
38 @param vcs reference to the vcs object |
39 @param mode mode of the dialog (string, "browse" or "select") |
39 @param mode mode of the dialog (string, "browse" or "select") |
40 @param parent parent widget (QWidget) |
40 @param parent parent widget (QWidget) |
41 """ |
41 """ |
42 super(SvnRepoBrowserDialog, self).__init__(parent) |
42 super().__init__(parent) |
43 self.setupUi(self) |
43 self.setupUi(self) |
44 SvnDialogMixin.__init__(self) |
44 SvnDialogMixin.__init__(self) |
45 self.setWindowFlags(Qt.WindowType.Window) |
45 self.setWindowFlags(Qt.WindowType.Window) |
46 |
46 |
47 self.repoTree.headerItem().setText(self.repoTree.columnCount(), "") |
47 self.repoTree.headerItem().setText(self.repoTree.columnCount(), "") |
105 @param date date info (integer) |
105 @param date date info (integer) |
106 @param nodekind node kind info (pysvn.node_kind) |
106 @param nodekind node kind info (pysvn.node_kind) |
107 @param url url of the entry (string) |
107 @param url url of the entry (string) |
108 @return reference to the generated item (QTreeWidgetItem) |
108 @return reference to the generated item (QTreeWidgetItem) |
109 """ |
109 """ |
110 if repopath == "/": |
110 path = url if repopath == "/" else url.split("/")[-1] |
111 path = url |
111 |
112 else: |
112 rev = revision.number if revision else "" |
113 path = url.split("/")[-1] |
113 dt = formatTime(date) if date else "" |
114 |
|
115 if revision == "": |
|
116 rev = "" |
|
117 else: |
|
118 rev = revision.number |
|
119 if date == "": |
|
120 dt = "" |
|
121 else: |
|
122 dt = formatTime(date) |
|
123 if author is None: |
114 if author is None: |
124 author = "" |
115 author = "" |
125 |
116 |
126 itm = QTreeWidgetItem(parent) |
117 itm = QTreeWidgetItem(parent) |
127 itm.setData(0, Qt.ItemDataRole.DisplayRole, path) |
118 itm.setData(0, Qt.ItemDataRole.DisplayRole, path) |
295 Public slot called when the dialog is accepted. |
286 Public slot called when the dialog is accepted. |
296 """ |
287 """ |
297 if self.focusWidget() == self.urlCombo: |
288 if self.focusWidget() == self.urlCombo: |
298 return |
289 return |
299 |
290 |
300 super(SvnRepoBrowserDialog, self).accept() |
291 super().accept() |
301 |
292 |
302 def getSelectedUrl(self): |
293 def getSelectedUrl(self): |
303 """ |
294 """ |
304 Public method to retrieve the selected repository URL. |
295 Public method to retrieve the selected repository URL. |
305 |
296 |