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

status: global toggle of file states now updates chunks

Changeset fdfdaed459ef

Parent c1bffe723a8b

by Steve Borho

Changes to one file · Browse files at fdfdaed459ef Showing diff from parent c1bffe723a8b Diff from another changeset...

Change 1 of 2 Show Entire File hggtk/​status.py Stacked
 
523
524
525
 
526
527
528
529
530
531
 
532
533
534
 
 
 
 
 
535
536
537
 
1102
1103
1104
1105
 
 
 
1106
1107
1108
 
523
524
525
526
527
 
 
 
 
 
528
529
530
531
532
533
534
535
536
537
538
539
 
1104
1105
1106
 
1107
1108
1109
1110
1111
1112
@@ -523,15 +523,17 @@
      def _select_toggle(self, cellrenderer, path): + '''User manually toggled file status'''   self.model[path][0] = not self.model[path][0] - # Update chunk toggle state to match file toggle state - file = self.model[path][2] - if file in self._filechunks: - for n in self._filechunks[file][1:]: - self.diff_model[n][DM_REJECTED] = not self.model[path][0] + self._update_chunk_state(self.model[path])   self._update_check_count()   return True   + def _update_chunk_state(self, entry): + '''Update chunk toggle state to match file toggle state''' + file = entry[2] + for n in self._filechunks[file][1:]: + self.diff_model[n][DM_REJECTED] = not entry[0]     def _show_toggle(self, check, type):   self.opts[type] = check.get_active() @@ -1102,7 +1104,9 @@
  for entry in self.model:   if ctype and not entry[1] in ctype:   continue - entry[0] = state + if entry[0] != state: + entry[0] = state + self._update_chunk_state(entry)   self._update_check_count()