<commit_before>#!/usr/bin/env python2.7

# Script to migrate a Gerrit Change from memcached or ep-engine repos
# to the new kv_enigne repo.

from __future__ import print_function
import json
import subprocess
import sys
import urllib2


class bcolors:
    HEADER = '\033[35m'
    OKBLUE = '\033[34m'
    OKGREEN = '\033[32m'
    WARNING = '\033[33m'
    FAIL = '\033[31m'
    ENDC = '\033[0m'
    BOLD = '\033[1m'
    UNDERLINE = '\033[4m'


def header(*args):
    print(bcolors.OKBLUE, end='')
    print(*args, end='')
    print(bcolors.ENDC)


def success(*args):
    print(bcolors.OKGREEN, end='')
    print(*args, end='')
    print(bcolors.ENDC)


if len(sys.argv) != 3:
    print("""Migrates existing Gerrit changes from
memcached/ep-engine repo to kv_engine repo.
Checks out the specifed change, rebases to kv_engine and re-uploads to
gerrit as a kv_engine change.

Usage: gerrit_move_to_kv_engine.py <username> <change> <patch_set>

    username   Username for Gerrit - see
               http://review.couchbase.org/#/settings/ under 'Profile'
    change     Change number

Example: gerrit_move_to_kv_engine.py drigby memcached 78322 3
    """, file=sys.stderr)
    exit(1)

user = sys.argv[1]<commit_msg>MB-22602: gerrit_move_to_kv_engine.py: fix usage message<commit_after>#!/usr/bin/env python2.7

# Script to migrate a Gerrit Change from memcached or ep-engine repos
# to the new kv_enigne repo.

from __future__ import print_function
import json
import subprocess
import sys
import urllib2


class bcolors:
    HEADER = '\033[35m'
    OKBLUE = '\033[34m'
    OKGREEN = '\033[32m'
    WARNING = '\033[33m'
    FAIL = '\033[31m'
    ENDC = '\033[0m'
    BOLD = '\033[1m'
    UNDERLINE = '\033[4m'


def header(*args):
    print(bcolors.OKBLUE, end='')
    print(*args, end='')
    print(bcolors.ENDC)


def success(*args):
    print(bcolors.OKGREEN, end='')
    print(*args, end='')
    print(bcolors.ENDC)


if len(sys.argv) != 3:
    print("""Migrates existing Gerrit changes from
memcached/ep-engine repo to kv_engine repo.
Checks out the specifed change, rebases to kv_engine and re-uploads to
gerrit as a kv_engine change.

Usage: gerrit_move_to_kv_engine.py <username> <change>

    username   Username for Gerrit - see
               http://review.couchbase.org/#/settings/ under 'Profile'
    change     Change number

Example: gerrit_move_to_kv_engine.py drigby 78322
    """, file=sys.stderr)
    exit(1)

user = sys.argv[1]
{'fraction_non_alphanumeric': 0.12106339468302658, 'fraction_numerical': 0.04171779141104295, 'mean_word_length': 3.3835125448028673, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5918910', 'n_tokens_mistral': 969, 'n_tokens_neox': 871, 'n_words': 234}