Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

repo should provide a mean to retrieve root directory #198

Open
GoogleCodeExporter opened this issue Jul 3, 2015 · 0 comments
Open

repo should provide a mean to retrieve root directory #198

GoogleCodeExporter opened this issue Jul 3, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

repo lack a mechanism to retrieve the root directory of the projects.
git have such mean with git rev-parse --show-toplevel.

For some automated tools, it's useful to easily find such root directory.

repo should also have a command to retrieve the absolute path to .repo 
directory, like git with git rev-parse --git-dir.

For completeness, a command to report the path to the manifest work tree could 
be useful.

The proposed patch adds a repo directory command with following options

 -t for toplevel project directory.
 -r for .repo directory (<toplevel>/.repo).
 -m for manifests directory (<toplevel>/.repo/manifests).

An additional patch also add environment variables in repo forall so that the 
command executed by repo forall can benefit from such paths at no cost (without 
having to call repo directory):

 $REPO_TOPDIR for the absolute path to the project top directory.
 $REPO_REPO for the absolute path to the .repo directory.
 $REPO_MANIFESTS for the absolute path to the .repo/manifests directory.


Original issue reported on code.google.com by [email protected] on 29 May 2015 at 7:49

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant