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

status: remove 'last_file' optimization

This was preventing diffmodel refreshes when a file's state was toggled.

Changeset 7e04b9b03c08

Parent e3f7faffa047

by Steve Borho

Changes to one file · Browse files at 7e04b9b03c08 Showing diff from parent e3f7faffa047 Diff from another changeset...

Change 1 of 4 Show Entire File hggtk/​status.py Stacked
 
87
88
89
90
91
92
93
 
634
635
636
637
638
639
640
 
852
853
854
855
856
857
858
859
860
861
862
863
 
900
901
902
903
904
905
906
907
908
909
910
911
912
 
87
88
89
 
90
91
92
 
633
634
635
 
636
637
638
 
850
851
852
 
853
854
 
 
 
855
856
857
 
894
895
896
 
897
898
 
 
899
 
900
901
902
@@ -87,7 +87,6 @@
  gdialog.GDialog.init(self)   self.mode = 'status'   self.ready = True - self.last_file = None   self.filerowstart = {}   self.filechunks = {}   @@ -634,7 +633,6 @@
    def reload_status(self):   if not self.ready: return False - self.last_file = None   res, outtext = self._hg_call_wrapper('Status', self.do_reload_status)   self.update_check_count()   return res @@ -852,12 +850,8 @@
  # Update the diff text with merge diff to both parents   model, paths = selection.get_selected_rows()   if not paths: - self.last_file = None   return   wfile = self.filemodel[paths[0]][FM_PATH] - if wfile == self.last_file: - return - self.last_file = wfile   difftext = [_('===== Diff to first parent =====\n')]   wfiles = [self.repo.wjoin(wfile)]   wctx = self.repo[None] @@ -900,13 +894,9 @@
  # Read this file's diffs into diff model   model, paths = selection.get_selected_rows()   if not paths: - self.last_file = None   return   wfile = self.filemodel[paths[0]][FM_PATH] - if wfile == self.last_file: - return   # TODO: this could be a for-loop - self.last_file = wfile   self.filerowstart = {}   self.diffmodel.clear()   self.append_diff_hunks(wfile)