views:

61

answers:

4

Here's a similar question for SourceSafe. We have a single SVN repository storing sources of numerous projects. Among those projects something like 25 are built every day each by a dedicated daily build. Once daily build starts it tags the sources with its own name (something like "Build of Project N version X.Y.Z", Z increases with every successive build of project N).

Are there any practical limitations in SVN we can run into with such scheme? Is there a practical limit on the number of tags in SVN repository?

+6  A: 

No, tags are very cheap in SVN since they are just a named revision.

Brian Clements
+1  A: 

I don't believe so. But what's the point of making a new tag every time you do a daily build? If you needed to you could just pull the sources by date...

jambox
You can refer to certain states of the repo by revision number.
sbi
Pulling the source by date wouldn't work for him if they do multiple check ins each daily. The point of a Tagged check in is to verify that a particular check ins code will always be exactly the same as the code that was used to build that specific version.
wllmsaccnt
@wllmsaccnt: So you need to specify hour, minute, and second, too. However, a revision number is better.
sbi
With a tag for each build it's much easier to reproduce the build in the future. Why remember the exact revision number when the repository can store it?
sharptooth
@sbi: Yes, but one needs to store the revision number somewhere. With such tagging scheme those sare stored in the repository.
sharptooth
@sharptooth: The revision numbers are stored by the CI tool. It has a nice web interface.
sbi
@wllmsaccn: yah what sbi just said. we never do that here; we have thousands of commits per day and it's fine for us. In fact we have so much code that the tag operation takes hours! So no not much point in that case. We tag once per month or so, meaning that the names actually mean something. One of our customers might turn around and say "well i bought version 1.2G and now i want to upgrade to 1.4B" but never "i want to go from 31st October 1999 to 2nd June 2002".
jambox
@jambox: But tagging is reputed to O(1) with SVN, no?
sbi
@sbi: you got me, I was thinking of CVS. We have big products in both here and use the same rules for both, for traditional reasons as much as anything. So in the case of SVN: yes, that would make sense.
jambox
@jambox: Oh yes, CVS was annoying for the time it took to throw a tag as much as for many other things. I'm glad I'm rid of it. `:)`
sbi
+2  A: 

Is there a practical limit on the number of tags in SVN repository?

I can imagine that mere browsing so many tags becomes slow after a few years of 25 daily tags, but you could overcome that by saving them hierarchically. Also, I wouldn't put them under tags, or at least not directly, lest they clutter the the folder and make it hard to find releases and such.

Otherwise I'm not aware of a practical limit. Tagging, at its heart, is making a lazy copy of a subtree and AFAIK, internally, each checked in revision basically is a lazy copy of the one before, so SVN uses that operation for every checkin. I'd seriously doubt that there's a limit you can reach.

sbi
+vote this for saying make it hierarchical. That allows you, if nothing else, to make a tree control for picking out the tag you want.
jambox
+7  A: 

On a practical basis, I would personally find it very annoying if I tried to view the list of tags in my repository browser to find the Project_v2.0 tag, but I had to scroll through 2000 daily build tags to see it. So I would suggest keeping these in a separate subdirectory: /tags/daily/build_0001

the_mandrill
+1. That is a good idea for versioning sanity. It is possible if they are doing daily tagged builds that they are using a continuous integration methodology though. They may not have a strong need for major version numbers, which would make seperating them a moot point.
wllmsaccnt
I would say that depends on your release strategy. Presumably you are going to ship version 1.0 at some point and so you'd want a more meaningful tag then `build_02382`?
the_mandrill