コード例 #1
0
ファイル: git_pre_push.py プロジェクト: nehz/google-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)
コード例 #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)