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

status: do not allow empty chunk lists into filechunks dict

Changeset 7a7a05d6c174

Parent 0184a8c7759c

by Steve Borho

Changes to one file · Browse files at 7a7a05d6c174 Showing diff from parent 0184a8c7759c Diff from another changeset...

Change 1 of 3 Show Entire File hggtk/​status.py Stacked
 
666
667
668
 
 
669
670
671
 
936
937
938
 
 
 
 
939
940
941
 
965
966
967
968
969
970
971
972
 
666
667
668
669
670
671
672
673
 
938
939
940
941
942
943
944
945
946
947
 
971
972
973
 
 
974
975
976
@@ -666,6 +666,8 @@
  fileentry[FM_PARTIAL_SELECTED] = False   wfile = fileentry[FM_PATH]   selected = fileentry[FM_CHECKED] + if wfile not in self.filechunks: + return   chunks = self.filechunks[wfile]   for chunk in chunks:   chunk.active = selected @@ -936,6 +938,10 @@
  def append_diff_hunks(self, wfile):   'Append diff hunks of one file to the diffmodel'   chunks = self.read_file_chunks(wfile) + if not chunks: + if wfile in self.filechunks: + del self.filechunks[wfile] + return   rows = []   for n, chunk in enumerate(chunks):   chunk.active = True @@ -965,8 +971,6 @@
    self.filerowstart[wfile] = len(self.diffmodel)   self.filechunks[wfile] = chunks - if not chunks: - return     # Set row status based on chunk state   rej, nonrej = False, False