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

Re: functional equivalent to "cvs rdiff -s"? [Feature Request]

From: Nathan Dauchy <ndauchy_at_hpti.com>
Date: 2004-08-19 23:31:33 CEST

Max Bowsher wrote:
> If you'd like to see a new feature, write up a description of how you
> would want it to behave (i.e. exactly what level of detail you would
> expect), and post here.
>

kfogel@collab.net wrote:
> I believe this idea has been discussed before as "svn diff -q"
> functionality. But I don't see any enhancement issue filed for it,
> so Nathan if you want to put your writeup in an issue, that would be
> great.
>

Max, Karl, and everyone else,

I don't know all the nuances of the interface design decisions to best
make this fit with the rest of Subversion, but here goes...

A "-s" ("--summarize") option should be added to the "svn diff"
capability. This will reduce the output to a single line for each file
or directory that has changed between two URL's. It should also work
for two revisions and a single URL. For consistency, I imagine this
would look similar to "svn status", but instead of operating on a
working copy, it would operate on two revisions in the repository.

Coupled with this should be "-q" ("--quiet") and "-v" ("--verbose")
options to display additional information. Verbose output with "-s"
should still only display a single line per file.

I think the following information would be helpful to include in the output:
* Whether the item is a file, directory, (or anything else?)
* Whether the change was a content or property change
* What was the revision prior to any changes
* What was the revision after all changes
* Who committed the last change

So, how would this look? Roughly following the "svn status" syntax,
here is a starting point:
First column says if the item was added, deleted, or otherwise changed
Second column determines if there were property changes
Third column says if the item is a directory, or otherwise not a file
Remaining fields are variable width and delimited by spaces:
(with -v) Last revision number prior to change
(with -v) Last changed revision number
(with -v) Author of last changed revision
Path, relative to the given URLs.

$ svn diff -s http://repos/tags/rel1 http://repos/tags/rel2
A /path/to/file1
MM /path/to/file2
A D /path/to/a_new_dir
D /path/to/file3

$ svn diff -s -v http://repos/tags/rel1 http://repos/tags/rel2
A 120 145 bob /path/to/file1
MM 100 111 joe /path/to/file2
A D 120 120 jane /path/to/a_new_dir
            80 80 bob /path/to/unchanged_file
D 101 130 bob /path/to/file3

Notes:
The -v option should list ALL files in either tag.
"last revision prior to change" for newly added files should be the
revision in which it was added. One should be able to checkout the
first listed revision of all the files (that don't have an "A" in the
first column) and get rel1. Similarly, "last changed revision"
for deleted files should be the revision in which it was deleted.
Checking out the 2nd listed revision of all files (without a "D" in the
first column) should be equivalent to checking out rel2.

Please let me know if any of the above isn't clear. I look forward to
reading other opinions on this functionality, and how the information
should be presented!

Thanks,
Nathan

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org
Received on Thu Aug 19 23:33:11 2004

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.