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

Re: CVS and SVN: Tags and Branches.. A question of strategies

From: Jeff Smith <jsmith_at_robotronics.com>
Date: 2007-03-16 21:53:34 CET

On Friday 16 March 2007 08:30, John Rouillard wrote:
> The problem is that tags in subversion create a new namespace that
> ends the file time history at that point. E.G.
>
> new trunk/foo.c rev 1024
> new trunk/foo.c rev 1028
> tag trunk/tag1/foo.c -> tag/tag1/foo.c rev 1030
> new trunk/foo.c rev 1032
>
> you can look at the history for tag/tag1/foo.c and see that it came
> from trunk/foo.c at rev 1028, and IIRC you can see the change at
> 1024 and earlier. What you can't see is the new revision of
> trunk/foo.c at rev 1032 by looking at tag/tag1/foo.c.

Thanks John, I see. (And to Les, I had forgotten branches were just
tags marked as branches, so they are alike in cvs; we agree they
differ greatly from svn).

You are referring to the fact that because tag1 is a 'copy' of certain
rev of trunk, then trunk does not include tag1 as any part of it's
history. Frankly, given that svn only uses 'copy', I think it could
get overly complex if subversion tried to show "copied to..." in a
log entry, unless it was only done in a special case. After all, we
can make as many copies as we want, all in one node/revision of the
tree. I think it could get messy trying to show log of trunk if there
were 156 seperate copies steming from rev 1028. OTOH if you `svn log
-v tag/tag1/foo.c`, it's easy to display "(from /trunk/foo.c:1028)",
because there can only be one source.

> However what is tag/tag1/foo.c, it is just a particular stage of
> life of trunk/foo.c, but because of how SVN does tags, it isn't
> part of the timeline of trunk/foo.c at all. It is it's own seperate
> entity with it's own timeline.

So this is where use of cvs and svn are designed to differ, and I
guess if you relied on the internal cvs specifics then some
reconsideration is in order...

What is the "tag1" in svn? We see it's not just rev 12 of trunk, but
rather a 'copy' of trunk@1028. I think the begining of your solution
is knowing that the 'tag' by name (i.e. tag/tag1), tells you which
revision it is tagging (trunk@1028).

I guess what I'm still missing is the real-world example of your cvs
project; why the hints that you don't know the name of the tags, but
you only know the origin "trunk/foo.c"? Instead, I thought it would
just be a matter of looking at the tag1 log to see what rev it was
coppied from. Then you know you're working from trunk@1028.

> So if my question is "has the file tag/tag1/foo.c" changed/been
> updated, then answer is no always. But what I really mean is: has
> the file that tag/tag1/foo.c was the tag of been updated? I have no
> way to tell from looking at tag/tag1/foo.c. I must go back to the
> base file and pick up it's time history. In cvs, tags don't create
> a seperate timeline. They mark a point in the timeline of the
> original file. So my question becomes is there a revision of
> trunk/foo.c that is newer than the tag tag1 of that file.

Yeah, "has the file trunk/foo.c been updated since tag/tag1/foo.c". I
agree that we need something more to make the search fluent. I would
want a tool that does basically this, which I think would be cool
using svn libs rather than parsing commandline output:

> svn log tag/tag1 -v
------------------------------------------------------------------------
r1030 | (no author) | 2007-03-16 13:54:57 -0600 (Fri, 16 Mar 2007) | 1
line
Changed paths:
   A /tag/tag1 (from /trunk:1028)

release tag1
------------------------------------------------------------------------

# from the log information above, derives "trunk@1028"

> svn log -r 1028:HEAD trunk@1028
------------------------------------------------------------------------

# No further changes are logged

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Mar 16 21:54:18 2007

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.