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

stable annotate: enforce maxdiff

Changeset 79a5b5077fa4

Parent 0a707be45e60

by Eduard-Cristian Stefan

Changes to one file · Browse files at 79a5b5077fa4 Showing diff from parent 0a707be45e60 Diff from another changeset...

 
171
172
173
174
175
176
177
178
 
 
 
 
179
180
181
182
183
184
185
186
 
 
 
 
 
 
 
 
 
 
 
 
 
187
188
189
 
171
172
173
 
 
 
 
 
174
175
176
177
178
 
 
 
 
 
 
 
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
@@ -171,19 +171,24 @@
  qtlib.ErrorMsgBox(_('Unable to annotate'),   _('%s is not found in revision %d') % (wfile, ctx.rev()))   return - self._rev = ctx.rev() - self.clear() - self.annfile = wfile - if util.binary(fctx.data()): - self.setText(_('File is binary.\n')) + + if fctx._filelog.rawsize(fctx.filerev()) > ctx._repo.maxdiff: + self.setText(_('File or diffs not displayed: ') + \ + _('File is larger than the specified max size.\n'))   else: - self.setText(hglib.tounicode(fctx.data())) - if line: - self.setCursorPosition(int(line) - 1, 0) - self._updatelexer(fctx) - self._updatemarginwidth() - self.sourceChanged.emit(wfile, self._rev) - self._updateannotation() + self._rev = ctx.rev() + self.clear() + self.annfile = wfile + 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) + self._updatemarginwidth() + self.sourceChanged.emit(wfile, self._rev) + self._updateannotation()     def _updateannotation(self):   if not self.isAnnotationEnabled() or not self.annfile: