Lines Matching refs:Hunk
145 print("Next hunk %d:" % i)
148 class Hunk:
149 """Class to represent a single hunk of changes."""
161 """Does hunk describe addition of file?"""
170 """Does hunk describe removal of file?"""
200 def find_changed_funs(hunk):
201 """Find all functions touched by hunk. We don't try too hard
209 if (cache.match(r'^\*\*\*\*\*\** ([a-zA-Z0-9_].*)', hunk.hdr)
210 or cache.match(r'^@@ .* @@ ([a-zA-Z0-9_].*)', hunk.hdr)):
213 for i, line in enumerate(hunk.lines):
216 if hunk.ctx_diff:
219 # Remember most recent identifier in hunk
315 hunk = None
320 # Create new hunk when we see hunk header
322 if hunk is not None:
323 d.hunks.append(hunk)
324 hunk = Hunk(line)
335 if hunk is not None:
336 hunk.lines.append(line)
339 d.hunks.append(hunk)
413 for hunk in d.hunks:
414 for fn in find_changed_funs(hunk):