##// END OF EJS Templates
python3: 2to3 fixes
super-admin -
r4930:f88262ff default
parent child Browse files
Show More
@@ -7,10 +7,7 b' import hashlib'
7 7 import hmac
8 8 import json
9 9 import logging
10 try:
11 import cPickle as pickle
12 except ImportError:
13 import pickle
10 import pickle
14 11 import sys
15 12 import threading
16 13 import time
@@ -32,8 +32,8 b' import time'
32 32 import collections
33 33 import difflib
34 34 import logging
35 import cPickle as pickle
36 from itertools import tee, imap
35 import pickle
36 from itertools import tee
37 37
38 38 from rhodecode.lib.vcs.exceptions import VCSError
39 39 from rhodecode.lib.vcs.nodes import FileNode, SubModuleNode
@@ -430,10 +430,10 b' class DiffProcessor(object):'
430 430 lineiter = iter(chunk)
431 431 try:
432 432 while 1:
433 line = lineiter.next()
433 line = next(lineiter)
434 434 if line['action'] not in (
435 435 Action.UNMODIFIED, Action.CONTEXT):
436 nextline = lineiter.next()
436 nextline = next(lineiter)
437 437 if nextline['action'] in ['unmod', 'context'] or \
438 438 nextline['action'] == line['action']:
439 439 continue
@@ -633,7 +633,7 b' class DiffProcessor(object):'
633 633 raw_diff = []
634 634
635 635 try:
636 line = diff_iter.next()
636 line = next(diff_iter)
637 637
638 638 while line:
639 639 raw_diff.append(line)
@@ -665,7 +665,7 b' class DiffProcessor(object):'
665 665 'line': line,
666 666 })
667 667
668 line = diff_iter.next()
668 line = next(diff_iter)
669 669
670 670 while old_line < old_end or new_line < new_end:
671 671 command = ' '
@@ -700,7 +700,7 b' class DiffProcessor(object):'
700 700 })
701 701 raw_diff.append(line)
702 702
703 line = diff_iter.next()
703 line = next(diff_iter)
704 704
705 705 if self._newline_marker.match(line):
706 706 # we need to append to lines, since this is not
@@ -727,7 +727,7 b' class DiffProcessor(object):'
727 727 raw_diff = []
728 728
729 729 try:
730 line = diff_iter.next()
730 line = next(diff_iter)
731 731
732 732 while line:
733 733 raw_diff.append(line)
@@ -759,7 +759,7 b' class DiffProcessor(object):'
759 759 old_end += old_line
760 760 new_end += new_line
761 761
762 line = diff_iter.next()
762 line = next(diff_iter)
763 763
764 764 while old_line < old_end or new_line < new_end:
765 765 command = ' '
@@ -794,7 +794,7 b' class DiffProcessor(object):'
794 794 })
795 795 raw_diff.append(line)
796 796
797 line = diff_iter.next()
797 line = next(diff_iter)
798 798
799 799 if self._newline_marker.match(line):
800 800 # we need to append to lines, since this is not
@@ -1066,7 +1066,7 b' class DiffProcessor(object):'
1066 1066 context_iter = iter(context)
1067 1067 for line_idx, line in enumerate(chunk):
1068 1068 try:
1069 if _context_line(line) == context_iter.next():
1069 if _context_line(line) == next(context_iter):
1070 1070 continue
1071 1071 except StopIteration:
1072 1072 matches.append((line_idx, chunk))
@@ -1076,7 +1076,7 b' class DiffProcessor(object):'
1076 1076 # if we had a match at the end
1077 1077 line_idx += 1
1078 1078 try:
1079 context_iter.next()
1079 next(context_iter)
1080 1080 except StopIteration:
1081 1081 matches.append((line_idx, chunk))
1082 1082
General Comments 0
You need to be logged in to leave comments. Login now