code: def parse_udiff(diff, patterns=None, parent='.'):
      
      # For each file of the diff, the entry key is the filename,
      # and the value is a set of row numbers to consider.
      rv = {}
      path = nrows = None
      for line in diff.splitlines():
          if nrows:
              if line[:1] != '-':
                  nrows -= 1
              continue
          if line[:3] == '@@ ':
              hunk_match = HUNK_REGEX.match(line)
              (row, nrows) = [int(g or '1') for g in hunk_match.groups()]
              rv[path].update(range(row, row + nrows))
          elif line[:3] == '+++':
              path = line[4:].split('\t', 1)[0]
              if path[:2] == 'b/':
                  path = path[2:]
              rv[path] = set()
      return dict([(os.path.join(parent, path), rows)
                   for (path, rows) in rv.items()
                   if rows and filename_match(path, patterns)])
docs: Return a dictionary of matching lines.