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

Factor out a print-property-as-XML function [was: svn commit: r31978 - trunk/subversion/svnlook]

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Fri, 04 Jul 2008 12:43:38 +0100

On Wed, 2008-07-02 at 18:06 -0400, Karl Fogel wrote:
> Julian Foad <julianfoad_at_btopenworld.com> writes:
> > It's not a library function, it's local to the "svn" client. I didn't
> > think it was quite worth moving it into a library for this amount of
> > duplication. Want me to? (Uh, libsvn_client/cmdline.c ?)
>
> Oh, my bad, I got confused between 'svn' and 'svnlook'.
>
> But yeah, I think it's probably best to share it, via cmdline.c.

OK, here's a go at factoring out this print-a-property-as-XML function
"svn_cl__print_xml_prop()" function so that it can be shared with
"svnlook", by moving it into libsvn_client and calling it
"svn_client__print_xml_prop()".

I didn't put it in "cmdline.c" because it's not actually doing
command-line output, just forming XML in a string buffer, and generating
XML-formatting output is not specific to command-line clients.

So it's in a new file "subversion/libsvn_client/xml.c".

Making "svnlook" use this adds a dependency of svnlook on libsvn_client,
which I don't see as a problem, but I'd better mention it.

A review, anyone, please?

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-07-04 13:43:59 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.