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

Re: svn blame on trunk

From: Ben Reser <ben_at_reser.org>
Date: 2004-11-12 18:05:38 CET

On Fri, Nov 12, 2004 at 12:02:56PM +0100, Karol Szkudlarek wrote:
> I have svn compiled from the latest trunk.
> I am trying to understand how the command svn blame with TARGET@REV
> works. svn help blame writes:
>
> usage: blame TARGET[@REV]...
>
> If specified, REV determines in which revision the target is first
> looked up.
>
> Could anybody give me short example how it should be works?

Karol,

blame takes a range of revisions (e.g. -r1:200). Subversion needs to
know which revision the file path you give exists in. For instance the
file could have been deleted in r100 and replaced with a new file in
r125 that does not share any ancestry.

We call the TARGET@REV a pegrev. It's a way of pegging the path to a
revision. It lets you tell the client at what path to look at the file
to find the line of ancestry.

Now keep in mind the above explanation suggesting that a file was
deleted in r100 and replaced with a new file in r125 of the same name.

svn blame -r 1:200 foo@99

This would show you the blame from r1 to r200, but only for the file
up to r99 because it was deleted in r100.

svn blame -r 1:200 foo@150

This would show you the blame from r1 to r200 but only for the file that
was newly added in r125 so really it's restricted to r125:200.

If you do not pass a pegrev then the command pegs against the end
revision of the range you pass. So:

svn blame -r 1:200 foo

Would peg against r200. Which means assuming the file that was added in
r125 is still there in r200 then it would show you the blame from r125
to r200.

Hope this helps.

-- 
Ben Reser <ben@reser.org>
http://ben.reser.org
"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Fri Nov 12 18:05:48 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.