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

Re: Re: log across copies?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-07-29 21:44:52 CEST

On Thu, 2004-07-29 at 14:34, rickla1@cox.net wrote:
> > /branches/mybranch/foo.c is a different object from /trunk/foo.c. They
> > may have been the same object at an earlier time, but then the object
> > "forked" into two lines of development.
>
> That may be true, but if you're saying they are disconnected such that
> somehow I can't see that they are realted, that's a loss from cvs.

If I 'svn cp /trunk/foo.c /branch/foo.c', the latter object remembers
that it's a copy of the former object. 'svn log --verbose
/branch/foo.c' will even show that it was copied, and from where, and
even traverse through the copy to show the 'shared' history.

So no, they're not disconnected at all. The connection is only easily
traceable in one direction, however.

> And when the object eventually goes back to the trunk, it sounds like
> there will be a "hole" for all the branch changes?

I don't understand.

>
> So let me ask my question a different way. How can you audit all the
> changes that have gone on in a file if it's been copied and returned
> back to the trunk? I mean, one question I always have to ask in a
> repository is when was this line of code changed? How do you even know
> where all the copies of an object are/were?

An object can be traced backwards through copies, but you can't find all
copies ever made of an object, other than searching forward in time via
brute-force.

The plain fact is, when a file is "branched" (copied) in Subversion, you
now have two separate files that share history. There's no *easy* way
to query one file, and learn about changes that happened on the other.

Note that this design isn't accidental, nor is it necessarily a design
flaw; the tradeoff here is that branches and tags can be made in O(1)
time. It also means that they live in directory space, so they can be
access-controlled. (And they're easier for SCM newbies to understand.)

I think this will answer a lot of your questions:

http://svn.collab.net/repos/svn/trunk/notes/schema-tradeoffs.txt

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Jul 29 21:46:10 2004

This is an archived mail posted to the Subversion Users mailing list.