Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.9, 0.9.1, and 0.9.1.1

csinfo: cleanup ChangesetLabel.update() logic

Changeset c84e4cb1f686

Parent 011be34126b3

by Yuki KODAMA

Changes to one file · Browse files at c84e4cb1f686 Showing diff from parent 011be34126b3 Diff from another changeset...

 
204
205
206
207
208
209
 
210
211
212
213
 
 
 
214
215
216
217
218
219
220
221
 
 
222
223
224
225
226
 
 
227
228
 
229
230
231
232
233
 
234
235
236
 
204
205
206
 
 
 
207
208
 
 
 
209
210
211
212
 
 
 
 
213
 
 
214
215
216
217
218
 
 
219
220
221
 
222
223
224
225
226
 
227
228
229
230
@@ -204,33 +204,27 @@
  self.update(rev)     def update(self, rev=None, style=None, repo=None): - if rev is None: - rev = self.rev - else: + if rev is not None:   self.rev = str(rev) - if repo is None: - repo = self.repo - else: + if style is not None: + self.csstyle = style + if repo is not None:   self.repo = repo - if style is None: - style = self.csstyle - else: - self.csstyle = style   - if 'selectable' in style: - sel = style['selectable'] + if 'selectable' in self.csstyle: + sel = self.csstylestyle['selectable']   assert isinstance(sel, bool)   self.set_selectable(sel)   - if 'width' in style or 'height' in style: - width = style.get('width', -1) + if 'width' in self.csstyle or 'height' in self.csstyle: + width = self.csstyle.get('width', -1)   assert isinstance(width, (int, long)) - height = style.get('height', -1) + height = self.csstyle.get('height', -1)   assert isinstance(height, (int, long))   self.set_size_request(width, height)   self.set_line_wrap(True)   - contents = style.get('contents', None) + contents = self.csstyle.get('contents', None)   assert contents     # build info