Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 0.7.1, 0.7.2, and 0.7.3

status: prevent traceback when rename diffs are change-selected

This prevents tracebacks, but the behavior is still suboptimal. The
rename diff header is tied to both the rename source and target, making
it a tri-state entity when it can only display two states. The diff header
can be "selected" or not when one of the files is unselected depending on
the order they were toggled.

Fixes #77 More work necessary before 0.8 to clean up the rest.

Changeset f43f49cb77ad

Parent 591ec1e65fd3

by Steve Borho

Changes to one file · Browse files at f43f49cb77ad Showing diff from parent 591ec1e65fd3 Diff from another changeset...

Change 1 of 1 Show Entire File hggtk/​status.py Stacked
 
643
644
645
646
 
 
 
647
648
649
 
650
651
652
 
643
644
645
 
646
647
648
649
 
 
650
651
652
653
@@ -643,10 +643,11 @@
  row[DM_DISPLAYED] = row[DM_MARKUP]     def _update_diff_header(self, dmodel, wfile, selected): - hc = self._filechunks[wfile][0] + fc = self._filechunks[wfile] + hc = fc[0] + lasthunk = len(fc)-1   row = dmodel[hc] - displayed = row[DM_DISPLAYED] - sel = lambda x: not dmodel[hc+x+1][DM_REJECTED] + sel = lambda x: x >= lasthunk or not dmodel[hc+x+1][DM_REJECTED]   newtext = self._shelve_chunks[row[DM_CHUNK_ID]].selpretty(sel)   if not selected:   newtext = "<span foreground='#888888'>" + newtext + "</span>"