You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by fu...@apache.org on 2021/03/16 07:07:56 UTC
svn commit: r1887704 - in /subversion/trunk/subversion:
libsvn_fs_fs/verify.c po/de.po po/sv.po
Author: futatuki
Date: Tue Mar 16 07:07:55 2021
New Revision: 1887704
URL: http://svn.apache.org/viewvc?rev=1887704&view=rev
Log:
Follow up to r1866587, r1866588: Unbreak msgid.
* subversion/libsvn_fs_fs/verify.c (compare_p2l_to_rev):
Convert entry::number into C string before composing an error message and
use the %s format specifier on composition of it.
* subversion/po/de.po, subversion/po/sv.po ():
Fix a msgid and its msgstr corresponding to the changes on r1866587,
r1866588 and above.
Modified:
subversion/trunk/subversion/libsvn_fs_fs/verify.c
subversion/trunk/subversion/po/de.po
subversion/trunk/subversion/po/sv.po
Modified: subversion/trunk/subversion/libsvn_fs_fs/verify.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_fs_fs/verify.c?rev=1887704&r1=1887703&r2=1887704&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_fs_fs/verify.c (original)
+++ subversion/trunk/subversion/libsvn_fs_fs/verify.c Tue Mar 16 07:07:55 2021
@@ -691,17 +691,20 @@ compare_p2l_to_rev(svn_fs_t *fs,
* during later stages of the verification process. */
if ( (entry->type == SVN_FS_FS__ITEM_TYPE_CHANGES)
!= (entry->item.number == SVN_FS_FS__ITEM_INDEX_CHANGES))
- return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
- NULL,
- _("p2l index entry for changes in"
- " revision r%ld is item"
- " %"APR_UINT64_T_FMT
- " of type %u at offset %s"),
- entry->item.revision,
- entry->item.number,
- (unsigned int)entry->type,
- apr_off_t_toa(pool, offset));
-
+ {
+ const char *num_str = apr_psprintf(pool,
+ "%" APR_UINT64_T_FMT,
+ entry->item.number);
+ return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
+ NULL,
+ _("p2l index entry for changes in"
+ " revision r%ld is item %s"
+ " of type %u at offset %s"),
+ entry->item.revision,
+ num_str,
+ (unsigned int)entry->type,
+ apr_off_t_toa(pool, offset));
+ }
/* Check contents. */
if (entry->type == SVN_FS_FS__ITEM_TYPE_UNUSED)
{
Modified: subversion/trunk/subversion/po/de.po
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/po/de.po?rev=1887704&r1=1887703&r2=1887704&view=diff
==============================================================================
--- subversion/trunk/subversion/po/de.po [UTF-8] (original)
+++ subversion/trunk/subversion/po/de.po [UTF-8] Tue Mar 16 07:07:55 2021
@@ -6562,7 +6562,7 @@ msgstr "P2L-Indexeintrag für Revision r
#: ../libsvn_fs_fs/verify.c:696
#, fuzzy, c-format
-msgid "p2l index entry for changes in revision r%ld is item %ld of type %d at offset %s"
+msgid "p2l index entry for changes in revision r%ld is item %s of type %u at offset %s"
msgstr "P2L-Indexeintrag für Revision r%ld ist nicht zusammenhängend zwischen Offsets %s und %s"
#: ../libsvn_fs_util/fs-util.c:164
Modified: subversion/trunk/subversion/po/sv.po
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/po/sv.po?rev=1887704&r1=1887703&r2=1887704&view=diff
==============================================================================
--- subversion/trunk/subversion/po/sv.po [UTF-8] (original)
+++ subversion/trunk/subversion/po/sv.po [UTF-8] Tue Mar 16 07:07:55 2021
@@ -6854,8 +6854,8 @@ msgstr "p2l-indexpost för revision r%ld
#: ../libsvn_fs_fs/verify.c:696
#, c-format
-msgid "p2l index entry for changes in revision r%ld is item %ld of type %d at offset %s"
-msgstr "p2l-indexpost för ändringar i revision r%ld är objekt %ld av typ %d på position %s"
+msgid "p2l index entry for changes in revision r%ld is item %s of type %u at offset %s"
+msgstr "p2l-indexpost för ändringar i revision r%ld är objekt %s av typ %u på position %s"
#: ../libsvn_fs_util/fs-util.c:164
msgid "Filesystem object has not been opened yet"
Re: svn commit: r1887704 - in /subversion/trunk/subversion:
libsvn_fs_fs/verify.c po/de.po po/sv.po
Posted by Nathan Hartman <ha...@gmail.com>.
On Thu, May 6, 2021 at 1:50 PM Daniel Shahaf <d....@daniel.shahaf.name> wrote:
> Nathan Hartman wrote on Thu, 06 May 2021 17:31 +00:00:
> > On Tue, Mar 16, 2021 at 3:08 AM <fu...@apache.org> wrote:
> > > @@ -691,17 +691,20 @@ compare_p2l_to_rev(svn_fs_t *fs,
> > > * during later stages of the verification process. */
> > > if ( (entry->type == SVN_FS_FS__ITEM_TYPE_CHANGES)
> > > != (entry->item.number ==
> SVN_FS_FS__ITEM_INDEX_CHANGES))
> > > - return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
> > > - NULL,
> > > - _("p2l index entry for changes
> in"
> > > - " revision r%ld is item"
> > > - " %"APR_UINT64_T_FMT
> > > - " of type %u at offset %s"),
> > > - entry->item.revision,
> > > - entry->item.number,
> > > - (unsigned int)entry->type,
> > > - apr_off_t_toa(pool, offset));
> > > -
> > > + {
> > > + const char *num_str = apr_psprintf(pool,
> > > + "%" APR_UINT64_T_FMT,
> > > + entry->item.number);
> > > + return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
> > > + NULL,
> > > + _("p2l index entry for changes
> in"
> > > + " revision r%ld is item %s"
> > > + " of type %u at offset %s"),
> > > + entry->item.revision,
> > > + num_str,
> > > + (unsigned int)entry->type,
> > > + apr_off_t_toa(pool, offset));
> > > + }
> > > /* Check contents. */
> > > if (entry->type == SVN_FS_FS__ITEM_TYPE_UNUSED)
> > > {
> >
> >
> > I must be missing something obvious, but I don't see what was broken
> > about the way entry->item.number was formatted before?
>
> The i18n tooling that extracts _("foo" "bar") string literals for
> translation doesn't handle strings with macro expansions [1], so we jump
> through the hoops of using %s instead.
>
> [1]
> https://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings,
> grep for «MYPRId64».
>
Ah, thank you. That makes much more sense now.
Nathan
Re: svn commit: r1887704 - in /subversion/trunk/subversion: libsvn_fs_fs/verify.c po/de.po po/sv.po
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Nathan Hartman wrote on Thu, 06 May 2021 17:31 +00:00:
> On Tue, Mar 16, 2021 at 3:08 AM <fu...@apache.org> wrote:
> > @@ -691,17 +691,20 @@ compare_p2l_to_rev(svn_fs_t *fs,
> > * during later stages of the verification process. */
> > if ( (entry->type == SVN_FS_FS__ITEM_TYPE_CHANGES)
> > != (entry->item.number == SVN_FS_FS__ITEM_INDEX_CHANGES))
> > - return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
> > - NULL,
> > - _("p2l index entry for changes in"
> > - " revision r%ld is item"
> > - " %"APR_UINT64_T_FMT
> > - " of type %u at offset %s"),
> > - entry->item.revision,
> > - entry->item.number,
> > - (unsigned int)entry->type,
> > - apr_off_t_toa(pool, offset));
> > -
> > + {
> > + const char *num_str = apr_psprintf(pool,
> > + "%" APR_UINT64_T_FMT,
> > + entry->item.number);
> > + return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
> > + NULL,
> > + _("p2l index entry for changes in"
> > + " revision r%ld is item %s"
> > + " of type %u at offset %s"),
> > + entry->item.revision,
> > + num_str,
> > + (unsigned int)entry->type,
> > + apr_off_t_toa(pool, offset));
> > + }
> > /* Check contents. */
> > if (entry->type == SVN_FS_FS__ITEM_TYPE_UNUSED)
> > {
>
>
> I must be missing something obvious, but I don't see what was broken
> about the way entry->item.number was formatted before?
The i18n tooling that extracts _("foo" "bar") string literals for
translation doesn't handle strings with macro expansions [1], so we jump
through the hoops of using %s instead.
[1] https://www.gnu.org/software/gettext/manual/gettext.html#Preparing-Strings, grep for «MYPRId64».
Re: svn commit: r1887704 - in /subversion/trunk/subversion:
libsvn_fs_fs/verify.c po/de.po po/sv.po
Posted by Nathan Hartman <ha...@gmail.com>.
On Tue, Mar 16, 2021 at 3:08 AM <fu...@apache.org> wrote:
> @@ -691,17 +691,20 @@ compare_p2l_to_rev(svn_fs_t *fs,
> * during later stages of the verification process. */
> if ( (entry->type == SVN_FS_FS__ITEM_TYPE_CHANGES)
> != (entry->item.number == SVN_FS_FS__ITEM_INDEX_CHANGES))
> - return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
> - NULL,
> - _("p2l index entry for changes in"
> - " revision r%ld is item"
> - " %"APR_UINT64_T_FMT
> - " of type %u at offset %s"),
> - entry->item.revision,
> - entry->item.number,
> - (unsigned int)entry->type,
> - apr_off_t_toa(pool, offset));
> -
> + {
> + const char *num_str = apr_psprintf(pool,
> + "%" APR_UINT64_T_FMT,
> + entry->item.number);
> + return svn_error_createf(SVN_ERR_FS_INDEX_CORRUPTION,
> + NULL,
> + _("p2l index entry for changes in"
> + " revision r%ld is item %s"
> + " of type %u at offset %s"),
> + entry->item.revision,
> + num_str,
> + (unsigned int)entry->type,
> + apr_off_t_toa(pool, offset));
> + }
> /* Check contents. */
> if (entry->type == SVN_FS_FS__ITEM_TYPE_UNUSED)
> {
I must be missing something obvious, but I don't see what was broken
about the way entry->item.number was formatted before?
Thanks,
Nathan
Re: svn commit: r1887704 - in /subversion/trunk/subversion:
libsvn_fs_fs/verify.c po/de.po po/sv.po
Posted by Yasuhito FUTATSUKI <fu...@yf.bsdclub.org>.
On 2021/05/06 13:01, Jun Omae wrote:
> Hi,
>
> On Tue, Mar 16, 2021 at 4:07 PM <fu...@apache.org> wrote:
>>
>> Author: futatuki
>> Date: Tue Mar 16 07:07:55 2021
>> New Revision: 1887704
>>
>> URL: http://svn.apache.org/viewvc?rev=1887704&view=rev
>> Log:
>> Follow up to r1866587, r1866588: Unbreak msgid.
>>
>> * subversion/libsvn_fs_fs/verify.c (compare_p2l_to_rev):
>> Convert entry::number into C string before composing an error message and
>> use the %s format specifier on composition of it.
>>
>> * subversion/po/de.po, subversion/po/sv.po ():
>> Fix a msgid and its msgstr corresponding to the changes on r1866587,
>> r1866588 and above.
>
> It seems that r1866587 in the message is incorrect. It might be
> actually r1865987.
Yes, indeed. Even r1866587 is not our project's. I fixed it.
Thank you for the report.
Cheers,
--
Yasuhito FUTATSUKI <fu...@yf.bsclub.org>
Re: svn commit: r1887704 - in /subversion/trunk/subversion:
libsvn_fs_fs/verify.c po/de.po po/sv.po
Posted by Jun Omae <ju...@gmail.com>.
Hi,
On Tue, Mar 16, 2021 at 4:07 PM <fu...@apache.org> wrote:
>
> Author: futatuki
> Date: Tue Mar 16 07:07:55 2021
> New Revision: 1887704
>
> URL: http://svn.apache.org/viewvc?rev=1887704&view=rev
> Log:
> Follow up to r1866587, r1866588: Unbreak msgid.
>
> * subversion/libsvn_fs_fs/verify.c (compare_p2l_to_rev):
> Convert entry::number into C string before composing an error message and
> use the %s format specifier on composition of it.
>
> * subversion/po/de.po, subversion/po/sv.po ():
> Fix a msgid and its msgstr corresponding to the changes on r1866587,
> r1866588 and above.
It seems that r1866587 in the message is incorrect. It might be
actually r1865987.
--
Jun Omae <ju...@gmail.com> (大前 潤)
Re: svn commit: r1887704 - in /subversion/trunk/subversion:
libsvn_fs_fs/verify.c po/de.po po/sv.po
Posted by Jun Omae <ju...@gmail.com>.
Hi,
On Tue, Mar 16, 2021 at 4:07 PM <fu...@apache.org> wrote:
>
> Author: futatuki
> Date: Tue Mar 16 07:07:55 2021
> New Revision: 1887704
>
> URL: http://svn.apache.org/viewvc?rev=1887704&view=rev
> Log:
> Follow up to r1866587, r1866588: Unbreak msgid.
>
> * subversion/libsvn_fs_fs/verify.c (compare_p2l_to_rev):
> Convert entry::number into C string before composing an error message and
> use the %s format specifier on composition of it.
>
> * subversion/po/de.po, subversion/po/sv.po ():
> Fix a msgid and its msgstr corresponding to the changes on r1866587,
> r1866588 and above.
It seems that r1866587 in the message is incorrect. It might be
actually r1865987.
--
Jun Omae <ju...@gmail.com> (大前 潤)