Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.8, 0.8.1, and 0.8.2

status: use workingctx

Changeset 703d9501abda

Parent 84b71d3677b1

by Steve Borho

Changes to one file · Browse files at 703d9501abda Showing diff from parent 84b71d3677b1 Diff from another changeset...

Change 1 of 5 Show Entire File hggtk/​status.py Stacked
 
212
213
214
 
 
 
215
216
217
 
274
275
276
277
278
 
 
 
279
280
281
 
291
292
293
294
 
295
296
297
 
319
320
321
322
 
323
324
325
 
809
810
811
 
812
813
 
814
815
816
 
212
213
214
215
216
217
218
219
220
 
277
278
279
 
 
280
281
282
283
284
285
 
295
296
297
 
298
299
300
301
 
323
324
325
 
326
327
328
329
 
813
814
815
816
817
 
818
819
820
821
@@ -212,6 +212,9 @@
      def get_body(self): + wctx = self.repo[None] + self.merging = len(wctx.parents()) == 2 +   self.connect('map-event', self._displayed)     # TODO: should generate menus dynamically during right-click, currently @@ -274,8 +277,9 @@
  path_cell = gtk.CellRendererText()   stat_cell = gtk.CellRendererText()   - self.selcb = None - if len(self.repo['.'].parents()) != 2: + if self.merging: + self.selcb = None + else:   # show file selection checkboxes only when applicable   col0 = gtk.TreeViewColumn('', toggle_cell)   col0.add_attribute(toggle_cell, 'active', FM_CHECKED) @@ -291,7 +295,7 @@
  col1.set_resizable(False)   self.filetree.append_column(col1)   - if len(self.repo['.'].parents()) == 2: + if self.merging:   col = gtk.TreeViewColumn(_('ms'), stat_cell)   col.add_attribute(stat_cell, 'text', FM_MERGE_STATUS)   col.set_sort_column_id(4) @@ -319,7 +323,7 @@
  scroller.set_policy(gtk.POLICY_AUTOMATIC, gtk.POLICY_AUTOMATIC)     self.difffont = pango.FontDescription(self.fontlist) - if len(self.repo.changectx(None).parents()) == 2: + if self.merging:   # display merge diffs in simple text view   self.clipboard = None   self.merge_diff_text = gtk.TextView() @@ -809,8 +813,9 @@
  def dohgdiff():   difftext = [_('===== Diff to first parent =====\n')]   wfiles = [self.repo.wjoin(wfile)] + wctx = self.repo[None]   matcher = cmdutil.match(self.repo, wfiles, self.opts) - for s in patch.diff(self.repo, self.repo.dirstate.parents()[0], None, + for s in patch.diff(self.repo, wctx.p1().node(), None,   match=matcher, opts=patch.diffopts(self.ui, self.opts)):   difftext.extend(s.splitlines(True))   difftext.append(_('\n===== Diff to second parent =====\n'))