| 96 | |
| 97 | |
| 98 | def loadNamesFromDiff(diffFilename): |
| 99 | with open(diffFilename, 'r') as f: |
| 100 | diffLines = [s.strip() for s in f.read().splitlines() if s.startswith('+\t')] |
| 101 | diffLines = [s for s in diffLines if not s.startswith('<int')] |
| 102 | namesInDiff = set() |
| 103 | for s in diffLines: |
| 104 | if s.startswith('<int') or s.startswith('<arr') or s.startswith('</'): |
| 105 | continue |
| 106 | p = s.find('>') |
| 107 | if p != -1: |
| 108 | p2 = s.find('<', p+1) |
| 109 | if p2 != -1: |
| 110 | name = s[p+1:p2] |
| 111 | try: |
| 112 | int(name) |
| 113 | except: |
| 114 | if not name.startswith('@'): |
| 115 | namesInDiff.add(s[p+1:p2]) |
| 116 | return namesInDiff |
| 117 | |
| 118 | |
| 119 | def loadGroups(filename): |