On May 14, 2008, at 02:34, Chuvke _ wrote:
> I've question about the (optimal) repos struct for svn if :
>
> Initial revision (rev1):
> doc
> spec.doc
> src
> a.c
> b.c
> c.c
>
> What I would like is to "attach" a tag to the src code files and
> the corresponding revision of the spec.doc document.
>
> lets say in rev2 the spec.doc is modified, so
>
> rev2:
> doc
> spec.doc (*)
> src
> a.c
> b.c
> c.c
>
> I would like to attach a tag now which labels/tags the
> a.c,
> b.c,
> c.c
> of rev2 and the
> spec.doc of rev1.
>
> What would be the required repos struct here ?
>
> e.g. trunk/branches/tags in doc and src . But then how can I
> achieve the above tagging then?
>
> In a file based revision system this would be easy to do, since you
> can label/tag the individual files to that label, but how can I do
> so in svn ?
It sounds like your asking to tag revision 1 of the repository,
right? Since in revision 2, the files a.c, b.c and c.c were not
modified.
To do this, your structure should have trunk, branches, tags at the
root, and everything should be moved into the trunk. To achieve this,
check out a working copy of the entire repository, go into it, and
rearrange:
svn mkdir trunk branches tags
svn mv doc trunk
svn mv src trunk
svn ci -m "adding trunk, branches, tags directories; moving existing
code into trunk"
It should now look like this:
trunk
doc
spec.doc
src
a.c
b.c
c.c
branches
tags
Now you can delete this working copy. It was just for rearranging
things. Now check out a new working copy of trunk. This is what
you'll use to make changes to the project.
Now you would like to tag revision 1? Easy. You usually do it via
URLs. If $REPO is the URL of your repository, do this:
svn cp -r 1 $REPO/trunk $REPO/tags/rev_1
This copies the trunk as it existed in revision 1, to a new directory
in tags named "rev_1". You can give the tag any name you like.
Tags and branches in Subversion are not special entities. They're
just directories copied from elsewhere.
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: users-help_at_subversion.tigris.org
Received on 2008-05-15 09:14:01 CEST