You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by peter <su...@cooltoad.com> on 2005/12/26 14:46:04 UTC

Analysis of an easyier tag command

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