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

Re: log across copies?

From: Ben Collins-Sussman <sussman_at_collab.net>
Date: 2004-07-30 01:31:51 CEST

Rick LaBanca wrote:

> This will do, it's just not as easy as cvs because as you said, you see the
> changes from the branch once merged, but you won't see the detail of those
> in the branch, unless like you say you hunt it down. Is the only way to know
> it was changed in a branch from the log comment?

Sure, but this is part of the process of bug hunting anyway.

Suppose you see buggy behavior in /trunk/foo.c. You run 'svn log
--verbose foo.c > logfile', load the logfile into your editor, then
start reading about all the changes made to the file.

What you're going to see is a list of *only* those commits in which your
trunk file changed. So you might see r423, r380, r352, r250, r201. (As
an example.)

So, you begin by running 'svn diff -r422:423 foo.c' to see the most
recent change to the file. Nope, that looks fine. Then you inspect
the output of 'svn diff -r379:380 foo.c'. That also looks fine. Then
you look at 'svn diff -r351:352 foo.c', and see the bug.

So you go back and look at the log message for r352. It might look
something like this:

----------------------------------
r352 | joe | 2004-07-24 14:25:24 -0500 (Sat, 24 Jul 2004) | 1 line
Changed paths:
    M /trunk/foo.c
    M /trunk/bar.c

Merge r335 from the branch1 to trunk, which fixes issue #988.
-----------------------------------

Interesting... so even though 'joe' committed this changeset to /trunk,
it was just a port of a changeset r335, originally committed to
/branches/branch1. Fine. So instead of sending an angry mail to joe,
we run 'svn log -r335 http://host/repos/branches/branch1':

-------------------------------------
r335 | mary | 2004-07-19 11:15:44 -0500 (Sat, 19 Jul 2004) | 1 line
Changed paths:
    M /branches/branch1/foo.c
    M /branches/branch1/bar.c

Frobulate foo.c properly. This fixes issue #988.
-----------------------------------

So now you know that mary was the person who originally wrote the
changeset. Send her the mail instead.

Keep in mind, that there is *no* difference in the output of:

    svn diff -r334:335 http://host/repos/branches/branch1

and

    svn diff -r351:352 http://host/repos/trunk

You're examining the same changeset either way.

Does this example make the process clearer? I find this much more
elegant than CVS, honestly. I'm not looking at cryptic RCS revision
quads on separate files, deducing which ones are on a branch, wondering
which file changes were meant to go together... I'm looking at whole
changesets here.

What's missing from this process, that you wish you had?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Fri Jul 30 01:30:10 2004

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.