views:

648

answers:

5

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.

Thanks!

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/

A: 

You can specify the revision in externals:

third-party/skins -r148        http://svn.example.com/skinproj

See svnbook

Sander Rijken
thank you - I'm looking for an automated process.
dnndeveloper
I don't think there's a way to do that automatically, other then scripting/programming something yourself and always using that for tagging
Sander Rijken
+3  A: 
Michael Hackner
I completely agree with this for a tag, however the trunk will always use the latest.
dnndeveloper
+2  A: 

You should try SmartSVN which optionally converts HEAD-externals to fixed externals when creating tags or branches. You can find this option (External Revisions: (o) Leave as is ( ) Fix all ( ) Fix except below) at the bottom of the Add Tag/Add Branch dialogs.

mklhmnn
tried this and it seems to only work with folder externals and not single file externals support in 1.6+... first client to get this working right will have a nice edge over the rest!
dnndeveloper
According to http://www.syntevo.com/smartsvn/changelog.txt SmartSVN 6.5.2 fixes also file externals.
mklhmnn
A: 

You can try svncopy.pl (find it on google) It is a perl script that answer your need.

Gilles
A: 

I would second Michael.

Additionally to recommendation from SVN documentation:

  • Usage non-fixed revisions in svn:externals makes harder to update working copy to a specified revision (e.g. during bug investigation)
  • Log of directory with svn:externals will be incomplete which may provide false information about change sets between revisions
  • Branching and merging may become more complicated

Generally, SVN seems to be designed mostly for code contained in a common directory. svn:externals (even by name) is added for referencing external repositories. So I would expect other problems additionally to mentioned above.

On my experience need for usage of svn:externals for non-fixed revisions frequently comes from wrong structure in repository.

May be it's not your case, I just advise to take into account these points...

maxim1000