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

Re: Small problem with svn ls -r [PREV|BASE] and svn blame -r BASE

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-11-24 02:29:24 CET

I don't think I saw a reply to this post, so...

John Szakmeister wrote (on 2003-10-31):
> I just built the head (r7577) of svn, and decided to try a couple of things
> that I would almost never do. I tried doing an 'svn ls -r BASE' at the top
> of my working copy and got the following error:
>
> svn: A path under version control is needed for this operation
> svn: svn_client__get_revision_number: need a version-controlled path to fetch
> local revision info.
>
> I also tried giving it a couple of different paths, and got the same error. I
> then specified the revision directly (-r 7577), and it worked just fine.
> I've narrowed the problem down to this statement in ls-cmd.c:
> SVN_ERR (svn_client__get_revision_number (&rev, ra_lib, session,
> revision, NULL, pool));
>
> I believe NULL should be path_or_url, but I'm not entirely sure about that.
> Patching my local copy with it makes it appear to work properly. Is this a
> bug, or an error in my logic?

"svn ls -r BASE" seems to work properly now.

> Also, can someone explain to me what 'svn ls -r 1:10' means? It let me do it,
> and it produced output, but I'm not sure what the output really means. :-)
> Is it the directory listing at r1? At r10? Or all of the things in common
> between r1 and r10?

It, like several other subcommands, silently ignores the ":Y" part of "-rX:Y". Only "cat" specifically validates and rejects it. I have just updated my patch for this, and will now re-submit it as "PATCH: Reject a revision range rather than ignoring part of it".

> Just for giggles, I tried doing an 'svn blame -r BASE README', and it produced
> no output. 'svn blame -r PREV README' worked fine though. So I hunted
> around a little more and found that PREV and BASE we're being used for the
> start values, and the end value was taken to be HEAD. I would've thought it
> would have worked the other way around. I would have assumed BASE would be
> the end revision, and start would have been 1.

This has been fixed to work the way you would expect, operating on 1:N when only N is specified.

> I also expected some sort of output. In this case, I expected the author who
> last committed a change to show up as the author for all of the lines when I
> specified -r BASE. Am I wrong in expecting that? I didn't find any
> documentation stating the way it works (I realize that this is a new feature
> and the docs are a little behind).

When the revision range contains no changes to the file, there is no output. That is perhaps not what should happen, and is probably related to the fact that "svn blame -rX:Y" does not yet distinguish between changes made in revision X and changes made before revision X; it marks them all as having changed in revision X. More work is needed there.

> On a more positive note, I'm really impressed with the speed improvements that
> have been made over the last several weeks. Keep up the good work guys!
>
> -John

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Nov 24 02:27:40 2003

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.