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

stable fileview: do not assume that diff split was successfull (closes #162)

Changeset 783790538f8b

Parent 286f57d051e5

by Steve Borho

Changes to one file · Browse files at 783790538f8b Showing diff from parent 286f57d051e5 Diff from another changeset...

 
335
336
337
338
339
 
 
 
 
 
 
340
341
342
 
335
336
337
 
 
338
339
340
341
342
343
344
345
346
@@ -335,8 +335,12 @@
  # diff -r f6bfc41af6d7 -r c1b18806486d tortoisehg/hgqt/thgrepo.py   # --- a/tortoisehg/hgqt/thgrepo.py   # +++ b/tortoisehg/hgqt/thgrepo.py - noheader = fd.diff.split('\n', 3)[3] - self.sci.setText(hglib.tounicode(noheader)) + out = fd.diff.split('\n', 3) + if len(out) == 4: + self.sci.setText(hglib.tounicode(out[3])) + else: + # there was an error or rename without diffs + self.sci.setText(hglib.tounicode(fd.diff))   elif fd.contents is None:   return   elif self._mode == 'ann':