Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

repomodel: make filerevmodel functional again

It's not clear how this dialog will evolve, but it's best to keep it
working for the interim.

Changeset 753c53162f07

Parent f2ad989df68e

by Steve Borho

Changes to 2 files · Browse files at 753c53162f07 Showing diff from parent f2ad989df68e Diff from another changeset...

 
43
44
45
46
 
47
48
49
 
43
44
45
 
46
47
48
49
@@ -43,7 +43,7 @@
  def setRepo(self, repo, branch='', fromhead=None, follow=False):   self.repo = repo   self._datacache = {} - self.load_config() + self.reloadConfig()     def setFilename(self, filename):   self.filename = filename
 
162
163
164
165
166
167
168
 
173
174
175
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
176
177
178
 
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
 
162
163
164
 
165
166
167
 
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
 
251
252
253
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
254
255
256
@@ -162,7 +162,6 @@
  if self.hasmq:   self.mqueues = self.repo.mq.series[:]   self.wd_revs = [ctx.rev() for ctx in wdctxs] - self.authorcolor = self.repo.ui.configbool('tortoisehg', 'authorcolor')   grapher = revision_grapher(self.repo, start_rev=None,   follow=False, branch=branch)   self.graph = Graph(self.repo, grapher, self.max_file_size) @@ -173,6 +172,23 @@
  QTimer.singleShot(0, lambda: self.emit(SIGNAL('filled')))   self.timerHandle = self.startTimer(50)   + def reloadConfig(self): + self.dot_radius = 8 + self.rowheight = 20 + self.fill_step = 500 # use hgtk logic + self.max_file_size = 1024*1024 # will be removed + self.authorcolor = self.repo.ui.configbool('tortoisehg', 'authorcolor') + self.updateColumns() + + def updateColumns(self): + s = QSettings() + cols = s.value('workbench/columns').toStringList() + cols = [str(col) for col in cols] + if cols: + validcols = [col for col in cols if col in self._allcolumns] + self._columns = tuple(validcols) + self.emit(SIGNAL("layoutChanged()")) +   def branch(self):   return self.filterbranch   @@ -235,22 +251,6 @@
  def columnCount(self, parent=None):   return len(self._columns)   - def reloadConfig(self): - self.dot_radius = 8 - self.rowheight = 20 - self.fill_step = 500 # use hgtk logic - self.max_file_size = 1024*1024 # will be removed - self.updateColumns() - - def updateColumns(self): - s = QSettings() - cols = s.value('workbench/columns').toStringList() - cols = [str(col) for col in cols] - if cols: - validcols = [col for col in cols if col in self._allcolumns] - self._columns = tuple(validcols) - self.emit(SIGNAL("layoutChanged()")) -   def maxWidthValueForColumn(self, column):   column = self._columns[column]   try: