Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1, 1.1.1, and 1.1.2

status: eliminate update_hunk_model()

Changeset b49891650465

Parent 4805d9137d2c

by Adrian Buehlmann

Changes to one file · Browse files at b49891650465 Showing diff from parent 4805d9137d2c Diff from another changeset...

 
610
611
612
613
 
614
615
616
 
617
618
619
620
621
 
622
623
624
 
828
829
830
831
 
 
 
 
832
833
834
 
949
950
951
952
953
954
955
956
957
958
959
960
961
 
610
611
612
 
613
614
615
 
616
617
618
619
 
 
620
621
622
623
 
827
828
829
 
830
831
832
833
834
835
836
 
951
952
953
 
 
 
 
 
 
 
954
955
956
@@ -610,15 +610,14 @@
    self.auto_check() # may check more files   - for i, row in enumerate(model): + for row in model:   if row[FM_PARTIAL_SELECTED]:   # force refresh of partially selected files - self.update_hunk_model(i, self.filetree) + self.chunks.update_hunk_model(row[FM_PATH], row[FM_CHECKED])   self.chunks.clear()   else:   # demand refresh of full or non selection - wfile = row[FM_PATH] - self.chunks.del_file(wfile) + self.chunks.del_file(row[FM_PATH])     # recover selections   firstrow = None @@ -828,7 +827,10 @@
  buf = self.generate_text_diffs(row)   self.diff_text.set_buffer(buf)   elif pname == 'hunk-selection': - self.update_hunk_model(row, tree) + fmrow = self.filemodel[row] + self.chunks.update_hunk_model(fmrow[FM_PATH], fmrow[FM_CHECKED]) + if not self.is_merge() and self.chunks.len(): + self.difftree.scroll_to_cell(0, use_align=True, row_align=0.0)   elif pname == 'commit-preview':   self.update_commit_preview()   @@ -949,13 +951,6 @@
  self.stbar.set_text(str(e))   return self.diff_highlight_buffer(difftext)   - def update_hunk_model(self, path, tree): - # Read this file's diffs into hunk selection model - row = self.filemodel[path] - self.chunks.update_hunk_model(row[FM_PATH], row[FM_CHECKED]) - if not self.is_merge() and self.chunks.len(): - tree.scroll_to_cell(0, use_align=True, row_align=0.0) -   def update_check_state(self, wfile, partial, newvalue):   for fr in self.filemodel:   if fr[FM_PATH] == wfile: