equal
deleted
inserted
replaced
45 '''return an iterator of individual patches from a stream''' |
45 '''return an iterator of individual patches from a stream''' |
46 def isheader(line, inheader): |
46 def isheader(line, inheader): |
47 if inheader and line[0] in (' ', '\t'): |
47 if inheader and line[0] in (' ', '\t'): |
48 # continuation |
48 # continuation |
49 return True |
49 return True |
|
50 if line[0] in (' ', '-', '+'): |
|
51 # diff line - don't check for header pattern in there |
|
52 return False |
50 l = line.split(': ', 1) |
53 l = line.split(': ', 1) |
51 return len(l) == 2 and ' ' not in l[0] |
54 return len(l) == 2 and ' ' not in l[0] |
52 |
55 |
53 def chunk(lines): |
56 def chunk(lines): |
54 return cStringIO.StringIO(''.join(lines)) |
57 return cStringIO.StringIO(''.join(lines)) |