Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0, 2.0.1, and 2.0.2

stable revpanel: show warning in commit widget if first parent is closed

Changeset 769b71619e09

Parent 668b588615b1

by Adrian Buehlmann

Changes to one file · Browse files at 769b71619e09 Showing diff from parent 668b588615b1 Diff from another changeset...

 
85
86
87
 
 
 
 
88
89
90
 
152
153
154
 
 
 
 
 
155
156
157
 
162
163
164
165
 
 
166
 
85
86
87
88
89
90
91
92
93
94
 
156
157
158
159
160
161
162
163
164
165
166
 
171
172
173
 
174
175
176
@@ -85,6 +85,10 @@
  ctx = ctx.p1()   childbranches = [cctx.branch() for cctx in ctx.children()]   return ctx.branch() not in childbranches + elif item == 'isclose': + if ctx.rev() is None: + ctx = ctx.p1() + return ctx.extra().get('close') is not None   raise csinfo.UnknownItem(item)    def markup_func(widget, item, value): @@ -152,6 +156,11 @@
  text = _('Not a head revision!')   return qtlib.markup(text, fg='red', weight='bold')   raise csinfo.UnknownItem(item) + elif item == 'isclose': + if value is True: + text = _('Head is closed!') + return qtlib.markup(text, fg='red', weight='bold') + raise csinfo.UnknownItem(item)   for cset in value:   if isinstance(cset, basestring):   csets.append(revid_markup(cset)) @@ -162,5 +171,6 @@
 def ParentWidget(repo):   'creates a parent rev widget and returns it'   custom = csinfo.custom(data=data_func, label=label_func, markup=nomarkup) - style = csinfo.panelstyle(contents=('parents','ishead'), selectable=True) + style = csinfo.panelstyle(contents=('parents', 'ishead', 'isclose'), + selectable=True)   return csinfo.create(repo, style=style, custom=custom)