예제 #1
0
파일: test.py 프로젝트: mrajashree/wolf
    if skip_class_list:
        print skip_class_list

    if args.repoPath:
        repo_path = args.repoPath
        rh = RepoHandler(temp_dir_path=repo_path)

    elif args.url:
        repo_url = args.url
        rh = RepoHandler(repo_url=repo_url)
        print "***********************************************"
        print "\033[92mCloning repo...\033[37m"
        rh.clone_repo()
        print "\033[92mDone.\033[37m"
        print "Repo cloned in folder:" + rh.get_path()
        print "***********************************************\n"

    if not args.noPrompts:
        raw_input()

    num_commits = args.numCommits

    print "***********************************************"
    print "\033[92mRetrieving the list of modified files..\033[37m"
    print "Number of commits being analyzed:" + str(num_commits)

    file_name_list = []
    valid_file_desc = []

    if args.subfolder:
예제 #2
0
파일: test.py 프로젝트: mrajashree/wolf
for arg in cmd_args:
    param = arg.split('=')
    if param[0] == 'skipClassList':
        if os.path.exists(param[1]):
            with open(param[1], 'r') as listFile:
                data = listFile.read()
            skip_class_list = data.split('\n')
        else:
            print 'path does not exist'

# rh = RepoHandler(repo_url='https://github.com/rometools/rome.git')
# print "Cloning repo..."
# rh.clone_repo()
# print "Done."
rh = RepoHandler(temp_dir_path='/home/rohan/courses/wolf/rome')
print "Repo cloned in folder:" + rh.get_path()

print "Retrieving the list of modified files.."

file_name_list = []
valid_file_desc = []

# Get the list of all the recently modified java files which are not tests
repo_path = '/'.join([rh.get_path(), 'rome'])

for file_desc in rh.get_modified_files(prev_commits=10):

    if repo_path in file_desc.path:
        if (file_desc.ext == ".java"):
            if '/test' not in file_desc.path:
                print 'Adding ' + file_desc.path
예제 #3
0
    if skip_class_list:
        print skip_class_list

    if args.repoPath:
        repo_path = args.repoPath
        rh = RepoHandler(temp_dir_path=repo_path)

    elif args.url:
        repo_url = args.url
        rh = RepoHandler(repo_url=repo_url)
        print "***********************************************"
        print "\033[92mCloning repo...\033[37m"
        rh.clone_repo()
        print "\033[92mDone.\033[37m"
        print "Repo cloned in folder:" + rh.get_path()
        print "***********************************************\n"

    if not args.noPrompts:
        raw_input()

    num_commits = args.numCommits

    print "***********************************************"
    print "\033[92mRetrieving the list of modified files..\033[37m"
    print "Number of commits being analyzed:" + str(num_commits)

    file_name_list = []
    valid_file_desc = []

    if args.subfolder:
예제 #4
0
for arg in cmd_args:
    param = arg.split('=')
    if param[0] == 'skipClassList':
        if os.path.exists(param[1]):
            with open(param[1], 'r') as listFile:
                data = listFile.read()
            skip_class_list = data.split('\n')
        else:
            print 'path does not exist'

# rh = RepoHandler(repo_url='https://github.com/rometools/rome.git')
# print "Cloning repo..."
# rh.clone_repo()
# print "Done."
rh = RepoHandler(temp_dir_path='/home/rohan/courses/wolf/rome')
print "Repo cloned in folder:" + rh.get_path()

print "Retrieving the list of modified files.."

file_name_list = []
valid_file_desc = []

# Get the list of all the recently modified java files which are not tests
repo_path = '/'.join([rh.get_path(), 'rome'])

for file_desc in rh.get_modified_files(prev_commits=10):

    if repo_path in file_desc.path:
        if (file_desc.ext == ".java"):
            if '/test' not in file_desc.path:
                print 'Adding ' + file_desc.path