subversion-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nathan Hartman <hartman.nat...@gmail.com>
Subject Re: How to discover which files are tagged or branced in a hook script?
Date Mon, 18 Dec 2017 02:01:32 GMT
On Dec 17, 2017, at 6:35 PM, Bo Berglund <bo.berglund@gmail.com> wrote:
> 
> On Sun, 17 Dec 2017 01:22:06 +0100, Branko ?ibej <brane@apache.org>
> wrote:
> 
>> We'll have to dispel some misconceptions. Subversion's data model is
>> significantly different from CVS's. Tags (and branches) are not
>> properties of files, they're just (sub)trees within the repository.
>> Creating a tag or a branch is exactly the same as copying a directory:
>> the only thing that happens at the repository level is that a new
>> version of the directory is created.
> ...
> 
>> The structure of the repository is entirely free-form. The
>> trunk/branches/tags convention is exactly that: a convention, nothing
>> more. Of course it helps to pick a convention and stick with it.
> 
> 
> I have a hard time getting to understand this...
> Do you mean that using "trunk", "branches" and "tags" as directories
> is entirely voluntary? Does this also mean that files inside a
> tags/something directory can be modified and committed, thus changing
> the content of the tag?
> 
> In my CVS life there is a clear distinction between a tag and a branch
> in that it is not possible to commit changes into a tag but it *is*
> into a branch. So tags are immutable snapshots of the situaton at a
> specific moment in time. Is this not the case in svn?

Yes a tag is basically a copy of a directory as it appeared at a given revision. This is a
server side copy which means it does not take up any storage space. Yes this means that you
can commit there which modifies the content of the tag -- however: (1) history in Subversion
is immutable and therefore never lost, so the original tagged content can always be recovered,
and (2) immediately after tagging you can prevent any further commits to that sub tree thus
making your tag immutable, though admittedly I don't know the incantation to do that. See
the svn book by C. Michael Pilato et al, sorry I am on my phone and don't have the link handy,
but I recall that the chapter about tags addresses this issue. The svn book is a good resource
and includes a chapter on CVS to Subversion migration which may be helpful to you. Hope this
helps. :-)


Mime
View raw message