equal
deleted
inserted
replaced
1038 def getline(lr, hunk): |
1038 def getline(lr, hunk): |
1039 l = lr.readline() |
1039 l = lr.readline() |
1040 hunk.append(l) |
1040 hunk.append(l) |
1041 return l.rstrip('\r\n') |
1041 return l.rstrip('\r\n') |
1042 |
1042 |
1043 line = getline(lr, self.hunk) |
1043 while True: |
1044 while line and not line.startswith('literal '): |
|
1045 line = getline(lr, self.hunk) |
1044 line = getline(lr, self.hunk) |
1046 if not line: |
1045 if not line: |
1047 raise PatchError(_('could not extract "%s" binary data') |
1046 raise PatchError(_('could not extract "%s" binary data') |
1048 % self._fname) |
1047 % self._fname) |
|
1048 if line.startswith('literal '): |
|
1049 break |
1049 size = int(line[8:].rstrip()) |
1050 size = int(line[8:].rstrip()) |
1050 dec = [] |
1051 dec = [] |
1051 line = getline(lr, self.hunk) |
1052 line = getline(lr, self.hunk) |
1052 while len(line) > 1: |
1053 while len(line) > 1: |
1053 l = line[0] |
1054 l = line[0] |