Вопрос

We currently use VSS for source control management, but we want to convert to some other system. VSS enables sharing single files between different projects. It seems that among popular SCM systems only (?) SVN offers this features as well (svn:externals). Others enable sharing folders only. That’s why SVN is a candidate for us to convert our repo to as it will probably be much easier than redisigning the structures of all projects in our repo to adjust them to directory sharing.

However, SVN externals have to be bound to specified file revisions (I don’t want to take into consideration the possibility of binding externals to head revisions, because that way it is impossible to get historic project versions with adequate externals). That way, when a shared file is modified, it does not influence any project that uses that file as an external one.

So when you download one of such projects in its head revision, you won’t get the latest revision of the modified external. It is necessary to modify manually the externals property that refers to that file to get it updated. In a similar scenario, VSS would provide you will all files in their head revisions (including the shared ones) when getting a project in its current revision.

I’m wondering how to make SVN work similarly. When I get head version of a project from a repo, I want to get all associated externals in their head revisions too. But I’m stuck and have no idea how to achieve it directly or indirectly.

Maybe some scripts? But what would they have to do and when should they be run? Should they update all externals properties of projects that use a shared file when that file gets modified? Or should they be run just after a project is downloaded, to update its externals?

I will be really grateful for any ideas that could lead me to a good solution. Thanks a lot!

Это было полезно?

Решение

This is the answer you are looking for:

find . -name .svn -execdir svn update -r {2010-08-30} \;

(credit: https://stackoverflow.com/a/3608453/1284631 )

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top