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