views:

45

answers:

3

Hi,

We have a large project which consists of a single build job (Maven, via a pom.xml, with multiple child folders etc). Developers have given us three different revision numbers, and would like us to create a single tag that we can feed the (Hudson) build job.

Example:
/ -- at rev X
/project1 -- at rev Y
/project2 -- at rev Z

I was able to create this tag by syncing the entire branch to rev X, then "cd project1" and sync to rev Y, then "cd ..\project2" and sync to rev Z, then "cd .." and create the tag from the current directory.

We would like to be able to create the tag from a single command line (and, without having to sync any files to our local workstation, by using URLs). Is this possible? We have tried several variants but none seemed to work.

Thanks,
Ken

A: 

You can always do svn copy manually to copy stuff over to a newly created folder under tags. If you want, you can also make up a simple script doing this given three revision numbers.

If the copy targets are paths into your working copy (rather than URLs into the repository), you can later commit all of it in one step.

sbi
A: 

svnmerge may help you in this case.

svnmerge.py wiki says "Specific support for release branches through cherry-picking: name and merge single revisions or revision ranges."

I have not checked it myself, do give it a try.

Version Control Buddy
+1  A: 

I see two approaches to meet your requirement

I will treat your "/" as "trunk" btw. as it wouldnt make sense for creating tags otherwise ;)

copy from revision approach

advantages

  • easy to understand

disadvantage

  • documentation overhead (What is in this tag?)
  • selecting of revisions possible source for error
  • overhead scales lineary with number of projects

mark as stable approach

do this step once in your trunk:

Whoever checks out your main app will now get the latest versions of your projects when they were ready for release.

development teams for the projects do these steps whenever a new release is ready. They can decide to use the revision number or simply tag HEAD when they are ready:

on release/tag-day:

You can use a revision number too. Problem here is that your application layout indicates that project1 and 2 reside inside your main application "/". If that is not the case tagging and using fixed taggs for release-integration can be verry smooth. ("/" would get sub-tagged too)

real world example:

svn propget svn:externals http://svn.silverstripe.com/open/phpinstaller/tags/2.4.2/

advantages

  • documentation is a bit easier via svn history and revision graph
  • tagging overhead scales and remains constant on main tag-day

disadvantages

  • more complicated to setup & understand (whole team has to)

Tags are just "symlinks" to revision so both scenarios use the same principle. Tagging feels more explicit though. This whole scenario is not a 1:1 copy-and-it-works suggestion but more of a generic model.

Christoph Strasen