How to get project list without cloning source code?

60 views
Skip to first unread message

Xy Sui

unread,
Jun 24, 2024, 5:39:12 AM (9 days ago) Jun 24
to Repo and Gerrit Discussion
Hi,

I know "repo forall -c 'echo "$REPO_PATH -- $REPO_PROJECT"' could list all projects, but just after one full "repo sync" is finished. I'm wondering if it's possible to get the same list without cloning any repository?  It should be possible since it's the matter of parsing manifest, but git-repo tool doesn't offer such option.

Any idea?

Thanks already.
BR,
oswicer

Yingchun Li

unread,
Jun 25, 2024, 10:50:28 PM (7 days ago) Jun 25
to Repo and Gerrit Discussion
On Monday, June 24, 2024 at 5:39:12 PM UTC+8 Xy Sui wrote:
Hi,

I know "repo forall -c 'echo "$REPO_PATH -- $REPO_PROJECT"' could list all projects, but just after one full "repo sync" is finished. I'm wondering if it's possible to get the same list without cloning any repository?  It should be possible since it's the matter of parsing manifest, but git-repo tool doesn't offer such option.
ssh -p 19418 your_gerrit_server gerrit list-projects
this will list all projects,maybe the output is more than your manifests, (manifest depends on branch).  and you need sed the output, 

Xy Sui

unread,
Jun 30, 2024, 11:49:38 PM (2 days ago) Jun 30
to Repo and Gerrit Discussion
The problem is we're not using gerrit as server, but gitolite.  I may have to check the source code of "git-repo" to see how the tool iterate all projects defined in manifest. Thanks anyway.
Reply all
Reply to author
Forward
0 new messages