Exemple #1
0
def get_manifest_repo():
    """
  Return a GitRepo object pointing to the repository that contains
  the crepo manifest.
  """
    # root dir is cwd for now
    cdup = GitRepo(".").command_process(["rev-parse", "--show-cdup"],
                                        capture_stdout=True,
                                        capture_stderr=True)
    if cdup.Wait() != 0:
        return None
    cdup_path = cdup.stdout.strip()
    if cdup_path:
        return GitRepo(cdup_path)
    else:
        return GitRepo(".")