Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.0.1, 2.0.2, and 2.0.3

stable annotate: fix segfault caused by annotating binary file

Now AnnotateView rejects to display binary data like HgFileView.

Changeset 18eb2b86255f

Parent 44eaba8fc904

by Yuya Nishihara

Changes to one file · Browse files at 18eb2b86255f Showing diff from parent 44eaba8fc904 Diff from another changeset...

 
174
175
176
177
 
 
 
 
178
179
180
 
187
188
189
 
 
190
191
192
 
174
175
176
 
177
178
179
180
181
182
183
 
190
191
192
193
194
195
196
197
@@ -174,7 +174,10 @@
  self._rev = ctx.rev()   self.clear()   self.annfile = wfile - self.setText(hglib.tounicode(fctx.data())) + if util.binary(fctx.data()): + self.setText(_('File is binary.\n')) + else: + self.setText(hglib.tounicode(fctx.data()))   if line:   self.setCursorPosition(int(line) - 1, 0)   self._updatelexer(fctx) @@ -187,6 +190,8 @@
  return   ctx = self.repo[self._rev]   fctx = ctx[hglib.fromunicode(self.annfile)] + if util.binary(fctx.data()): + return   self._thread.abort()   self._thread.start(fctx)