newbie questions - aosp mirror as project in gerrit: How is it possible to save the uploaded changes to mirror before resync of the mirror

290 views
Skip to first unread message

Asi Mugrabi

unread,
Apr 30, 2012, 12:34:48 PM4/30/12
to repo-d...@googlegroups.com
Hi All,

I have a couple of basic questions.
We (My team and I) would like to be able to download aosp to our local machine, work on platform/frameworks, make,  upload our changes to review server side and be able to update aosp on the review server side without losing our changes.
I used gerrit.  As basePath I set an android mirror (repo init -u https://android.googlesource.com/mirror/manifest --mirror)
Now we can repo init from our server side and repo upload indeed uploads the changes.
But the problem is : repo sync on the server on aosp mirror deletes our merged changes. What is wrong here?
Are we working correctly?
Is there an accepted way to work on aosp using gerrit? i.e. can mirror be used to repo upload commits?

Thank you kindly

Shawn Pearce

unread,
Apr 30, 2012, 12:39:08 PM4/30/12
to Asi Mugrabi, repo-d...@googlegroups.com
Use a different branch. AOSP typically delivers updates to the master
branch, among many others. You'l need to make a unique branch name
like "myteam/master" that won't conflict with AOSP, and deliver your
changes there.

Or don't use the default mirror setup and instead configure the Git
config files in each repository to fetch AOSP to a different namespace
like "refs/heads/aosp/*".

Asi Mugrabi

unread,
Apr 30, 2012, 1:00:34 PM4/30/12
to Shawn Pearce, repo-d...@googlegroups.com
Oh, thank you for your response.
The thing is I am not able to start a new branch in mirror.
in base directory of mirror - repo start myteam/master platform/frameworks/base
leads me to fatal: 'start' requires a working directory
Do you know what to make of it?
(of course doing the parallel not in mirror is successful - for example at local machine)

Magnus Bäck

unread,
Apr 30, 2012, 1:09:20 PM4/30/12
to repo-d...@googlegroups.com
On Monday, April 30, 2012 at 13:00 EDT,
Asi Mugrabi <a...@nubosoftware.com> wrote:

> Oh, thank you for your response.
> The thing is I am not able to start a new branch in mirror.
> in base directory of mirror - repo start myteam/master
> platform/frameworks/base
> leads me to* fatal: 'start' requires a working directory*
> Do you know what to make of it?
> (of course doing the parallel not in mirror is successful - for example at
> local machine)

"repo start" is for creating topic branches in workspaces that have been
created with "repo init" and "repo sync". To create branches in the bare
gits found in your server you can either use "git branch" or create them
from elsewhere by using "git push". The latter is the typical case, as
it doesn't require server access. For example, to create a myteam/master
branch based on the master branch you can run this from a client workspace:

git push ssh://gerrithost/platform/frameworks/base \
origin/master:refs/heads/myteam/master'

(Obviously, replace gerrithost with whatever you need to log into Gerrit
on your server.)

When this has been done, update the manifest (again, don't change the
original master branch but create a new branch where you make your
changes) to point to myteam/master for the git in question. You can also
use a local manifest (.repo/local_manifest.xml) to modify the branch
attribute of one or more projects, but that quickly gets out of hand for
anything but very small teams that modify a very small set of gits.

--
Magnus Bäck
ba...@google.com
Reply all
Reply to author
Forward
0 new messages