code: def _parse_lines(self, diff_lines):
          
  
          added_lines = []
          deleted_lines = []
  
          current_line_new = None
          current_line_old = None
  
          for line in diff_lines:
  
              # If this is the start of the hunk definition, retrieve
              # the starting line number
              if line.startswith('@@'):
                  line_num = self._parse_hunk_line(line)
                  current_line_new, current_line_old = line_num, line_num
  
              # This is an added/modified line, so store the line number
              elif line.startswith('+'):
  
                  # Since we parse for source file sections before
                  # calling this method, we're guaranteed to have a source
                  # file specified.  We check anyway just to be safe.
                  if current_line_new is not None:
  
                      # Store the added line
                      added_lines.append(current_line_new)
  
                      # Increment the line number in the file
                      current_line_new += 1
  
              # This is a deleted line that does not exist in the final
              # version, so skip it
              elif line.startswith('-'):
  
                  # Since we parse for source file sections before
                  # calling this method, we're guaranteed to have a source
                  # file specified.  We check anyway just to be safe.
                  if current_line_old is not None:
  
                      # Store the deleted line
                      deleted_lines.append(current_line_old)
  
                      # Increment the line number in the file
                      current_line_old += 1
  
              # This is a line in the final version that was not modified.
              # Increment the line number, but do not store this as a changed
              # line.
              else:
                  if current_line_old is not None:
                      current_line_old += 1
  
                  if current_line_new is not None:
                      current_line_new += 1
  
                  # If we are not in a hunk, then ignore the line
                  else:
                      pass
  
          return added_lines, deleted_lines
docs: Given the diff lines output from `git diff` for a particular
          source file, return a tuple of `(ADDED_LINES, DELETED_LINES)`
  
          where `ADDED_LINES` and `DELETED_LINES` are lists of line
          numbers added/deleted respectively.
  
          Raises a `GitDiffError` if the diff lines are in an invalid format.