Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have TortoiseSVN always freeze svn:externals for tags

Is this possible with tortoiseSVN?:

Always freeze svn:externals for tags

the scenario is our trunk will always use the 'HEAD' revision for externals, however when we create 'tags' we would like for them to have a revision set for externals to properly 'freeze' them at a specific point in time.

Update

Thanks to everyone for your feedback/info.

Since I could not find anything that would completely meet our needs (tried smartsvn and svncopy.pl) I made a console app that so far has passed all our test cases.

A high level overview: The app takes a repository URL then looks for all externals and adds the last commit revision for them - I do a svn info and get the "commit revision".

The app works with both folder and single file externals.

Here is the source code and complete setup files: http://svnxf.codeplex.com/

like image 818
dnndeveloper Avatar asked Dec 30 '09 21:12

dnndeveloper


2 Answers

I found this post today as I looked for a solution to the exact same problem. Eventually I found that TortoiseSVN in their latest version DOES support this desired functionality: TortoiseSVN 1.7 Release Notes.

Hopefully this will help others who find this post when researching the same issue.

like image 52
Steven Hansen Avatar answered Oct 07 '22 16:10

Steven Hansen


The recommended best practice is to always use an explicit revision (not HEAD) in externals definitions. From the documentation:

You should seriously consider using explicit revision numbers in all of your externals definitions. Doing so means that you get to decide when to pull down a different snapshot of external information, and exactly which snapshot to pull. … For software projects, this could be the difference between a successful and a failed build of an older snapshot of your complex codebase.

To directly answer your question: no, it’s not possible to automatically change the externals definitions when tagging using TortoiseSVN. It will have to be done manually when creating the tag.

like image 6
Michael Hackner Avatar answered Oct 07 '22 15:10

Michael Hackner