Re: Provide a svn log -v with the option to filter out changeset's
From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 23 Aug 2013 11:47:54 +0100 (BST)
Ben Reser wrote:
> On Wed Aug 21 10:44:52 2013, Patrick Sawyer wrote:
That's how I understand Patrick's request, and I wholeheartedly agree there's a need for that functionality.
> We allow the output of the diff when
Before considering --depth, first let me talk about just the paths.
The changed-paths list shown by "svn log TARGET -v" has always listed the changes for the whole commit, rather than just within the TARGET.† The newish "svn log TARGET --diff" output, on the other hand, shows only a diff of TARGET.† These two are inconsistent with each other, and it would be good to do something about it.
But it is more complex than that.† There is not always just one target, there is also the option to specify multiple subtrees when the main target is a URL:
† $ svn log --help
The semantics implemented by 'svn log' is to show only the revisions where at least one of the subtrees was touched, but the '--diff' output still shows a diff of the whole of TARGET, irrespective of any specified subtrees.
What to do?† My suggestion would be to add options to control the output more explicitly, something like this:
† svn log TARGET [SUBTREE...]
This meaning of '--diff' is the same as today when subtrees are not specified, different from today when subtrees are specified.† (I'd argue this is a desirable change.)† And this meaning of '-v' is unchanged.
=== Depth ===
The --depth option currently is only allowed with --diff and only affects the diff.
It would be useful to be able to run a log that shows only the revisions that affect the immediate children of the path ^/branches, for example, to find branch creations and deletions.† This is not currently possible.† Thus, I think it makes sense to implement --depth for the main log filtering, not just for the diff.
I would suggest:
† svn log TARGET [SUBTREE...] --depth=D
This is an archived mail posted to the Subversion Dev mailing list.