[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: tags on silge files

From: Ryan Schmidt <subversion-2007a_at_ryandesign.com>
Date: 2007-03-09 05:52:02 CET

On Mar 8, 2007, at 10:20, Rob van Riel wrote:

> The tagging/branching mechanism in Subversion appears to be
> designed with complete repositories, or at least large chunks
> thereof, in mind. Mostly, this is a good idea, but in some cases,
> I'd really like to be able to tag a single file, and have to
> ability to retrieve that particular file based on the tag.
> Consider this example:
> somewhere in the repository is a directory 'documents' which
> contains just that. These documents will, entirely independant of
> each other, progress through various revisions. For obvious
> reasons, retrieving specific revisions of these documents is a
> needed option.
> How would one do this in Subversion? Putting a descriptive tag on
> the entire directory is not feasable. Putting each document in it's
> own subdirectory and tagging those is not nice either.

In Subversion, there is no such thing as putting a tag *on* a file or
directory. Rather, in Subversion, tags (and branches) are nothing
more than copies. Traditionally, you copy your entire trunk to a new
subdirectory of your branches directory in order to create a branch,
or copy to a new subdirectory of your tags directory to create a tag.

But there is no requirement that you only have a single tags or
branches directory. Make as many as you like, wherever it makes sense
to you. For example, you could create trunk, branches and tags
directories within your documents directory.

You can create a new empty directory in the tags directory to create
a name for your new tag, then copy into it only the document that's

svn mkdir $REPO/documents/tags/some-important-version-of-foo

svn cp $REPO/documents/trunk/foo.doc $REPO/documents/tags/some-


To reply to the mailing list, please use your mailer's Reply To All  
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Mar 9 05:52:50 2007

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.