Problems getting repo sync to work

2,861 views
Skip to first unread message

Anthony Wong

unread,
Feb 26, 2013, 4:43:16 PM2/26/13
to repo-d...@googlegroups.com
Hi all--
 
I was trying to generate a workspace and it doesn't seem that my "repo sync" works properly.
 
I expected that I only needed to do:
$ mkdir my_workspace
$ cd my_workspace
$ repo init -u ssh://myserver.com:29418/manifest.git -b branch_name
$ repo sync
 and I would have an Android workspace.
 
But instead, I ended having to do the following:
$ mkdir my_workspace
$ cd my_workspace
$ repo init -u ssh://myserver.com:29418/manifest.git -b branch_name
### created .repo
$ repo sync
 
### this just created the repos in .repo/projects, did not create the workspace
 
$ cd .repo/projects
$ find . -type d -name ‘*.git’ | sed -e ‘s%\./%%’ -e ‘s/.git$//’ > ../../projects.txt
$ cd ../..
$ cat projects.txt | while read project ; do repo sync $project ; done
 
### workspace is populated
Does anyone know what I'm doing wrong?
 
--Thanks,
Anthony

Magnus Bäck

unread,
Feb 27, 2013, 9:38:24 AM2/27/13
to repo-d...@googlegroups.com
On Tuesday, February 26, 2013 at 16:43 EST,
Anthony Wong <won...@gmail.com> wrote:

> I was trying to generate a workspace and it doesn't seem that my "repo
> sync" works properly.
>
> I expected that I only needed to do:
>
> $ mkdir my_workspace
> $ cd my_workspace
> $ repo init -u ssh://myserver.com:29418/manifest.git -b branch_name
> $ repo sync
>
> and I would have an Android workspace.

Yes, that should work just fine.

> But instead, I ended having to do the following:
>
> $ mkdir my_workspace
> $ cd my_workspace
> $ repo init -u ssh://myserver.com:29418/manifest.git -b branch_name
>
> ### created .repo
>
> $ repo sync
>
> ### this just created the repos in .repo/projects, did not create the
> workspace

Weird. What happens if you run "repo sync -l"?

[...]

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

Anthony Wong

unread,
Feb 27, 2013, 12:45:06 PM2/27/13
to repo-d...@googlegroups.com
Hi Magnus--
 
Thanks for your suggestion.  Do you mean this sequence?
 
repo init
repo sync
repo sync -l
 
--Thanks,
Anthony

Magnus Bäck

unread,
Feb 27, 2013, 1:45:20 PM2/27/13
to repo-d...@googlegroups.com
On Wednesday, February 27, 2013 at 12:45 EST,
Anthony Wong <won...@gmail.com> wrote:

> Thanks for your suggestion. Do you mean this sequence?
>
> repo init
> repo sync
> repo sync -l

Yes. I'm interested in whether the latter command also doesn't
do anything. Actually, you can run "repo --trace sync -l" to get
additional debug output (not sure how useful it'll be, but it
won't hurt).

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

Anthony Wong

unread,
Feb 27, 2013, 7:53:34 PM2/27/13
to repo-d...@googlegroups.com

Hi Magnus--

I started looking at error_log and sshd_log and I noticed that there was a problem.
 
The problem is that my repo sync doesn't finish because of a git-upload-pack failure in my gerrit server (not properly configured for the large repositories that I have).  When I fixed my gerrit.config, the problem goes away.
 
Also, repo sync -l does sync the repos that made it into my .repo/projects.
 
--Thanks, 
Anthony 
 
 

Magnus Bäck

unread,
Feb 28, 2013, 9:48:06 AM2/28/13
to repo-d...@googlegroups.com
On Wednesday, February 27, 2013 at 19:53 EST,
Anthony Wong <won...@gmail.com> wrote:

> I started looking at error_log and sshd_log and I noticed that
> there was a problem.
>
> The problem is that my repo sync doesn't finish because of a
> git-upload-pack failure in my gerrit server (not properly
> configured for the large repositories that I have). When I
> fixed my gerrit.config, the problem goes away.

Didn't Repo report this problem and abort the sync?

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

Anthony Wong

unread,
Mar 1, 2013, 3:07:55 PM3/1/13
to repo-d...@googlegroups.com

Hi Magnus--

When gerrit stopped serving the git-upload-pack, the repo sync command just stalled and I didn't notice, and just reflexively hit ctrl-C.  The files don't get copied to the workspace until all repos are copied from the remote.  I don't use repo often, so I didn't realize that the lack of workspace files meant that the repo copy didn't complete.
 
--Best regards,
Anthony 
 
 
 
Reply all
Reply to author
Forward
0 new messages