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

Analysis of an easyier tag command

From: peter <subversion_at_cooltoad.com>
Date: 2005-12-26 15:46:04 CET

Hello

Some days ago ther was a discussion about tagging on this mailinglist.
Somebody wished for a simpler way to tag files. He wanted
to tag a file located at workingcopypath from taguri to trunkuri with a
command like

svntag -r rev workingcopypath tagname

There seemed to be some consens about this being fairly easy to implement.
In my oppinion this is not easy to do at all.
If you simulate it by hand on the command line you have to:

1. use svn info to get the trunkuri

2. if you don't want to tag the HEAD revision but an older revision you have
to check the log to find the path at that revision time.

3. remove taguri if it exists

4. create the taguri path if it doesn't exist

5. copy trunkuri to taguri

Explanations:
-------------

1. This is Easy just do a svn info workingcopypath

2. This happens for example when you have to change a file in the tag back to
an old version. Between the Head revision and your intended revision the path
of the file might have changed. So you have to find the old path to use it at
step 5.

3. if the file already exists in the tag you have to remove it first. The copy
in step 5 will not overwrite it.

4. This is a tough one and I think it is not possible to do it. For example if
you have a file at
svn://demo/trunk/src/java/gui/Frame.java and you want to tag(copy) it to
svn://demo/tags/version3/src/java/gui/Frame.java the path
svn://demo/tags/version3/src/java/gui must exist. You could argue why
don't you just copy the top folder like
svn cp svn://demo/trunk/ svn://demo/tags/version3 but in this case
you copy all the files I just want to copy a single file. Another idea would
be to copy it into the tag folder like
svn cp svn://demo/trunk/src/java/gui/Frame.java svn://demo/tags/version3
but in this case you change the folder structure and it is hard to copy it
again from the tag to someplace else.

5. This is the copy operation and no problem at all.

So am I overlooking somethig or is it really this hard to do? Especially step
4 was really easy to do in CVS.

regards
Peter Oleski

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Mon Dec 26 15:49:13 2005

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.