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

Re: [PATCH] Fix issue #2809

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 27 Jun 2008 11:40:55 -0700

On Thu, 2008-06-26 at 18:31 +0530, Senthil Kumaran S wrote:
> I am attaching a patch along with this email, which fixes issue #2809, ie.,
> adding support '--xml' support for 'svnlook plist'.
>
> This patch passes all 'make *check'.
>
> [[[
> Fix issue #2809: svnlook proplist output should be machine parsable (e.g. XML)

Hi Senthil. That's great.

>From reading the patch and the rest of the log message, I see that this
patch leave the regular output just how it was, and adds an "--xml"
option for giving XML output when the user wants it, which is the
solution suggested in the issue tracker. It would be good to say this in
the log message summary paragraph so that the reader does not have to go
and investigate.

For a rev-prop, "svnlook" outputs an element called <target> without an
indication of the revision number, where "svn" outputs an element like
<revprops rev="1">:

> $ bin/svnlook pl --xml --revprop -r 1 obj-dir/svn-test-work/repositories/prop_tests-1/
> <?xml version="1.0"?>
> <properties>
> <target>
> <property
> name="svn:log">Log message for revision 1.</property>
> <property
> name="svn:author">jrandom</property>
> <property
> name="svn:date">2008-05-29T17:57:40.166685Z</property>
> </target>
> </properties>

> $ bin/svn pl --xml --revprop -r 1 obj-dir/svn-test-work/working_copies/prop_tests-1/
> <?xml version="1.0"?>
> <properties>
> <revprops
> rev="1">
> <property
> name="svn:log"/>
> <property
> name="svn:author"/>
> <property
> name="svn:date"/>
> </revprops>
> </properties>

Is there a reason for this difference?

There's one warning when I build with this patch:

subversion/svnlook/main.c:1548: warning: no previous prototype for
'print_xml_prop'

This is an observation for a separate improvement that is outside the
scope of your patch: "svn plist --revprop" requires that a revision
number is specified; "svnlook" should do the same.

Thanks.
- Julian

> * subversion/svnlook/main.c
> (): Include svn_xml.h, svn_base64.h.
> (enum): Add svnlook__xml_opt.
> (options_table, cmd_table, svnlook_opt_state): Add new option for --xml.
> (print_xml_prop): New function to print props in xml which is same as
> svn_cl__print_xml_prop.
> (do_plist): Accept opt_state for xml and throw output in xml if opted.
> (subcommand_plist): Call do_plist with xml option state.
> (main): Add a case to see whether user provided --xml.
>
> Patch by: stylesen
> ]]]

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org
Received on 2008-06-27 20:41:19 CEST

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.