def parse_changes_list(changes_string):
  """Parse a string containing a list of revision numbers in the form
     of the '--change' command-line argument (e.g. '1,3,-5,7-10').
     Return a list of elements of the form [[1], [3], [-5], [7,10]].
  """
  rev_ranges = []
  for rr in changes_string.split(','):
    if '-' in rr[1:]:
      revs = rr.split('-')
      rev_ranges.append([int(revs[0]), int(revs[1])])
    else:
      rev_ranges.append([int(rr)])
  return rev_ranges