def UploadCL(change_info, args):
  if not change_info.FileList():
    print "Nothing to upload, changelist is empty."
    return

  if not "--no_presubmit" in args:
    if not DoPresubmitChecks(change_info, committing=False):
      return
  else:
    args.remove("--no_presubmit")

  no_try = "--no_try" in args
  if no_try:
    args.remove("--no_try")
  else:
    # Support --no-try as --no_try
    no_try = "--no-try" in args
    if no_try:
      args.remove("--no-try")

  # Map --send-mail to --send_mail
  if args in "--send-mail":
    args.remove("--send-mail")
    args.append("--send_mail")

  # TODO(pamg): Do something when tests are missing. The plan is to upload a
  # message to Rietveld and have it shown in the UI attached to this patch.

  upload_arg = ["upload.py", "-y"]
  upload_arg.append("--server=" + GetCodeReviewSetting("CODE_REVIEW_SERVER"))
  upload_arg.extend(args)

  desc_file = ""
  if change_info.issue:  # Uploading a new patchset.
    found_message = False
    for arg in args:
      if arg.startswith("--message") or arg.startswith("-m"):
        found_message = True
        break

    if not found_message:
      upload_arg.append("--message=''")

    upload_arg.append("--issue=" + change_info.issue)
  else: # First time we upload.
    handle, desc_file = tempfile.mkstemp(text=True)
    os.write(handle, change_info.description)
    os.close(handle)

    upload_arg.append("--cc=" + GetCodeReviewSetting("CC_LIST"))
    upload_arg.append("--description_file=" + desc_file + "")
    if change_info.description:
      subject = change_info.description[:77]
      if subject.find("\r\n") != -1:
        subject = subject[:subject.find("\r\n")]
      if subject.find("\n") != -1:
        subject = subject[:subject.find("\n")]
      if len(change_info.description) > 77:
        subject = subject + "..."
      upload_arg.append("--message=" + subject)

  # Change the current working directory before calling upload.py so that it
  # shows the correct base.
  previous_cwd = os.getcwd()
  os.chdir(GetRepositoryRoot())

  # If we have a lot of files with long paths, then we won't be able to fit
  # the command to "svn diff".  Instead, we generate the diff manually for
  # each file and concatenate them before passing it to upload.py.
  if change_info.patch is None:
    change_info.patch = GenerateDiff(change_info.FileList())
  issue, patchset = upload.RealMain(upload_arg, change_info.patch)
  if issue and issue != change_info.issue:
    change_info.issue = issue
    change_info.Save()

  if desc_file:
    os.remove(desc_file)

  # Do background work on Rietveld to lint the file so that the results are
  # ready when the issue is viewed.
  SendToRietveld("/lint/issue%s_%s" % (issue, patchset), timeout=0.5)

  # Once uploaded to Rietveld, send it to the try server.
  if not no_try and GetCodeReviewSetting('TRY_ON_UPLOAD').lower() == 'true':
    # Use the local diff.
    TryChange(change_info, [], True)

  os.chdir(previous_cwd)
dataset/ETHPy150Open CollabQ/CollabQ/bin/gcl.py/UploadCL/swapped operands of `in`