Beispiel #1
0
def main(argv):
  setup_color.init()
  if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
    print >> sys.stderr, (
        'This tool will not show all tracking information for git version '
        'earlier than ' +
        '.'.join(str(x) for x in MIN_UPSTREAM_TRACK_GIT_VERSION) +
        '. Please consider upgrading.')

  if '-h' in argv:
    print_desc()

  parser = argparse.ArgumentParser()
  parser.add_argument('-v', action='count',
                      help='Display branch hash and Rietveld URL')
  parser.add_argument('--no-color', action='store_true', dest='nocolor',
                      help='Turn off colors.')
  parser.add_argument(
      '-j', '--maxjobs', action='store', type=int,
      help='The number of jobs to use when retrieving review status')
  parser.add_argument('--show-subject', action='store_true',
                      dest='show_subject', help='Show the commit subject.')

  opts = parser.parse_args(argv)

  mapper = BranchMapper()
  mapper.verbosity = opts.v
  mapper.output.nocolor = opts.nocolor
  mapper.maxjobs = opts.maxjobs
  mapper.show_subject = opts.show_subject
  mapper.start()
  print mapper.output.as_formatted_string()
  return 0
Beispiel #2
0
def main(argv):
  setup_color.init()
  if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
    print >> sys.stderr, (
        'This tool will not show all tracking information for git version '
        'earlier than ' +
        '.'.join(str(x) for x in MIN_UPSTREAM_TRACK_GIT_VERSION) +
        '. Please consider upgrading.')

  parser = argparse.ArgumentParser(
      description='Print a a tree of all branches parented by their upstreams')
  parser.add_argument('-v', action='count',
                      help='Display branch hash and Rietveld URL')
  parser.add_argument('--no-color', action='store_true', dest='nocolor',
                      help='Turn off colors.')
  parser.add_argument(
      '-j', '--maxjobs', action='store', type=int,
      help='The number of jobs to use when retrieving review status')
  parser.add_argument('--show-subject', action='store_true',
                      dest='show_subject', help='Show the commit subject.')

  opts = parser.parse_args(argv)

  mapper = BranchMapper()
  mapper.verbosity = opts.v
  mapper.output.nocolor = opts.nocolor
  mapper.maxjobs = opts.maxjobs
  mapper.show_subject = opts.show_subject
  mapper.start()
  print mapper.output.as_formatted_string()
  return 0
Beispiel #3
0
def main(argv):
    colorama.init()
    if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
        print >> sys.stderr, (
            'This tool will not show all tracking information for git version '
            'earlier than ' +
            '.'.join(str(x) for x in MIN_UPSTREAM_TRACK_GIT_VERSION) +
            '. Please consider upgrading.')

    parser = argparse.ArgumentParser(
        description='Print a a tree of all branches parented by their upstreams'
    )
    parser.add_argument('-v',
                        action='count',
                        help='Display branch hash and Rietveld URL')
    parser.add_argument('--no-color',
                        action='store_true',
                        dest='nocolor',
                        help='Turn off colors.')

    opts = parser.parse_args(argv[1:])

    mapper = BranchMapper()
    mapper.verbosity = opts.v
    mapper.output.nocolor = opts.nocolor
    mapper.start()
    print mapper.output.as_formatted_string()
def main(argv):
  colorama.init()
  if get_git_version() < MIN_UPSTREAM_TRACK_GIT_VERSION:
    print >> sys.stderr, (
        'This tool will not show all tracking information for git version '
        'earlier than ' +
        '.'.join(str(x) for x in MIN_UPSTREAM_TRACK_GIT_VERSION) +
        '. Please consider upgrading.')

  parser = argparse.ArgumentParser(
      description='Print a a tree of all branches parented by their upstreams')
  parser.add_argument('-v', action='count',
                      help='Display branch hash and Rietveld URL')
  parser.add_argument('--no-color', action='store_true', dest='nocolor',
                      help='Turn off colors.')

  opts = parser.parse_args(argv[1:])

  mapper = BranchMapper()
  mapper.verbosity = opts.v
  mapper.output.nocolor = opts.nocolor
  mapper.start()
  print mapper.output.as_formatted_string()