<p>I wish Subversion had a better way of moving tags. The only way that I know to move a tag is to remove the file from the tag and then copy it again. Revision tree browsers don't seem to handle that very well. This also requires keeping the directory structure under the trunk and tag in sync.</p>

<p>Use case: We have thousands of "maps" and we want to tag which version of each map is the "production" version. We need to be able to easily get the production version of all maps.</p>

<p>Can anyone suggest a better way to address our use case?
I have considered properties also but then we can't get the prod version of all files easily. Merging to the tag doesn't appear to be very easy either.
(Originally posted to <a href="http://jamesjava.blogspot.com/2007/12/subversion-moving-tags.html" rel="nofollow noreferrer">http://jamesjava.blogspot.com/2007/12/subversion-moving-tags.html</a>)</p>

[{'answer_id': 62550, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 2, 'selected': False, 'text': '<p>I don\'t see the need to "remove" the file from the production tag. You should copy the new file over the existing one and check it in. That way you will preserve the history.</p>\n\n<p>Of course you would need the production tag checked out to do this.</p>\n'}, {'answer_id': 62581, 'author': 'Wyatt', 'author_id': 6886, 'author_profile': 'https://Stackoverflow.com/users/6886', 'pm_score': 3, 'selected': True, 'text': '<p>I don\'t think you can ever do this with the way that subversion operates.  I believe the best solution would be to look at a tool like <a href="http://git.or.cz/" rel="nofollow noreferrer">git</a> which seems like it fits into your use case.  You\'re production system could \'pull\' in the "maps" that are accepted.  While I realize this isn\'t subversion, using git might be closer match to your use pattern than svn.</p>\n\n<p>A really good write up on why git\'s pull based development model is a better match to your scenario is <a href="http://utsl.gen.nz/talks/git-svn/intro.html" rel="nofollow noreferrer">here</a>.</p>\n\n<p>There are also tutorials on how to start migrating like <a href="http://git.or.cz/course/svn.html" rel="nofollow noreferrer">this</a>.</p>\n'}, {'answer_id': 62627, 'author': 'Mauli', 'author_id': 917, 'author_profile': 'https://Stackoverflow.com/users/917', 'pm_score': 0, 'selected': False, 'text': "<p>Why don't you make a new tag for the current production version? Remember, Subversion is not CVS. So making a copy of the complete directory tree doesn't cost you anything.</p>\n"}, {'answer_id': 62656, 'author': 'Anarchofascist', 'author_id': 6740, 'author_profile': 'https://Stackoverflow.com/users/6740', 'pm_score': 1, 'selected': False, 'text': "<p>This is not a good use for subversion.</p>\n\n<p>Subversion tags are for giving a name to an instance of a tree as at a specific snapshot in its history, and should be kept static.</p>\n\n<p>Perhaps you could use the current date, or an incrementing number as part of the tag? you could have a directory under tags containing the production versions as at any particular date. Take the latest date as the current production version.</p>\n\n<p>Today's version could be found at </p>\n\n<pre><code>/svn/tags/production/2008/09/15/mapproject\n</code></pre>\n"}, {'answer_id': 63056, 'author': 'Jim T', 'author_id': 7298, 'author_profile': 'https://Stackoverflow.com/users/7298', 'pm_score': 0, 'selected': False, 'text': '<p>One way would be to move to a "stable trunk" model.</p>\n\n<ul>\n<li>Make a branch from trunk to use as your working area.</li>\n<li>Stop making commits directly to trunk - have everyone switch to the development branch.</li>\n<li>Have trunk checked out by the people who are managing stable releases, ensure they have commit rights.</li>\n<li>When you wish to "release" a map, use "reintegrate merge" to pull in the changes to that file/directory and commit the changes.</li>\n</ul>\n\n<p>This might appear a bit upside down but is fairly workable. You can either have production machines pull straight from trunk, or make a new tag from trunk for each release. For the latter, you will need some way to communicate the new tag to the production machines. Some sort of messaging, shared config or naming convention could work.</p>\n\n<p>But be aware that you must get into the mindset of trunk being somewhat \'sacred\' in this model.</p>\n'}, {'answer_id': 63247, 'author': 'Lucas S.', 'author_id': 7363, 'author_profile': 'https://Stackoverflow.com/users/7363', 'pm_score': 0, 'selected': False, 'text': "<p>If i understand well your needs, i think that the best way of doing it, is to have all maps as externals of the main trunk and then make a script that recursively tags each map (external) to it's current revision in the working copy (or the server if you want it that way).</p>\n"}, {'answer_id': 661039, 'author': 'Community', 'author_id': -1, 'author_profile': 'https://Stackoverflow.com/users/-1', 'pm_score': 1, 'selected': False, 'text': '<p>I think you are trying to solve the wrong problem.</p>\n\n<p>It sounds like you have a trunk which contains versions of maps which are not yet released, and when you do a release, you want to cherry pick which maps to update from all the possible updates on trunk.</p>\n\n<p>Assuming this is the case, create a branch called "Release". (Consider creating a new empty directory, and copying each map version needed (with separate svn cp commands) if that will be faster).</p>\n\n<p>Now you have the current release in the branch. Tag it (svn cp the whole directory) with "Release XXX" where XXX is the meaningful ID for your latest release.</p>\n\n<p>Then as maps are approved for the next release, svn cp them to your release branch. I assume you don\'t want to use merge, because maps a discrete elements not source code.</p>\n\n<p>At the time of the next release, you can tag again.</p>\n\n<p>Now you know, what the latest approved maps are and what was in every release. If you <em>really</em> can\'t remember the latest release number, and you can come up with a time you\'d need to know without just looking in the tags directory, you can create a tag which svn cp the latest release, then blow it away and re-copy when you do the next release.</p>\n'}]
['https://Stackoverflow.com/questions/62505', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/6770/']