コード例 #1
0
def _get_file_list_from_git():
    upstream_commit = get_upstream_commit()
    out = check_output(["git", "diff", "--name-only",
                        upstream_commit]).splitlines()
    return [
        l.decode('utf-8') for l in out
        if _RE_SOURCE_FILE.search(l.decode('utf-8'))
    ]
コード例 #2
0
def check_no_local_commits():
  """
  Check that there are no local commits which haven't been pushed to the upstream
  repo via Jenkins.
  """
  upstream_commit = get_upstream_commit()
  cur_commit = check_output(["git", "rev-parse", "HEAD"]).strip().decode('utf-8')

  if upstream_commit == cur_commit:
    return
  print("The repository appears to have local commits:")
  subprocess.check_call(["git", "log", "--oneline", "%s..HEAD" % upstream_commit])

  print(Colors.RED + "This should not be an official release!" + Colors.RESET)
  if not confirm_prompt("Continue?"):
    sys.exit(1)
コード例 #3
0
ファイル: iwyu.py プロジェクト: andrwng/kudu
def _get_file_list_from_git():
  upstream_commit = get_upstream_commit()
  out = check_output(["git", "diff", "--name-only", upstream_commit]).splitlines()
  return [l for l in out if _RE_SOURCE_FILE.search(l)]