aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Subversion commit to a tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Subversion commit to a tag" Watch "Subversion commit to a tag" New topic
Author

Subversion commit to a tag

Joe Harry
Ranch Hand

Joined: Sep 26, 2006
Posts: 9350
    
    2

Guys,

Can we commit new files or modify existing files to a tag? Eclipse does not allow committing to a tag. But does Subversion in general allow committing changes to a tag? If yes, then I do not see any special advantage of using a tag.


SCJP 1.4, SCWCD 1.4 - Hints for you, Certified Scrum Master
Did a rm -R / to find out that I lost my entire Linux installation!
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16014
    
  20

In purely ideological terms, a tag applies to a specific version and should therefore be forever tied to that version, because that's the whole point of version control - committing versions to the archive and thereby "setting them in stone". And Eclipse encourages that practice. Unlike CVS, where a tag was a mutable label and you could have more than one of them, in SVN, the tag is the name of the actual archive itself.

This is different from a branch, which is a work in progress and therefore allowed to change (accumulate new versions).

However, in SVN terms, the whole branch/tag/trunk thing isn't an architectural component of SVN, just a convention on how to manage things, so while Eclipse may object to updating a tag, SVN doesn't care.

Note, however, that copies and commits are done differentially, so where you post your "tagged version" is really immaterial in terms of SVN server storage resources. So whatever actual path - branch, tag, trunk, or whatever, SVN won't care about anything except getting the path of the commit right.


Customer surveys are for companies who didn't pay proper attention to begin with.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30317
    
150

Joe Harry wrote:Guys,

Can we commit new files or modify existing files to a tag? Eclipse does not allow committing to a tag. But does Subversion in general allow committing changes to a tag? If yes, then I do not see any special advantage of using a tag.

A tag is like a reference point to a svn commit #. You can set up hooks to make the tag immutable if you want to. Or just honor the convention.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16014
    
  20

Sorry, Jean, I have to disagree. That's what it is in CVS, but in SVN, the tag is the name of a copy of the archive. Its "file name" as it were.

That's why there's an issue. Basically, SVN will permit updates to that "file" (or more accurately speaking "directory") without comment, but Eclipse says whoa!

The SVN equivalent to a CVS tag would be an archive property, but SVN's tagging convention didn't go that route.
Jeanne Boyarsky
internet detective
Marshal

Joined: May 26, 2003
Posts: 30317
    
150

Tim, Jean != Jeanne.

What are you disagreeing with? If you set up tags to be immutable (which we have done via hook script), they are a label for a commit# - the one that created the tag. I do agree this isn't the default behavior for SVN, but it is the one I am describing.
 
wood burning stoves
 
subject: Subversion commit to a tag