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)
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)
def _get_current_arc_int_revision(): return git.get_last_landed_commit(cwd=_ARC_INTERNAL_DIR)
def _validate_args(args): if not args.branch: args.branch = git.get_remote_branch(git.get_last_landed_commit())