> I have set up aosp mirror in gerrit server. After repo snyc, I can not
> repo upload to gerrit server correctly.
> Further details: I repo init via ssh:
> repo init -u gerrit2@git:mirrors/platform/manifest
> then repo sync
Why are you fetching as gerrit2?
> In .repo/manifest.xml I changed the review to be http://git:8080
> Finally After making changes - repo upload
> The problem is the project I am working on is frameworks/base and in
> repo upload it is uploading to platform/frameworks/base
Yes, this is expected. The name of that project (i.e. the relative
git path) is platform/frameworks/base, but the workspace path is
frameworks/base. The platform/ prefix is used for nearly all AOSP gits.
Why does the upload to platform/frameworks/base fail? It shouldn't.
What's the git structure on the server? It should coincide with the
structure used for fetching the data.
Any reason to fetch via SSH yet upload via HTTP?
> So I change the project name in .repo/manifest.xml to frameworks/base
> and now upload works but this of course breaks repo sync
Avoid making changes to the manifest if you can.
--
Magnus Bäck
ba...@google.com
In other words, I guess that you didn't use --mirror when you
downloaded the data from AOSP.
repo init -u https://android.googlesource.com/mirror/manifest --mirror
JBQ
> --
> To unsubscribe, email repo-discuss...@googlegroups.com
> More info at http://groups.google.com/group/repo-discuss?hl=en
--
Jean-Baptiste M. "JBQ" Queru
Software Engineer, Android Open-Source Project, Google.
Questions sent directly to me that have no reason for being private
will likely get ignored or forwarded to a public forum with no further
warning.
> Magnus and JBQ thank you for your replies.
> @ JBQ - This is mirror
>
> 1. *Why are you fetching as gerrit2?*
> I am fetching as gerrit because trying via repo init -u
> http://git/mirrors/platform/manifest results with messages:
> http://git/mirrors/platform/manifest/info/refs not found: did you run
> git update-server-info on the server?
What's listening on git:80, Gerrit or something else? You're pushing to
port 8080 which presumably is Gerrit, so you should probably be fetching
from the same port.
This particular error message indicates that you're running Git 1.6.5 or
older since it's trying the old HTTP protocol (on the other hand, with
such an old Git I'm surprised you were able to fetch the AOSP code). Or,
you do have a sufficiently new Git, but your server hasn't been enabled
to serve the smart HTTP protocol so the client falls back to the legacy
protocol. The smart protocol is explained in more detail below.
http://progit.org/2010/03/04/smart-http.html
But again, strive for a symmetric setup where you fetch and push against
the same service.
[...]
> 2. *Any reason to fetch via SSH yet upload via HTTP?*
> Well I hope I can solve the problem above soon. HTTP is the preferred
> fetch. Another important thing is in gerrit.config I set the
> basePath = /home/gerrit2/mirrors/platform/
> Is this the correct path?
Which path is the correct one depends on what's in these directories. If
the contents of /home/gerrit2/mirrors is
platform/frameworks/base
platform/packages/apps/Browser
device/samsung/crespo
...
then basePath should be /home/gerrit2/mirrors if you want the gits to be
accessible via e.g. http://git:8080/platform/frameworks/base.
> If I set it to basePath = /home/gerrit2/mirrors/ gerrit can not set
> the projects (internal error) in http://git:8080/ Admin->Projects
Well, what's in the server logs?
--
Magnus Bäck
ba...@google.com