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

Re: [PATCH] fix svn cat to skip unversioned items V2.

From: Daniel Rall <dlr_at_finemaltcoding.com>
Date: 2005-05-24 20:00:32 CEST

On Mon, 2005-05-23 at 22:51 +0200, Peter N. Lundblad wrote:
>On Sun, 22 May 2005 vivek@collab.net wrote:
>
>> On Sat, 2005-05-21 at 03:38, Daniel Rall wrote:
>>
>> > Considering the case that a user makes a typo on the command-line while
>> casually perusing the repository, the behavior seems great. But considering
>> the case where the user is either gathering the contents of a few specific
>> files to exchange will a business partner, or scripting some operations
>> using the command-line client, should any of the requested files be cat'ed
>> when some of them cannot be?
>> Valid point. Should we have a command line option that tells we are
>> supposed to stop as soon as we get an error? Something like
>> stop-on-error?
>> I had version 1 of the patch reviewed by Peter and he thinks that other
>> commands should also be fixed. But considering the arguments raised by you I
>> would like to tackle them only if there is a consensus on the behavior.
>>
>I think we should just warn about targets for which a command obviously
>makes no sense. For example, cat should skip unversioned items,
>non-existent items and directories, like in the patch. This is also
>consistent with cat on my Linux system, FWIW. (That's GNU coreutils.) This
>makes it easier to use wildcard characters.

The thought of a command-line flag to toggle this sort of behavior makes
me uneasy, as it's yet one more option printed out by the command's help
which 90% of the user base will never use (and yet will be in their face
when they _are_ trying to figure out some functionality), and we'll be
stuck with maintaining. I rather like the ease of use offered by this
behavior, and would be fine with it being the default.

One usability problem that I did see with this implementation is that
the warning messages about files/dirs which were ignored can easily
scroll off of the screen. Since files/dirs are processed in the order
specified on the command-line, if an unversioned file is listed before a
versioned file, the warning message corresponding to the unversioned
file will be printed, then scroll off the screen if the subsequent
versioned file has any bulk to its contents. It might be better to keep
a list of the unversioned files or directories which need warning
messages printed for them, then dump those messages at the end. Just a
thought for the user experience, anyhow...

Also, I was curious whether you're planning on building this behavior
into the command-line client incrementally, on a per-operation basis
(e.g. first svn cat, then svn foo, etc.), or figuring out which
operations this behavior applies to, and committing to change them all
for a given release (e.g. 1.3).

- Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue May 24 20:02:47 2005

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