'Repo manifest for different relative paths for git and review
Is there any way to configure repo if there are different relative path for fetch and review.
Example
Fetch managed by gitweb : ssh://gitweb.foo.com/data/bar/foo.git
Review managed by gerrit : https://gerrit.foo.com:8081/review/bar/foo
With below manifest entries, fetch / sync works fine but repo upload
fails as it looks up for https://gerrit.foo.com:8081/data/bar/foo.git
and not 'https://gerrit.foo.com:8081/review/bar/foo.git'
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="repo_name" fetch="ssh://gitweb.foo.com/" review="https://gerrit.foo.com:8081" />
<project path="code/foo" name="data/bar/foo" remote="repo_name" />
</manifest>
What would be the right way to point gerrit review with a path, in repo manifest file.
Solution 1:[1]
<project path="code/foo" name="data/bar/foo" remote="repo_name" />
For manifest file of repo, the path
attribute of project
element is used to specify the folder where the project will be clone to, i.e your worktree folder, the name
attribute will be appended to remote url for specifying the remote repository. It seems you mix the usage of path attribute and name atribute in project element.
You can refer manifest-format for more details of manifest file.
Solution 2:[2]
for my project, not same as yours, but maybe help you
make an example:
my manifests.xml:
review=http://192.168.100.100:8081
one of my project fetch url = http://192.168.100.100:8081/nathan/zhao/xxx/yyy/zzz
so when using repo upload :
repo upload xxx/yyy/zzz
will push to http://192.168.100.100:8081/xxx/yyy/zzz
and 2 methods to fix this
first one: not using any relate path to your project, for example when create your project , change nathan/zhao/xxx/yyy/zzz
to xxx/yyy/zzz
second one: using ssh path(this one is WORKING for my gerrit server):
review="ssh://192.168.100.100:29418/nathan/zhao"
and then using repo upload
full url will be ssh://192.168.100.100:29418/nathan/zhao/xxx/yyy/zzz
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
Solution | Source |
---|---|
Solution 1 | Eyal Gerber |
Solution 2 | Nathan_Zhao |