Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.2, 1.9.3, and 2.0

chunks: fix chunk merge

Changeset e39142cd6cd6

Parent 92f69c0538ef

by Steve Borho

Changes to one file · Browse files at e39142cd6cd6 Showing diff from parent 92f69c0538ef Diff from another changeset...

 
192
193
194
195
 
196
197
 
198
199
200
201
202
203
204
 
205
206
207
 
192
193
194
 
195
196
 
197
198
199
200
201
202
203
 
204
205
206
207
@@ -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: