review url and relative URLs/project prefix

41 views
Skip to first unread message

Arne-Christian Blystad

unread,
Sep 9, 2016, 11:06:05 AM9/9/16
to Repo and Gerrit Discussion
Hello,

This week I setup gerrit for our projects, and migrated our current configuration over. This has mostly worked fine, we're able to pull and push, as well as review changes when pushed directoy to refs/for/branch. However, the repo upload command doesn't work well.

We have one android based project, and another project ("infrastructure") that both uses gerrit and repo. A long time ago it was decided to checkout the android manifest to gitserver/android and to place the infrastructure project gitserver/infrastructure. This means that the full path to the Android manifest is android/platform/manifest.git and the infrastructure is infrastructure/manifest.git.

When cloning, we use relative URLs, and as such the <remote> tag for the Android project has fetch=".." and for the infrastructure project fetch=".". With this, repo sync, git pull, git push and all of the simple commands works well. For example, the project android/platform/build is properly checked out. However, if we try to repo upload, the repo command doesn't use the existing remote.url but rather uses something based on the projectname, ignoring relative URLs. This causes repo upload to try to upload to gerrit/platform/build instead of gerrit/android/platform/build

Is there a configuration option to either add a prefix to the URL (android/) or a way to make the review URL respect relative URLs? I would prefer to avoid modifying the manifest and changing every name="" attribute.

Best regards,
Arne-Christian Blystad

Arne-Christian Blystad

unread,
Sep 9, 2016, 12:11:18 PM9/9/16
to Repo and Gerrit Discussion
I played a bit around, and created the following code review:


I see that also this is related/an alternative:

https://gerrit-review.googlesource.com/#/c/76662/3

Would be nice to get either one of the alternatives included. I also found a earlier discussion post on this topic. So seems it's something multiple people could use.

Regards,
Arne-Christian
Reply all
Reply to author
Forward
0 new messages