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

stable csinfo: add default contents to csinfo.panelstyle() if no specified

Changeset 2c5f4925bdd4

Parent 28b438180330

by Yuki KODAMA

Changes to one file · Browse files at 2c5f4925bdd4 Showing diff from parent 28b438180330 Diff from another changeset...

 
26
27
28
 
 
29
30
31
 
50
51
52
53
 
54
55
56
 
93
94
95
96
97
98
99
100
101
 
102
103
104
105
106
 
107
108
 
 
 
109
110
111
 
26
27
28
29
30
31
32
33
 
52
53
54
 
55
56
57
58
 
95
96
97
 
 
 
 
 
 
98
99
 
 
 
 
100
101
102
103
104
105
106
107
108
@@ -26,6 +26,8 @@
   def panelstyle(**kargs):   kargs['type'] = 'panel' + if 'contents' not in kargs: + kargs['contents'] = PANEL_DEFAULT   return kargs    def labelstyle(**kargs): @@ -50,7 +52,7 @@
  custom = {}   self.custom = custom   if style is None: - style = panelstyle(contents=PANEL_DEFAULT) + style = panelstyle()   self.csstyle = style   if rev is None:   rev = 'tip' @@ -93,19 +95,14 @@
  args = (rev, style, custom, repo, self.info)   type = style['type']   if type == 'panel': - if 'contents' not in style: - style['contents'] = PANEL_DEFAULT - panel = ChangesetPanel(*args) - if hasattr(self, 'cache'): - self.cache[key] = panel - return panel + widget = ChangesetPanel(*args)   elif type == 'label': - label = ChangesetLabel(*args) - if hasattr(self, 'cache'): - self.cache[key] = label - return label + widget = ChangesetLabel(*args)   else:   raise _("unknown 'type': %s") % type + if hasattr(self, 'cache'): + self.cache[key] = widget + return widget   else:   raise _("must be specified 'type' in style")