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: do not use fctx.filerev() when ctx.rev() is None

Changeset 79d3e0530fdf

Parent 10769611158a

by Steve Borho

Changes to one file · Browse files at 79d3e0530fdf Showing diff from parent 10769611158a Diff from another changeset...

 
172
173
174
175
 
 
 
 
 
 
 
 
 
 
 
 
176
177
178
 
172
173
174
 
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
@@ -172,7 +172,18 @@
  _('%s is not found in revision %d') % (wfile, ctx.rev()))   return   - if fctx._filelog.rawsize(fctx.filerev()) > ctx._repo.maxdiff: + try: + if rev is None: + size = fctx.size() + else: + size = fctx._filelog.rawsize(fctx.filerev()) + except (EnvironmentError, error.LookupError), e: + self.setText(_('File or diffs not displayed: ') + \ + hglib.tounicode(str(e))) + self.error = p + hglib.tounicode(str(e)) + return + + if size > ctx._repo.maxdiff:   self.setText(_('File or diffs not displayed: ') + \   _('File is larger than the specified max size.\n'))   else: