Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android repo tool `repo update` without Gerrit

Tags:

git

gitlab

repo

We are using the Android repo tool for our own non-Android software. We are using GitLab, not Gerrit for code review. With GitLab, I only need to do an ordinary push of the topic branch, as if I had done git push in each repository of my workspace.

How do I make repo upload do an ordinary git push on multiple repositories? You might say that I need the nonexistent repo push command.

I tried to realize this using various values for the <remote review /> attribute in the manifest file, such as:

<?xml version="1.0" encoding="UTF-8"?>
<manifest>

  <remote  name="wfe"
           alias="origin"
           review="origin"
           fetch=".." />
  <remote  name="wcore"
           alias="origin"
           review="ssh://git@gitlabserver:sw/wcore"
           fetch=".." />
  <default revision="master"
           remote="wfe"
           sync-j="4" />

  <project path="wcore" name="wcore" remote="wcore" groups="sdk" />
  <project path="wfe" name="wfe" groups="sdk" />

</manifest>

However, I get errors like:

repo upload

----------------------------------------------------------------------
[FAILED] wcore/          repo-test      
       (ssh://git@gitlabserver:sw/wcore: <urlopen error [Errno 110] Connection timed out>)
[FAILED] wfe/            repo-test      
       (origin: <urlopen error [Errno -2] Name or service not known>)
like image 841
John McGehee Avatar asked Oct 18 '22 06:10

John McGehee


1 Answers

I enhanced the Android repo tool with a repo push command that does exactly this. Also, it performs the pushes in the order declared in the manifest file.

We have been successfully using it in production for quite a while now.

like image 101
John McGehee Avatar answered Oct 21 '22 05:10

John McGehee