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

Re: "svnlook pget --revprop" not preserving revprop value

From: C. Michael Pilato <cmpilato_at_collab.net>
Date: 2005-04-28 21:38:11 CEST

"C. Michael Pilato" <cmpilato@collab.net> writes:

> John Belmonte <john@neggie.net> writes:
>
> > In 1.2rc2, "svnlook pget --revprop" doesn't appear to yield an
> > accurate revprop value:
> >
> > $ svnadmin create repo
> > $ echo '#!/bin/sh' > repo/hooks/pre-revprop-change
> > $ chmod +x repo/hooks/pre-revprop-change
> > $ REPO=file:///$PWD/repo
> > $ svn pset --revprop -r0 foo 'bar
> > ' $REPO
> > property 'foo' set on repository revision 0
> > $ svn pget --revprop -r0 foo $REPO
> > bar
> >
> > $ svnlook pget --revprop -r0 ./repo foo
> > bar
> > $ # note missing linefeed from svnlook
>
> This is intentional. 'svnlook pget' never adds an extra newline
> (because it aims to print raw property values). 'svn pget'
> adds an extra newline to the output just in case there isn't one at
> all, because it is aimed at human consumption.
>
> What bugs me is that I *thought* the --strict flag to 'svn pget' would
> make it behave in the same manner as 'svnlook pget', but that doesn't
> appear to be the case.

Aha. This looks necessary. Haven't tested it yet.

Index: propget-cmd.c
===================================================================
--- propget-cmd.c (revision 14457)
+++ propget-cmd.c (working copy)
@@ -125,7 +125,8 @@
           
           SVN_ERR (stream_write (out, printable_val->data,
                                  printable_val->len));
- SVN_ERR (stream_write (out, APR_EOL_STR, strlen (APR_EOL_STR)));
+ if (! opt_state->strict)
+ SVN_ERR (stream_write (out, APR_EOL_STR, strlen (APR_EOL_STR)));
         }
     }
   else /* operate on a normal, versioned property (not a revprop) */

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Thu Apr 28 22:20:27 2005

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.