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

RFC: cmdline client property printing

From: <cmpilato_at_collab.net>
Date: 2003-03-17 23:53:42 CET

My mind has timed out on trying to solve what should be a fairly
trivial interface problem. So, I'm seeking advice. Here's my
dilemma.

Things I want to do:

   - be able to write property values to stdout so they can be
     redirected into file without getting mangled with extra linefeeds
     and such. this includes binary properties.

   - be able to handle multiple versioned paths (globs, or recursion)
     in a way that maintain usability. that is, whenever there is
     more than one property to print, a filename is printed with it so
     you know what goes with what.

Current behavior of 'svn pget':

   $ svn pget PROPNAME foo.c
   value of propname plus trailing newline
   $
   $ svn pget PROPNAME foo.c bar.c
   foo.c - value of propname plus trailing newline
   bar.c - this is a multiline
   property plus trailing newline
   $

Now, I'm convinced (thanks, Karl) that it's good to be able to see the
path with which a property is associated any time there is more than
one property to print. But I dislike the way that multi-line
properties foul things up. Further, I can't achieve both redirectable
property values and "looks good in the terminal" property values if
"looks good in the terminal" implies that a trailing newline is always
added so that you don't get this:

   $ svn pget PROPNAME foo.c
   value of propname$

The only thing I can think of to solve all my concerns is to change
pget output so that for multiple files it looks like this:

   ::: /path/to/file :::
   multi-line
   property value plus trailing newline

And then, to add a 'pcat' command that promises to preserve the binary
value of the properties. If used on one target and redirected, you'll
get *exactly* the right property value. If used on multiple targets,
you'll get *exactly* an ordered concatenation of the values of the
property on those targets. (This subcommand would not have a
--recursive flag since that would complicate the ordering promise).
My goal is to mimic 'cat' and 'svn cat' with these promises.

Thoughts?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Mon Mar 17 23:56:00 2003

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.