Read about our upcoming Code of Conduct on this issue

Commit b4355cc1 authored by Adrian Buehlmann's avatar Adrian Buehlmann
Browse files

merge with stable

......@@ -621,16 +621,20 @@ class FileData(object):
# 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 @@ class FileData(object):
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,7 +75,7 @@ class PerforcePending(QDialog):
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,14 +764,14 @@ class SyncWidget(QWidget):
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,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,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 -->
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment