104 path = url.split("/")[-1] |
104 path = url.split("/")[-1] |
105 |
105 |
106 if revision == "": |
106 if revision == "": |
107 rev = "" |
107 rev = "" |
108 else: |
108 else: |
109 rev = "{0:7d}".format(revision.number) |
109 rev = revision.number |
110 if date == "": |
110 if date == "": |
111 dt = "" |
111 dt = "" |
112 else: |
112 else: |
113 dt = formatTime(date) |
113 dt = formatTime(date) |
114 if size == 0: |
|
115 sz = "" |
|
116 else: |
|
117 sz = "{0:7d}".format(size) |
|
118 if author is None: |
114 if author is None: |
119 author = "" |
115 author = "" |
120 |
116 |
121 itm = QTreeWidgetItem(parent, [path, rev, author, sz, dt]) |
117 itm = QTreeWidgetItem(parent) |
|
118 itm.setData(0, Qt.DisplayRole, path) |
|
119 itm.setData(1, Qt.DisplayRole, rev) |
|
120 itm.setData(2, Qt.DisplayRole, author) |
|
121 itm.setData(3, Qt.DisplayRole, size) |
|
122 itm.setData(4, Qt.DisplayRole, dt) |
122 |
123 |
123 if nodekind == pysvn.node_kind.dir: |
124 if nodekind == pysvn.node_kind.dir: |
124 itm.setIcon(0, self.__dirIcon) |
125 itm.setIcon(0, self.__dirIcon) |
125 itm.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator) |
126 itm.setChildIndicatorPolicy(QTreeWidgetItem.ShowIndicator) |
126 elif nodekind == pysvn.node_kind.file: |
127 elif nodekind == pysvn.node_kind.file: |