Changeset e39142cd6cd6…
Parent 92f69c0538ef…
by
Changes to one file · Browse files at e39142cd6cd6 Showing diff from parent 92f69c0538ef Diff from another changeset...
@@ -192,16 +192,16 @@ ' in the working directory'))
return False
# merge new chunks into existing chunks, sorting on start line
- newchunks = chunks[0]
+ newchunks = [chunks[0]]
pidx = nidx = 1
- while pidx < len(patchchunks) and nidx < len(chunks):
+ while pidx < len(patchchunks) or nidx < len(chunks):
if pidx == len(patchchunks):
newchunks.append(chunks[nidx])
nidx += 1
elif nidx == len(chunks):
newchunks.append(patchchunks[pidx])
pidx += 1
- elif chunks[nidx].toline < patchchunks[pidx].toline:
+ elif chunks[nidx].fromline < patchchunks[pidx].fromline:
newchunks.append(chunks[nidx])
nidx += 1
else:
|
Loading...