def _Push(self, opt, todo):
    have_errors = False
    for branch in todo:
      try:
        # Check if there are local changes that may have been forgotten
        changes = branch.project.UncommitedFiles()
        if changes:
          sys.stdout.write('Uncommitted changes in ' + branch.project.name)
          sys.stdout.write(' (did you forget to amend?):\n')
          sys.stdout.write('\n'.join(changes) + '\n')
          sys.stdout.write('Continue pushing? (y/N) ')
          a = sys.stdin.readline().strip().lower()
          if ('y', 'yes', 't', 'true', 'on') not in a:
            print("skipping push", file=sys.stderr)
            branch.uploaded = False
            branch.error = 'User aborted'
            continue

        destination = opt.dest_branch or branch.project.dest_branch

        # Make sure our local branch is not setup to track a different remote branch
        merge_branch = self._GetMergeBranch(branch.project)
        if destination:
          full_dest = 'refs/heads/%s' % destination
          if not opt.dest_branch and merge_branch and merge_branch != full_dest:
            print('merge branch %s does not match destination branch %s'
                  % (merge_branch, full_dest))
            print('skipping push.')
            print('Please use `--destination %s` if this is intentional'
                  % destination)
            branch.uploaded = False
            continue

        self.Push(branch, dest_branch=destination)
        branch.uploaded = True
      except UploadError as e:
        branch.error = e
        branch.uploaded = False
        have_errors = True

    print(file=sys.stderr)
    print('----------------------------------------------------------------------', file=sys.stderr)

    if have_errors:
      for branch in todo:
        if not branch.uploaded:
          if len(str(branch.error)) <= 30:
            fmt = ' (%s)'
          else:
            fmt = '\n       (%s)'
          print(('[FAILED] %-15s %-15s' + fmt) % (
                 branch.project.relpath + '/', \
                 branch.name, \
                 str(branch.error)),
                 file=sys.stderr)
      print()

    for branch in todo:
      if branch.uploaded:
        print('[OK    ] %-15s %s' % (
               branch.project.relpath + '/',
               branch.name),
               file=sys.stderr)

    if have_errors:
      sys.exit(1)
dataset/ETHPy150Open esrlabs/git-repo/subcmds/push.py/Push._Push/swapped operands of `not in`