예제 #1
0
def describe_commit(git_working_dir, hash_to_search, one_line=False):
    if one_line:
        return git_execute(
            git_working_dir,
            ['show', GIT_OPTION_NO_DIFF, GIT_OPTION_ONELINE, hash_to_search
             ]).strip()
    return git_execute(git_working_dir,
                       ['show', GIT_OPTION_NO_DIFF, hash_to_search]).strip()
예제 #2
0
def describe_commit(git_working_dir, hash_to_search, one_line=False):
  if one_line:
    return git_execute(git_working_dir, ['show',
                                         GIT_OPTION_NO_DIFF,
                                         GIT_OPTION_ONELINE,
                                         hash_to_search]).strip()
  return git_execute(git_working_dir, ['show',
                                       GIT_OPTION_NO_DIFF,
                                       hash_to_search]).strip()
예제 #3
0
def print_analysis(git_working_dir, hash_to_search):
  print '1.) Searching for "' + hash_to_search + '"'
  print '=====================ORIGINAL COMMIT START==================='
  print describe_commit(git_working_dir, hash_to_search)
  print '=====================ORIGINAL COMMIT END====================='
  print '2.) General information:'
  branches = get_branches_for_commit(git_working_dir, hash_to_search)
  print 'Is LKGR:         ' + str(is_lkgr(branches))
  print 'Is on Canary:    ' + str(get_first_canary(branches))
  print 'First V8 branch: ' + str(get_first_v8_version(branches)) + \
      ' (Might not be the rolled version)'
  print '3.) Found follow-up commits, reverts and ports:'
  followups = get_followup_commits(git_working_dir, hash_to_search)
  for followup in followups:
    print describe_commit(git_working_dir, followup, True)

  print '4.) Found merges:'
  merges = get_merge_commits(git_working_dir, hash_to_search)
  for currentMerge in merges:
    print describe_commit(git_working_dir, currentMerge, True)
    print '---Merged to:'
    mergeOutput = git_execute(git_working_dir, ['branch',
                                                '--contains',
                                                currentMerge,
                                                '-r']).strip()
    print mergeOutput
  print 'Finished successfully'
예제 #4
0
def get_branches_for_commit(git_working_dir, hash_to_search):
  branches = git_execute(git_working_dir, ['branch',
                                           '--contains',
                                           hash_to_search,
                                           '-a']).strip()
  branches = branches.splitlines()
  return map(str.strip, branches)
예제 #5
0
def print_analysis(git_working_dir, hash_to_search):
    print '1.) Searching for "' + hash_to_search + '"'
    print '=====================ORIGINAL COMMIT START==================='
    print describe_commit(git_working_dir, hash_to_search)
    print '=====================ORIGINAL COMMIT END====================='

    print '2.) General information:'
    print 'Is rolling: ' + str(is_rolling(git_working_dir, hash_to_search))
    print 'Is LKGR: ' + str(is_lkgr(git_working_dir, hash_to_search))
    print 'Is on Canary: ' + (str(
        get_first_canary(git_working_dir, hash_to_search)))
    print '3.) Found follow-up commits, reverts and ports:'
    followups = get_followup_commits(git_working_dir, hash_to_search)
    for followup in followups:
        print describe_commit(git_working_dir, followup, True)

    print '4.) Found merges:'
    merges = get_merge_commits(git_working_dir, hash_to_search)
    for currentMerge in merges:
        print describe_commit(git_working_dir, currentMerge, True)
        print '---Merged to:'
        mergeOutput = git_execute(
            git_working_dir,
            ['branch', '--contains', currentMerge, '-r']).strip()
        print mergeOutput
    print 'Finished successfully'
예제 #6
0
def print_analysis(git_working_dir, hash_to_search):
    print('1.) Searching for "' + hash_to_search + '"')
    print('=====================ORIGINAL COMMIT START===================')
    print(describe_commit(git_working_dir, hash_to_search))
    print('=====================ORIGINAL COMMIT END=====================')
    print('2.) General information:')
    branches = get_branches_for_commit(git_working_dir, hash_to_search)
    print('Is LKGR:         ' + str(is_lkgr(branches)))
    print('Is on Canary:    ' + str(get_first_canary(branches)))
    print('First V8 branch: ' + str(get_first_v8_version(branches)) + \
        ' (Might not be the rolled version)')
    print('3.) Found follow-up commits, reverts and ports:')
    followups = get_followup_commits(git_working_dir, hash_to_search)
    for followup in followups:
        print(describe_commit(git_working_dir, followup, True))

    print('4.) Found merges:')
    merges = get_merge_commits(git_working_dir, hash_to_search)
    for currentMerge in merges:
        print(describe_commit(git_working_dir, currentMerge, True))
        print('---Merged to:')
        mergeOutput = git_execute(
            git_working_dir,
            ['branch', '--contains', currentMerge, '-r']).strip()
        print(mergeOutput)
    print('Finished successfully')
예제 #7
0
def get_related_commits_not_on_master(git_working_dir, grep_command):
  commits = git_execute(git_working_dir, ['log',
                                          '--all',
                                          '--grep=' + grep_command,
                                          GIT_OPTION_ONELINE,
                                          '--decorate',
                                          '--not',
                                          'remotes/origin/master',
                                          GIT_OPTION_HASH_ONLY])
  return commits.splitlines()
예제 #8
0
def get_followup_commits(git_working_dir, hash_to_search):
  cmd = ['log', '--grep=' + hash_to_search, GIT_OPTION_HASH_ONLY,
         'remotes/origin/master'];
  return git_execute(git_working_dir, cmd).strip().splitlines()
예제 #9
0
def get_branches_for_commit(git_working_dir, hash_to_search):
    branches = git_execute(
        git_working_dir,
        ['branch', '--contains', hash_to_search, '-a']).strip()
    branches = branches.splitlines()
    return map(str.strip, branches)
예제 #10
0
def get_related_commits_not_on_master(git_working_dir, grep_command):
    commits = git_execute(git_working_dir, [
        'log', '--all', '--grep=' + grep_command, GIT_OPTION_ONELINE,
        '--decorate', '--not', 'master', GIT_OPTION_HASH_ONLY
    ])
    return commits.splitlines()
예제 #11
0
def get_followup_commits(git_working_dir, hash_to_search):
    return git_execute(
        git_working_dir,
        ['log', '--grep=' + hash_to_search, GIT_OPTION_HASH_ONLY, 'master'
         ]).strip().splitlines()
예제 #12
0
def get_followup_commits(git_working_dir, hash_to_search):
    cmd = [
        'log', '--grep=' + hash_to_search, GIT_OPTION_HASH_ONLY,
        'remotes/origin/master'
    ]
    return git_execute(git_working_dir, cmd).strip().splitlines()
예제 #13
0
파일: mergeinfo.py 프로젝트: 119120119/node
def get_followup_commits(git_working_dir, hash_to_search):
  return git_execute(git_working_dir, ['log',
                                       '--grep=' + hash_to_search,
                                       GIT_OPTION_HASH_ONLY,
                                       'master']).strip().splitlines()