tags:

views:

153

answers:

4

I frequently have svn-based projects that include third-party components such as the TinyMCE (in-browser WYSIWYG) editor. This includes dozens of folders with possibly hundreds of files.

Ideally, when I want to update TinyMCE to the newest release, I'd like to be able to copy the top-level TinyMCE folder into my working copy, commit the changes and away I go.

Obviously, this won't work because by copying over the top I'd be wiping out all the existing .svn folders nested through the working copy.

Updating all the files by hand would take hours.

Is there a good way to manage this with svn?

Alternatively, are there any tools (on linux or OS X) that would help me perform the 'manual' copy more easily?

+1  A: 

I think you should look at the svn:externals property.

BrianLy
Does that not require the third-party component to also be a svn versioned resource? In this case it's just a folder of stuff downloaded from the web.
drewm
A: 

"the best way to manage updating third-party components in subversion"?

Vendor branches. As a bonus, you can modify the code of the third-party component, and the modifications will survive updates thanks to merging.

e-t172
+1  A: 

I didn't understand "Obviously, this won't work because by copying over the top I'd be wiping out all the existing .svn folders nested through the working copy.". Which OS are you using?

I use a Linux Web Server for my SVN Server and a Windows machine for work. There's not such thing as "wipping out" .svn folders: you just copy the files to the the checked out directory, and since they are changed, I just commit them using TortoiseSVN.

This is not the "best way" of keeping your structure. But it works.

Disk space is usually not a concern, so you can usually create a repository of third party applications, so you don't depend on internet access to just build/deploy your application.

svnrepositories
  myprojects
    myprojet
  third-party
    tinymce
      1.3

And them, use the svn:externals property, like pointed out by BrianLy.

You can just point out to the external resource on the internet. But remember that the disadvantage is that the resource can be offline and you need internet access.

GmonC
I'm using OS X. When you copy one folder on top of another, a direct replacement occurs. There's no merging. Do other systems merge? That sounds useful but also pretty dangerous!
drewm
You set me on the path of researching copying methods. It looks like the standard unix `cp -R` command will perform a merge-like copy, which would be good enough for what I want, using the workflow you've outlined. Thanks.
drewm
Since I've never used an OS X, I didn't know about this "direct replacement" behavior. I'm glad you could work it out a way to do what you needed even in this scenario. :)
GmonC
A: 

use svn:externals including the revision lock parameter -r{REV.NR.}, which ensures that you dont in an untimely fashion get updates from the third-party suppliers svn-repository.

Then you can in your own time, upgrade to the latest version of the thirdparty component, simply by setting the -r{REV.NR.} parameter to the latest revision of the external repository.

Lars Udengaard