cann't repo upload

284 views
Skip to first unread message

john

unread,
May 10, 2012, 3:33:25 AM5/10/12
to Repo and Gerrit Discussion
HI
I can use repo init ,repo sync,repo upload to work,but now I have a
problem with the path.
there are two differerent groups and echo should have the whole
projects of android, so I would make the android projects different .
I change the path of projects for second group as /group2/
platform/.... for each project.but now I can not repo upload . the
details as follow.

the path of manifest

group2/platform/manifest.git

xml

1 <?xml version="1.0" encoding="UTF-8"?>
2 <manifest>
3 <remote name="korg"
4 fetch=".."
5 review="http://192.168.22.221/" />
6 <default revision="refs/heads/mov"
7 remote="korg" />
8
9 <project path="external/ppp" name="platform/external/ppp" />
10 <project path="external/proguard" name="platform/external/
proguard" />
11 <project path="external/qemu" name="platform/external/qemu" />
12 <project path="external/quake" name="platform/external/quake" />
.............


$ repo init -u ssh://jo...@192.168.22.221:29418/group2/platfrom/manifest.git
-b mov
$ repo sync

yes,they all work fine

but when I change somefile and do repo upload ,there will be error

$ repo upload
..........
remote: Resolving deltas: 100% (2/2)
To ssh://jo...@192.168.22.221:29418/platform/external/quake
! [remote rejected] mov -> refs/for/mov (branch mov not found)
error: failed to push some refs to 'ssh://jo...@192.168.22.221:29418/
platform/external/quake'


----------------------------------------------------------------------
[FAILED] external/quake/ mov (Upload failed)

I also use
$ repo --trace upload

I find that the path is error ,it miss the path of group2,the true
path should be
ssh://jo...@192.168.22.221:29418/group2/platform/external/quake

if i change the xml as

<project path="external/proguard" name="group2/platform/external/
proguard" />

repo sync will be error!!! the path will be wrong and cann't fetch
the project.


how should i do with the path ? change the xml or I cann't set the
path as what i do ?


thanks for your help !












Magnus Bäck

unread,
Dec 28, 2012, 5:36:54 PM12/28/12
to repo-d...@googlegroups.com
On Friday, December 28, 2012 at 17:02 EST,
pragya rana <pragya...@gmail.com> wrote:

> I am in a similar situation and am not able to use repo upload due to
> path issue. Any help would be appreciated.
>
> My manifest:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <manifest>
> <remote fetch="ssh://<user>@<git-url>/remote1/git/" name="remote1"
> review="<codereview-url>"/>
> <default sync-j="4"/>
> <project path="tools/extras" remote="remote1" name="extras"
> revision="refs/heads/master" />
> ...
>
> When I try 'repo upload', it tries to use this path :
> <codereview-url>/extras
> But my codereview url to that project is : <codereview-url>/remote1/extras
>
> If i modify the project name like this,repo upload works.
> <project path="tools/extras" remote="remote1" name="remote1/extras"
> revision="refs/heads/master" />
> But repo sync fails because the path for repo sync is messed up now (it
> tries to sync ssh://<user>@<git-url>/remote1/git/remote1-extras)

Can't you configure your server to have symmetrical fetch and review
URLs? That would make life easier for everyone, including humans who
occasionally type URLs by hand. If a directory reorganization is
difficult, perhaps a symlink in the right place would do?

You could use Git's insteadOf and/or pushInsteadOf feature, e.g. put

[url "ssh://<user>@<git-url>/remote1/git/extras"]
insteadOf = ssh://<user>@<git-url>/remote1/git/remote1-extras

in ~/.gitconfig.

[...]

--
Magnus Bäck
ba...@google.com

pragya rana

unread,
Dec 28, 2012, 7:49:33 PM12/28/12
to repo-d...@googlegroups.com
Thanks Magnus for your response :)

I am not sure if it's feasible to change the directory structure but I will definitely propose it to the team.

We are in the process of moving to repo and get rid of git submodules finally :).  I was trying to do repo upload so later we could instruct the developers to use the same. Your solution of using insteadOf feature in .gitconfig would require everyone to update their .gitconfig file right ? And we have 50+ git repositories with similar url structure so I am not sure if it's convenient adding it for all the projects :/. For now, i guess people will have to continue using git review commands to upload to gerrit.

Pragya

esko barba

unread,
Jul 17, 2014, 1:43:18 PM7/17/14
to repo-d...@googlegroups.com
It's been quite a while since this post has been touched but i'm experiencing the exact same problems as the previous posters, so if anyone has come to a good solution to this other than the ones proposed i would be very grateful to hear about it.

BR

MM
Reply all
Reply to author
Forward
0 new messages