"svn blame" with a specified revision
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2003-10-14 01:16:49 CEST
"svn blame" is great. It's a really big step to nail the last remaining publically-obvious missing CVS feature. So don't interpret this as a complaint; its just a bit of development work. I already saw a mention of "blame" not working well with revision specifiers, but I can't find that now.
At the moment (r7405), "svn blame" doesn't behave very well when "--revision" is specified. I was going to start reporting what it does do, but then I switched tack to evaluate what we _want_ it to do. Can we write a short specification of what "blame -rARG" means, perhaps to appear in the book and/or the help? After careful consideration, and thinking about the alternatives, I'd suggest:
Proposal:
"svn blame -rX:Y FILE" (X >= Y)
"svn blame -rX:Y FILE" (X < Y)
"svn blame FILE"
The "unknown origin" indication is "-" for the revision number and "-" for the author.
Notes and explanations:
This definition of "-rX" is the same as in "cvs annotate". I think the current "svn blame" interprets "-rX" as "annotate FILE@HEAD from rX to rHEAD" which is, in my opinion, confusing, partly because FILE@BASE could equally well be expected or desired, but mainly because of the expectation that (only) the lines that existed in FILE@X will be shown.
The reasons for "-rX:Y" meaning "FILE@rX back to rY" are:
The reason for (X < Y) being an error is that it would introduce a confusion about which version of the file is to be annotated: FILE@X or FILE@Y. It would be possible to write a forward-looking annotator which says who was the next person to change each line of this old file, and, for that, "-rX:Y" (X < Y) would be appropriate.
This definition of "-rX:Y" includes changes made between revision (X-1) and (X). I am not sure whether it should. I would like it to be consistent with other commands, but there is already an inconsistency between "log" and "diff". This "inclusive" definition matches "log" and the implementation must remember to fetch the diff that created revision X from a previous revision as well as those between X and Y.
- Julian
---------------------------------------------------------------------
|
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.