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

Re: svn commit: r23307 - trunk/subversion/svn

From: Hyrum K. Wright <hyrum_wright_at_mail.utexas.edu>
Date: 2007-01-31 16:08:27 CET

Peter Lundblad wrote:
> Hyrum K. Wright writes:
>> Daniel Rall wrote:
>>> On Tue, 30 Jan 2007, hwright@tigris.org wrote:
>>> ...
>>>> --- trunk/subversion/svn/propget-cmd.c (original)
>>>> +++ trunk/subversion/svn/propget-cmd.c Tue Jan 30 14:56:23 2007
>>> ...
>>>> @@ -99,19 +100,40 @@
>>>>
>>>> if (propval != NULL)
>>>> {
>>>> - svn_string_t *printable_val = propval;
>>>> -
>>>> - /* If this is a special Subversion property, it is stored as
>>>> - UTF8 and LF, so convert to the native locale and eol-style. */
>>>> -
>>>> - if (svn_prop_needs_translation(pname_utf8))
>>>> - SVN_ERR(svn_subst_detranslate_string(&printable_val, propval,
>>>> - TRUE, pool));
>>>> + if (opt_state->xml)
>>>> + {
>>>> + svn_stringbuf_t *sb = NULL;
>>>> + char *revstr = apr_psprintf(pool, "%ld", rev);
>>> Why not use SVN_REVNUM_T_FMT here instead of inlining "ld"?
>> Nice catch. "ld" was being used in other places; I'll update those as well.
>>
> Please don't! The macro doesn't work with gettext, so a few years ago,
> we switched all uses to %ld. We can't change the type anyway.
> SVN_REVNUM_T_FMT was kept as a convenience for external library users.

I agree that we shouldn't be using SVN_REVNUM_T_FMT in places that break gettext.
 The line that Dan pointed out just converts the revision number to a string,
which is then used elsewhere. There are several places we do this, and I've
already made the change in r23309. If we still think that we shouldn't use
SVN_REVNUM_T_FMT in any of these locations, I'll be happy to revert.

-Hyrum

Received on Wed Jan 31 16:08:48 2007

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.