예제 #1
0
def get_push_files():
    last_landed_commit = git.get_last_landed_commit()
    # Find out what files have changed since last landed commit
    #   * That are staged (--cached) -- this speeds up the check
    #   * Returning their names as a simple list (--name-only)
    #   * That are not deleted (--diff-filter=ACM)
    cmd = "git diff %s --cached --name-only --diff-filter=ACM" % last_landed_commit
    push_files = subprocess.check_output(cmd, shell=True).splitlines()

    # Remove files that will confuse analyze_diffs
    return filter(lambda f: not f.startswith(staging.TESTS_BASE_PATH), push_files)
예제 #2
0
파일: git_pre_push.py 프로젝트: zhangpf/arc
def get_push_files():
    last_landed_commit = git.get_last_landed_commit()
    # Find out what files have changed since last landed commit
    #   * That are staged (--cached) -- this speeds up the check
    #   * Returning their names as a simple list (--name-only)
    #   * That are not deleted (--diff-filter=ACM)
    cmd = ('git diff %s --cached --name-only --diff-filter=ACM' %
           last_landed_commit)
    push_files = subprocess.check_output(cmd, shell=True).splitlines()

    # Remove files that will confuse analyze_diffs
    return filter(lambda f: not f.startswith(staging.TESTS_BASE_PATH),
                  push_files)
예제 #3
0
def _get_current_arc_int_revision():
    return git.get_last_landed_commit(cwd=_ARC_INTERNAL_DIR)
예제 #4
0
def _validate_args(args):
  if not args.branch:
    args.branch = git.get_remote_branch(git.get_last_landed_commit())
예제 #5
0
파일: sync_arc_int.py 프로젝트: epowers/arc
def _get_current_arc_int_revision():
  return git.get_last_landed_commit(cwd=_ARC_INTERNAL_DIR)