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 fileview: enforce maxdiff for I?C

Changeset bee5a520fe79

Parent 93471309cb3d

by Eduard-Cristian Stefan

Changes to one file · Browse files at bee5a520fe79 Showing diff from parent 93471309cb3d Diff from another changeset...

 
638
639
640
641
642
643
 
 
644
645
 
 
 
 
 
646
647
648
 
638
639
640
 
 
 
641
642
643
 
644
645
646
647
648
649
650
651
@@ -638,11 +638,14 @@
    if status in ('I', '?', 'C'):   try: - data = open(repo.wjoin(wfile), 'r').read() - if '\0' in data: - self.error = 'binary file' + if os.path.getsize(repo.wjoin(wfile)) > ctx._repo.maxdiff: + self.error = mde   else: - self.contents = hglib.tounicode(data) + data = open(repo.wjoin(wfile), 'r').read() + if '\0' in data: + self.error = 'binary file' + else: + self.contents = hglib.tounicode(data)   if status in ('I', '?'):   self.flabel += _(' <i>(is unversioned)</i>')   except EnvironmentError, e: