Changeset - 1886705c4a8c
[Not reviewed]
default
0 1 0
Mads Kiilerich - 6 years ago 2019-11-25 01:48:22
mads@kiilerich.com
Grafted from: 60ff536e2c95
py3: use memoryview ... almost, but not entirely similar to buffer
1 file changed with 2 insertions and 2 deletions:
0 comments (0 inline, 0 general)
kallithea/lib/diffs.py
Show inline comments
 
@@ -292,7 +292,7 @@ class DiffProcessor(object):
 
        if not isinstance(diff, bytes):
 
            raise Exception('Diff must be bytes - got %s' % type(diff))
 

	
 
        self._diff = diff
 
        self._diff = memoryview(diff)
 
        self.adds = 0
 
        self.removes = 0
 
        self.diff_limit = diff_limit
 
@@ -315,7 +315,7 @@ class DiffProcessor(object):
 
                self.limited_diff = True
 
                continue
 

	
 
            head, diff_lines = _get_header(self.vcs, buffer(self._diff, start, end - start))
 
            head, diff_lines = _get_header(self.vcs, self._diff[start:end])
 

	
 
            op = None
 
            stats = {
0 comments (0 inline, 0 general)