comparison hgext/convert/git.py @ 22467:333d654783ad

convert: for git's getchanges, use explicit index for iteration Upcoming patches will add support for copies and renames, for which we'll need to access multiple lines of the difftree output at once.
author Siddharth Agarwal <sid0@fb.com>
date Thu, 11 Sep 2014 23:35:19 -0700
parents 3cb0318bb2dd
children 5910184f1f7b
comparison
equal deleted inserted replaced
22466:e1b68c0a9363 22467:333d654783ad
188 changes = [] 188 changes = []
189 seen = set() 189 seen = set()
190 entry = None 190 entry = None
191 subexists = False 191 subexists = False
192 subdeleted = False 192 subdeleted = False
193 for l in fh.read().split('\x00'): 193 difftree = fh.read().split('\x00')
194 lcount = len(difftree)
195 i = 0
196 while i < lcount:
197 l = difftree[i]
198 i += 1
194 if not entry: 199 if not entry:
195 if not l.startswith(':'): 200 if not l.startswith(':'):
196 continue 201 continue
197 entry = l 202 entry = l
198 continue 203 continue