Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 2.1, 2.1.1, and 2.1.2

merge with stable

Changeset 859fca957625

Parents f88b2ec8c2ee

Parents d16f372095e6

by Adrian Buehlmann

Changes to 5 files · Browse files at 859fca957625 Showing diff from parent f88b2ec8c2ee d16f372095e6 Diff from another changeset...

 
621
622
623
 
 
 
624
625
626
627
628
629
630
631
 
 
 
632
633
 
 
 
 
 
634
635
636
 
638
639
640
641
642
643
 
 
644
645
 
 
 
 
 
646
647
648
 
621
622
623
624
625
626
627
628
 
 
 
 
 
 
629
630
631
632
 
633
634
635
636
637
638
639
640
 
642
643
644
 
 
 
645
646
647
 
648
649
650
651
652
653
654
655
@@ -621,16 +621,20 @@
    # TODO: elif check if a subdirectory (for manifest tool)   + mde = _('File or diffs not displayed: ') + \ + _('File is larger than the specified max size.\n') +   if status in ('R', '!'):   if wfile in ctx.p1(): - olddata = ctx.p1()[wfile].data() - if '\0' in olddata: - self.error = 'binary file' - elif len(olddata) > ctx._repo.maxdiff: - p = _('File or diffs not displayed: ') - self.error = p + _('File is larger than the specified max size.\n') + fctx = ctx.p1()[wfile] + if fctx._filelog.rawsize(fctx.filerev()) > ctx._repo.maxdiff: + self.error = mde   else: - self.contents = hglib.tounicode(olddata) + olddata = fctx.data() + if '\0' in olddata: + self.error = 'binary file' + else: + self.contents = hglib.tounicode(olddata)   self.flabel += _(' <i>(was deleted)</i>')   else:   self.flabel += _(' <i>(was added, now missing)</i>') @@ -638,11 +642,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:
 
75
76
77
78
 
79
80
81
 
75
76
77
 
78
79
80
81
@@ -75,7 +75,7 @@
  try:   hashes = self.pending[curcl]   revs = [self.repo[hash] for hash in hashes] - except error.Abort, e: + except (error.Abort, error.RepoLookupError), e:   revs = []   self.cslist.clear()   self.cslist.update(self.repo, revs)
 
764
765
766
767
768
769
770
771
772
773
774
 
 
 
 
 
 
 
 
775
776
777
 
764
765
766
 
 
 
 
 
 
 
 
767
768
769
770
771
772
773
774
775
776
777
@@ -764,14 +764,14 @@
  changelist = hashes.pop(0)   clnum = int(changelist)   if len(hashes)>1 and len(hashes[0])==1: - state = hashes.pop(0) - if state == 's': - changelist = _('%s (submitted)') % changelist - elif state == 'p': - changelist = _('%s (pending)') % changelist - else: - raise ValueError - pending[changelist] = hashes + state = hashes.pop(0) + if state == 's': + changelist = _('%s (submitted)') % changelist + elif state == 'p': + changelist = _('%s (pending)') % changelist + else: + raise ValueError + pending[changelist] = hashes   except (ValueError, IndexError):   text = _('Unable to parse p4pending output')   if pending:
 
60
61
62
63
64
65
66
 
60
61
62
 
63
64
65
@@ -60,7 +60,6 @@
  <File Name="unicodedata.pyd" />   <File Name="win32api.pyd" />   <File Name="win32com.shell.shell.pyd" /> - <File Name="win32console.pyd" />   <File Name="win32_crypto.pyd" />   <File Name="win32cred.pyd" />   <File Name="win32event.pyd" />
 
33
34
35
36
 
37
38
39
 
33
34
35
 
36
37
38
39
@@ -33,7 +33,7 @@
  <?define templates.static.guid = {ECF8D1EF-910D-4586-9508-86A6236B4FD5} ?>     <!-- dist.wxs --> - <?define dist.guid = {82AD6653-B84F-4f73-B4AC-755D6CAA8F55} ?> + <?define dist.guid = {9287B4BD-AA5A-43CA-8BB2-BAAAFB1BC283} ?>   <?define imageformats.guid = {056DFB00-3EB1-4ACA-A43B-55CD5004DED1} ?>     <!-- cmenu-i18n.wxs -->