SVN Tags


Version Control System supports tag operation by using that one can give meaningful name to specific version of the code. Tag allows to give descriptive and memorable names to specific version of code. For example BASIC_ARRAY_OPERATIONS is more memorable than revision 4.

Let us see tag operation with example. Tom decides to create a tag so he can access code more easily.

[tom@CentOS project_repo]$ svn copy --revision=4 trunk/ tags/basic_array_operations

Above command will produce following result

A    tags/basic_array_operations/array.c
Updated to revision 4.
A         tags/basic_array_operations

Upon successful completion, new directory will be created inside tags directory.

[tom@CentOS project_repo]$ ls -l tags/
total 4
drwxrwxr-x. 3 tom tom 4096 Aug 24 18:18 basic_array_operations

Tom wants to double-check it before commit. Status operation is showing that tag operation is successful, so he can safely commit his changes.

[tom@CentOS project_repo]$ svn status
A  +    tags/basic_array_operations

[tom@CentOS project_repo]$ svn commit -m "Created tag for basic array operations"
Adding         tags/basic_array_operations

Committed revision 5.