def Execute(self, opt, args):
    if not args:
      self.Usage()

    nb = args[0]
    if not git.check_ref_format('heads/%s' % nb):
      print("error: '%s' is not a valid name" % nb, file=sys.stderr)
      sys.exit(1)

    nb = args[0]
    err = []
    success = []
    all_projects = self.GetProjects(args[1:])

    pm = Progress('Abandon %s' % nb, len(all_projects))
    for project in all_projects:
      pm.update()

      status = project.AbandonBranch(nb)
      if status is not None:
        if status:
          success.append(project)
        else:
          err.append(project)
    pm.end()

    if err:
      for p in err:
        print("error: %s/: cannot abandon %s" % (p.relpath, nb),
              file=sys.stderr)
      sys.exit(1)
    elif not success:
      print(nb % 'error: no project has branch %s', file=sys.stderr)
      sys.exit(1)
    else:
      print('Abandoned in %d project(s):\n  %s'
            % (len(success), '\n  '.join(p.relpath for p in success)),
            file=sys.stderr)
dataset/ETHPy150Open esrlabs/git-repo/subcmds/abandon.py/Abandon.Execute/swapped operands of `%`