cd aosp/mirror
repo init -u https://android.googlesource.com/mirror/manifest --mirror
repo syncLog in to gerrit.myserver.com and create all the branches and tags to gerrit
cd aosp/mirror
repo forall -c 'echo $REPO_PATH; ssh -p 29418 admin@localhost gerrit create-project --name aosp/$REPO_PATH --owner aosp --parent aosp;'
repo forall -c 'echo $REPO_PATH; git push ssh://admin@localhost:29418/aosp/$REPO_PATH +refs/heads/* +refs/tags/*;'cd aosp/mirror
repo init -u https://android.googlesource.com/mirror/manifest --mirror
repo syncLog in to gerrit.myserver.com and create all the branches and tags to gerrit
cd aosp/mirror
repo
forall -c 'echo $REPO_PATH; ssh -p 29418 admin@localhost gerrit
create-project --name aosp/$REPO_PATH --owner aosp --parent aosp;'
repo forall -c 'echo $REPO_PATH; git push ssh://admin@localhost:29418/aosp/$REPO_PATH +refs/heads/* +refs/tags/*;'cd aosp/mirror
repo forall -c 'echo $REPO_PATH; ssh -p 29418 admin@localhost gerrit create-branch aosp/$REPO_PATH develnamespace/android-7.0.0_r1 android-7.0.0_r1;'ssh://user...@gerrit.myserver.com:29418/aosp/platform/manifest HEAD:refs/for/refs/heads/develnamespace/android-7.0.0_r1Hi all,I am currently setting up all the infra needed for developers to contribute to an aosp-based project and would need your advice.Here is what I have done so far:
- Set-up a gerrit server (gerrit.myserver.com)
- Ssh to gerrit.myserver.com and create a local aosp mirror on the gerrit server
cd aosp/mirrorrepo init -u https://android.googlesource.com/mirror/manifest--mirrorrepo syncLog in to gerrit.myserver.com and create all the branches and tags to gerritcd aosp/mirror
repo forall -c 'echo $REPO_PATH; ssh -p 29418 admin@localhost gerrit create-project --name aosp/$REPO_PATH --owner aosp --parent aosp;'
repo forall -c 'echo $REPO_PATH; git push ssh://admin@localhost:29418/aosp/$REPO_PATH +refs/heads/* +refs/tags/*;'Now, I am a bit confused to what needs to be done from that point for developers.
Say they need to work on a branch off the tag android-7.0.0_r1.
Am I correct in thinking that I would first need to do the following for them:
- Log in to my developer machine and create that branch for them, under a different namespace, so that it doesn't mix with upstream stuff
cd my_empty_dir
repo init -u ssh://admin@localhost:29418/aosp/platform/manifest -b android-7.0.0_r1
(do I need to sync? was the previous command to be run on the local mirror instead? )
repo forall -c 'echo $REPO_PATH; ssh -p 29418 ad...@gerrit.myserver.com gerrit create-branch aosp/$REPO_PATH devel-android-7.0.0_r1 android-7.0.0_r1;'- Make a first commit to the aosp/platform/manifest to modify default.xml to have the fetch and review URL pointing to gerrit.myserver.com
- Ask a developer to check if they can run "repo init -u ssh://username@gerrit.myserver.com:29418/aosp/platform/manifest -b devel-android-7.0.0_r1"
Thought I would ask before doing anything stupid.
Still very confused with what needs to be done on the server (I am assuming only running repo sync on the local mirror to take new code) and what should be done on a developer machine (creating branches, committing code, etc...).
Hi again,
I have done a few experiments and found that the following procedure seems to work:
- Set-up a gerrit server (gerrit.myserver.com)
- Ssh to gerrit.myserver.com and create a local aosp mirror on the gerrit server
cd aosp/mirrorrepo init -u https://android.googlesource.com/mirror/manifest--mirrorrepo syncLog in to gerrit.myserver.com and create all the branches and tags to gerritcd aosp/mirror
repo forall -c 'echo $REPO_PATH; ssh -p 29418 admin@localhost gerrit create-project --name aosp/$REPO_PATH --owner aosp --parent aosp;'
repo forall -c 'echo $REPO_PATH; git push ssh://admin@localhost:29418/aosp/$REPO_PATH +refs/heads/* +refs/tags/*;'- Create the new development branch directly from the mirror code
cd aosp/mirrorrepo forall -c 'echo $REPO_PATH; ssh -p 29418admin@localhostgerrit create-branch aosp/$REPO_PATH develnamespace/android-7.0.0_r1 android-7.0.0_r1;'
- Log to a developer machine to change the manifest
cd my_empty_dir
- repo init -u ssh://username@gerrit.myserver.com:29418/aosp/platform/manifest -b develnamespace/android-7.0.0_r1
cd .repo/manifests/
vi default.xml
- fetch=".." />
+ fetch=".."
+ review="http://gerrit.myserver.com/" />
- <default revision="refs/heads/develnamespace/android-7.0.0_r1"
+ <default revision="refs/tags/android-7.0.0_r1"
- git add default.xml
git commit -s -m "Add review URL and branch name to the manifest"
- git push
ssh://username@gerrit.myserver.com:29418/aosp/platform/manifest HEAD:refs/for/refs/heads/develnamespace/android-7.0.0_r1
- Go to Gerrit web UI and merge the new change
From that point onward, I am guessing/hoping :-) that a developer will be able to develop using the Android workflow by doing something like
- repo init -u ssh://username@gerrit.myserver.com:29418/aosp/platform/manifest -b develnamespace/android-7.0.0_r1
- Ask a developer to check if they can run "repo init -u ssh://user...@gerrit.myserver.com:29418/aosp/platform/manifest -b devel-android-7.0.0_r1"
Thought I would ask before doing anything stupid.
Still very confused with what needs to be done on the server (I am assuming only running repo sync on the local mirror to take new code) and what should be done on a developer machine (creating branches, committing code, etc...).
Thanks a lot in advance for your help.Kind regards,David
--
--
To unsubscribe, email repo-discuss+unsubscribe@googlegroups.com
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi all,
Using a namespace for anything coming from upstream might not be a great idea after all...Looking at the ReviewUrl function in .repo/repo/git_config.py, it looks like it creates the url without my "aosp" namespace, which would explain why I am getting the following error:
I am having an issue when doing a repo upload.
: git push --receive-pack=gerrit receive-pack ssh://username@gerrit.myserver.com:29418/platform/system/sepolicy refs/heads/mynewfeature:refs/for/develnamespace/android-7.0.0_r1 1>| 2>|
fatal: Project not found: platform/system/sepolicy
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Not sure how to solve that issue so that it resolves the url as ssh://username@gerrit.myserver.com:29418/aosp/platform/system/sepolicy and not ssh://username@gerrit.myserver.com:29418/platform/system/sepolicy.
Thanks a lot.David
- Ask a developer to check if they can run "repo init -u ssh://username@gerrit.myserver.com:29418/aosp/platform/manifest -b devel-android-7.0.0_r1"
Thought I would ask before doing anything stupid.
Still very confused with what needs to be done on the server (I am assuming only running repo sync on the local mirror to take new code) and what should be done on a developer machine (creating branches, committing code, etc...).
Thanks a lot in advance for your help.Kind regards,David
More info at http://groups.google.com/group/repo-discuss?hl=en
---
You received this message because you are subscribed to the Google Groups "Repo and Gerrit Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to repo-discuss...@googlegroups.com.