SVN externals and tagging

3.8k views Asked by At

I'm using a trunk based development model with SVN externals using the HEAD revision. Is there a way to automatically fix the current revision of the externals when I'm tagging a version?

Currently, I have to set SVN externals properties to the current revision for each external repo, commit the properties, create the tag, revert the externals back to HEAD.

2

There are 2 answers

0
Ben On BEST ANSWER

There is no command-line tool in SVN, to my knowledge, that will automatically fix the externals for tagging.

However, TortoiseSVN gives you this option whenever you create a tag.

It does this by making a second commit to the tag, after the tag is created, that sets all externals to a fixed revision on whatever path they are already pointing to.

You could do this manually by tagging, modifying the externals, and committing to the tag. I know normally tags should be immutable, but you can probably make an exception for this one task.

As an alternative, consider ALWAYS setting a fixed revision on externals. This is the recommended usage. If you don't, then you have no way of going "back in time" to see what your project looked like at a certain point in its history. The externals will not reflect the version they were using when your trunk was at a given state.

0
Kuno Meyer On

The SVN 1.9 command line client seems to have grown a --pin-externals flag to the copy command.