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

Re: [PATCH] svn diff --summarize

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2006-02-01 04:04:40 CET

Ben Collins-Sussman wrote:
> On 1/31/06, Julian Foad <julianfoad@btopenworld.com> wrote:
>
>>>$ svn diff --summarize
>>>svn: Summarizing diff can only compare repository to repository
>>
>>That might be considered an annoying limitation (of the API).
>
> Ha! What's the difference between 'svn diff --summarize' (with no
> explicit arguments) and 'svn status'? :-)

Weeelll, since you ask, that's actually a good question :-) (This example is a
contrived combination of screen lines from operations on two different
repositories.)

$ svn co -r18000 $URL wc
A wc/tools/dev/graph-dav-servers.py
A wc/tools/dev/stress.pl
A wc/news/d
A wc/news/f
A wc/news
  U wc
Checked out revision 18000.

$ svn merge -r18000:18100 wc/ wc/
A wc/tools/dev/graph-dav-servers.py
U wc/tools/dev/stress.pl
D wc/news/d
D wc/news/f
D wc/news

$ cd wc

$ svn status
A + tools/dev/graph-dav-servers.py
M tools/dev/stress.pl
D news
D news/d
D news/f

$ svn diff --summarize -r18000:18100
A tools/dev/graph-dav-servers.py
M tools/dev/stress.pl
D news/

Answer: The differences are:

* "svn diff --summarize" prints a slash after directory names, like "svn list"
but unlike most other "svn" commands (I think). I like the slash, and wonder
if we would consider adding it to the output of other commands. Maybe in svn
version 2.

* The number of columns used or reserved for status letters. It might be a
good idea to pick one of the layouts that is already in use, e.g. the
five-columns-before-filename as used by "co" and "merge", and thereby have some
columns spare for later extensions (as we have found valuable in other commands).

* "svn status" shows when an Added item is added with history. I'm not sure
that needs to be part of "diff --summarize" output, but it would be nice. This
sort of thing will become more important when we support true renames.

* "svn status" shows each individual item deleted when a directory is deleted;
"svn diff --summarize" just shows a single entry for the directory being
deleted. That's a problem with the behaviour of "svn diff". (At least I
believe there's a problem, if only that one might sometimes want to see all the
deleted items.)

My test didn't include property mods.

- 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 04:05:03 2006

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.