Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the functionality of svn:externals in a read-only fashion?

Tags:

svn

svn:externals can be great for sucking in central libraries or IP into a project, so that they can be kept in one location accessible for all.

But if I'm asking people to external tags of common IP (so it doesn't change on them) it opens the possibility of them inadvertently committing changes to the tag.

How can I make svn:externals read-only? It's acceptable if there is some extra argument or some way of making the external that we can add to the procedure for everyone to follow.

like image 990
rdb78 Avatar asked Oct 28 '08 22:10

rdb78


People also ask

How to add svn externals?

cd into the directory where you want to add the external project, then type: ? svn propedit svn:externals . Once the editor opens, add the name of the directory you want to add the external project into, and the URL of the project.

How do I view svn externals?

If you need to see all svn:externals in a directory structure, this is your huckleberry: svn propget -R svn:externals . Logging this here for my own future reference.


2 Answers

Using svn repository hooks to avoid commting into special dirs e.g. tags

If you´re using the ttb (trunk, tags, branches) naming convention and the code for read-only svn:external access resides in tags-directories, you can use the pre-commit hook to avoid commiting into those directories.

Here´re are the details: SVN pre-commit hook for avoiding changes to tags subdirectories

like image 112
fabian Avatar answered Oct 21 '22 15:10

fabian


Make the external repositories read-only to everyone except their maintainers.

like image 21
John Safranek Avatar answered Oct 21 '22 14:10

John Safranek