Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.1.7, 1.9, and 1.1.8

stable changeset: use filelog.rowsize() to check maxdiffsize

Closes #1336

Changeset afe9b5d1f997

Parent ceeb78168f19

by Steve Borho

Changes to one file · Browse files at afe9b5d1f997 Showing diff from parent ceeb78168f19 Diff from another changeset...

 
349
350
351
 
352
353
 
 
 
 
354
355
356
 
 
357
358
359
 
349
350
351
352
353
 
354
355
356
357
358
 
 
359
360
361
362
363
@@ -349,11 +349,15 @@
  eob = buf.get_end_iter()   offset = eob.get_offset()   + size = 0   try: - fctx = self.repo[rev].filectx(wfile) + ctx = self.repo[rev] + if wfile in ctx: + fctx = ctx.filectx(wfile) + size = fctx._filelog.rawsize(fctx.filerev())   except error.LookupError: - fctx = None - if fctx and fctx.size() > hglib.getmaxdiffsize(self.repo.ui): + pass + if size > hglib.getmaxdiffsize(self.repo.ui):   lines = ['diff',   _(' %s is larger than the specified max diff size') % wfile]   else: