tags:

views:

26

answers:

2

So, I have some old versions of the code from before we set up version control, and I want to use the repository to hold them, first because I still will (not might) need them for some things, and second as an archival method. What is the best way to add and tag an obsolete version into the svn 'stack' without disrupting the versioning any more than necessary?

EDIT: Clearly I'm just not feeling the tao of SVN just yet. Here's a slightly harder case, which is what I actually need to achieve. The trunk of the repository holds a single package, this package is made up of numerous pieces, so dirs are:

trunk/ # contains glue scripts and configuration files
trunk/src/program1/ # source code for program 1
trunk/src/program2/ # source code for program 2

What I want is to store and tag an old version of 'program1' in, e.g., 'tags/old_program1_code/'. And also (so sorry for asking dumb questions, but I'm learning) can you explain how I can, after checking out the full trunk dir, replace the 'trunk/src/program1/' dir with 'tags/old_program1_code/' so that I can run the old code as a drop-in replacement in the package.

A: 

If you use the standard repository layout with /trunk, /branches and /tags you should create a folder under /tags for each of your old versions.

Edit: If you already have them checked in somewhere in trunk or elsewhere you create a branch from there to the /tags folder, or if you want to remove the code from the old location you may use svn move.

Albin Sunnanbo
+1  A: 

In accordance with 'Albin Sunnanbo' I might use the tags folder to store legacy code. You we're asking for a method to put this code under version control. You may use svn import to achieve this task.

cd legacy-code-directory
svn mkdir project http://hostname/.../tags/legacy-code-1
svn import . http://hostname/.../tags/legacy-code-1/ -m "Legacy Code Import Version 1"
zellus