##// END OF EJS Templates
patch: clarify binary hunk parsing loop
Patrick Mezard -
r16567:aef3d0d4 default
parent child Browse files
Show More
@@ -1040,12 +1040,13 b' class binhunk(object):'
1040 1040 hunk.append(l)
1041 1041 return l.rstrip('\r\n')
1042 1042
1043 line = getline(lr, self.hunk)
1044 while line and not line.startswith('literal '):
1043 while True:
1045 1044 line = getline(lr, self.hunk)
1046 if not line:
1047 raise PatchError(_('could not extract "%s" binary data')
1048 % self._fname)
1045 if not line:
1046 raise PatchError(_('could not extract "%s" binary data')
1047 % self._fname)
1048 if line.startswith('literal '):
1049 break
1049 1050 size = int(line[8:].rstrip())
1050 1051 dec = []
1051 1052 line = getline(lr, self.hunk)
General Comments 0
You need to be logged in to leave comments. Login now