def run(searchstring):
    branches_ = find(searchstring)
    if branches_:
        merged = get_merged_branches()
        print "Found existing branches..."
        print_list(branches_, merged)
        if len(branches_) == 1:
            branch_name = branches_[0]['name']
            if 50 > len(branch_name):
                branch_name = branch_name[:47] + '...'
            check_it_out = raw_input(
                "Check out '%s'? [Y/n] " % branch_name
            )
            if check_it_out.lower().strip() != 'n':
                checkout(branches_[0]['name'])
    elif searchstring:
        print "Found no branches matching: %s" % searchstring
    else:
        print "Found no branches"
dataset/ETHPy150Open peterbe/bgg/bgg/lib/branches.py/run/swapped operands of `>`