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

Re: svn commit: r12837 - in trunk: doc/book/book subversion/clients/cmdline tools/client-side

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: 2005-01-25 20:46:50 CET

Peter N. Lundblad wrote:
> On Mon, 24 Jan 2005 julianfoad@tigris.org wrote:
[...]
>>+ svn_xml_make_open_tag (&sb, pool, svn_xml_protect_pcdata, "commit",
>>+ "revision",
>>+ apr_psprintf (pool, "%" SVN_REVNUM_T_FMT,
>
> We use %ld everywhere else, so why not here?

Hmm. You're pretty much right - tho only other places where we use it are in:

   contrib/client-side/svn-push/svn-push.c
   subversion/bindings/java/javahl/native/*.cpp (3 places)
   subversion/svnadmin/main.c

I believe the reason for not using it is because the localisation/translation
utility can't parse the macro substitution and string concatenation that
results from usage like:

   _("English text %" SVN_REVNUM_T_FMT " string continues").

However, in this instance, the string is not one that needs to be translated.
Do we wish to deprecate SVN_REVNUM_T_FMT? If not, I think we should continue
to use it where we can, though I will admit that the benefit of using it is
vastly diminished if it is only used in a few places.

>>+ /* "</entry>" */
>>+ svn_xml_make_close_tag (&sb, pool, "entry");
>>+ }
>>+
>
> This loop allocates memory, so it needs an iteration pool.

OK, I'll do that, and do the same to the non-XML function ("print_dirents")
from which I copied this.

In fact, this should probably print out each entry at the end of the loop like
"print_dirents" does, rather than accumulating the whole list before printing
anything. I'll do that too.

>>+ /* "</list>" */
>>+ svn_xml_make_close_tag (&sb, pool, "list");
>>+
>>+ return svn_cmdline_printf (pool, "%s", sb->data);
>
> This will convert UTF8->console encoding, which we don't want in this
> case. See error_checked_fputs in log-cmd.c.

Right - will do.

Thanks for the review.

- Julian

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Jan 25 20:48:39 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.