Reputation:

Can a SVN repository include/link-to an external git repository?

I have a svn repository, R, that depends on a library, l, in another repository.

The goal is that when someone checks out R, they also check out l. We want l to still be in its own repository so that l can be updated without dependence on R.

I don't know much about external svn links, but I believe that when depending on a svn-based library one can link to it externally, 'ext'.

If l is in a git repository, can I do something similar? I'd like to preserve the goal stated above.

Upvotes: 6

Views: 2881

Answers (2)

Avi
Avi

Reputation: 20152

svn:externals is the way svn can be made to check out sources from more than one repository into one working copy. But it is only meant for dealing with svn repositories - it doesn't know how to check out a git repository.

You might be able to do it the other way 'round, by including an svn repository inside a git repository, using something like 'git svn'.

Upvotes: 4

jtimberman
jtimberman

Reputation: 8258

I suggest using a script wrapper for svn co.

#!/bin/sh
svn co path://server/R svn-R
git clone path://server/l git-l

Or similar.

Upvotes: 3

Related Questions