Garrett Rooney wrote:
> A while back we added summarize versions of the svn_client_diff
[...]
> Here's a patch adding the --summarize option to svn diff, just so
> people can see what I'm talking about.
FWIW, I think this is a good thing to add, and the patch is a good start.
I remember that the original poster of this idea wanted a short option name
("svn diff -s") but I don't think that was appropriate in our sytem of options
being global across all commands.
Using this patch does show up some room for improvement, both in the patch and
in the API function implementation itself.
> $ svn diff --summarize
> svn: Summarizing diff can only compare repository to repository
That might be considered an annoying limitation (of the API).
> $ svn diff --summarize -r13000:18300 www
> D project_footer.html
> D bindings.html
[...]
> A merge-tracking/summit-survey.html
> A merge-tracking/design.html
> A merge-tracking/
> A logo/subversion_logo.svg
> M project_issues.html
[...]
> A httpd-win32.patch.txt
> MM project_faq.html
> M svn_1.1_releasenotes.html
> A validate.sh
> A svn_1.2_releasenotes.html
> A bugs.html
> A svn_1.3_releasenotes.html
> A hacking.html
> M security/CAN-2004-0749-advisory.txt
> M security/mod_authz_svn-copy-advisory.txt
> M security/CAN-2004-0413-advisory.txt
> M security.html
> M index.html
> M project_license.html
> M webdav-usage.html
> M _template.html
> A poole-response.html
> M project_tasks.html
> M /
The lack of any predictable order is annoying. (This is a general and
well-known problem, and will be addressed separately.)
The final entry listed is shown as "/", which is formed by the empty directory
name (meaning "www", expressed relative to itself) with a slash added by this
patch because it is a directoy name. I think this patch should probably take
special action to insert a dot before the slash ... or indeed call
svn_path_local_style() which may be wanted for other reasons too.
With multiple targets, we can't see which line of output applies to which target:
> $ svn diff --summarize -r18000:18100 subversion/svn*/
> M lock-cmd.c
> M main.c
> M svnserve.8
> M main.c
(Do those 'main.c' belong to svn or svnserve or ...?) This patch should output
the paths in the same way that plain 'svn diff' does, which is relative to the
current working directory:
> $ svn diff -r18000:18100 subversion/svn*/ | grep "^Index"
> Index: subversion/svn/lock-cmd.c
> Index: subversion/svnadmin/main.c
> Index: subversion/svnserve/svnserve.8
> Index: subversion/svnsync/main.c
Finally, and trivially,
> Index: subversion/svn/main.c
> ===================================================================
> + {"summarize", svn_cl__summarize, 0,
> + N_("show a summarization of the results")},
The noun you're looking for is "summary". (Who've you been listening to? :-)
- Julian
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Feb 1 02:50:07 2006