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

commit: show info about working dir parents

Adds one or two text lines below edit frame with parent cset summary.

Changeset 560cfbdf1889

Parent 4bc63e7d3d7d

by Adrian Buehlmann

Changes to one file · Browse files at 560cfbdf1889 Showing diff from parent 4bc63e7d3d7d Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​commit.py Stacked
 
294
295
296
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
298
299
 
 
300
301
302
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
304
305
 
352
353
354
 
355
356
357
 
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
 
 
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
 
384
385
386
387
388
389
390
@@ -294,12 +294,44 @@
  scroller.add(self.text)   gtklib.addspellcheck(self.text, self.repo.ui)   + self.parents_frame = gtk.Frame(_('Parent')) + parents_vbox = gtk.VBox(spacing=2) + self.parents_frame.add(parents_vbox) + def plabel(): + w = gtk.Label() + w.set_selectable(True) + hb = gtk.HBox() + hb.pack_start(w, False, False, 4) + parents_vbox.pack_start(hb, False, False) + return w + self.parent1_label = plabel() + self.parent2_label = plabel() + vbox.pack_start(self.parents_frame, False, False) +   self.vpaned = gtk.VPaned() - self.vpaned.add1(vbox) - self.vpaned.add2(status_body) + self.vpaned.pack1(vbox, shrink=False) + self.vpaned.pack2(status_body, shrink=False)   gobject.idle_add(self.realize_settings)   return self.vpaned   + def update_parent_labels(self): + def setlabel(label, ctx): + s = str(ctx.rev()) + ' (' + str(ctx) + ') ' + s += hglib.toutf(ctx.description().split('\n')[0]) + label.set_markup('<span face="monospace">%s</span>' % s) + + if self.mqmode: + ctxs = self.repo['.'].parents() + else: + ctxs = self.repo[None].parents() + setlabel(self.parent1_label, ctxs[0]) + if len(ctxs) == 2: + setlabel(self.parent2_label, ctxs[1]) + self.parent2_label.show() + self.parents_frame.set_label(_('Parents')) + else: + self.parent2_label.hide() +   def realize_settings(self):   self.vpaned.set_position(self._setting_vpos)   @@ -352,6 +384,7 @@
  self.check_patch_queue()   self.check_undo()   self.refresh_branchop() + self.update_parent_labels()   return success