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