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

Re: [PATCH] Issus 2332, "$Date$" Keywords always expand with their UTF-8 content

From: <kfogel_at_collab.net>
Date: 2005-12-06 21:29:53 CET

Hanjy <hanjingyu@gmail.com> writes:
> Now, i write a patch to repair it. I hope the issus is repaired in next
> release, I don't like to build the Subversion and TortoiseSVN by myself. :-(
> I didn't change the function svn_time_to_human_cstring in
> libsvn_subr/time.c, there are several places to call the function, I don't
> know whether these need to change. so I only changed the keyword_printf
> function in libsvn_subr/subst.c, I hope who can do a full repair than me.

I don't have time to review the substance of this patch right now
(sorry about that), but I do have a meta-comment to make:

Do you know how to generate a real patch, using 'svn diff'? Can you
please resubmit your patch that way? It would be *much* easier for
people to read in that format. Also, spell the Subject line
carefully: "[PATCH] Issue #2332, ...", because some people may use
automated filters to categorize your mail.

See http://subversion.tigris.org/mailing-list-guidelines.html#patches
for more guidelines on sending patches.

Best,
-Karl

-- 
www.collab.net  <>  CollabNet  |  Distributed Development On Demand
> Open file libsvn_subr/subst.c, find the:====================
> 
>         case 'D': /* long format of date of this revision */
>           if (date)
>             svn_stringbuf_appendcstr (value,
>                                       svn_time_to_human_cstring (date,
> pool));
>           break;
> 
> replace with: =====================
> 
>         case 'D': /* long format of date of this revision */
>           if (date)
>             {
>               const char human_timestamp_weekday_names [7][4] =
>                 {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
>               const char human_timestamp_month_names [12][4] =
>                 {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug",
>                  "Sep", "Oct", "Nov", "Dec"};
> 
>               apr_time_exp_t exploded_time;
>               const char *human;
> 
>               apr_time_exp_lt (&exploded_time, date);
> 
>               human = apr_psprintf (pool,  "%04d-%02d-%02d %02d:%02d:%02d
> %+03d%02d (%s, %.2d %s %.4d)",
>                                     exploded_time.tm_year + 1900,
>                                     exploded_time.tm_mon + 1,
>                                     exploded_time.tm_mday,
>                                     exploded_time.tm_hour,
>                                     exploded_time.tm_min,
>                                     exploded_time.tm_sec,
>                                     exploded_time.tm_gmtoff / (60 * 60),
>                                     (abs (exploded_time.tm_gmtoff) / 60) %
> 60,
> 
> human_timestamp_weekday_names[exploded_time.tm_wday],
>                                     exploded_time.tm_mday,
> 
> human_timestamp_month_names[exploded_time.tm_mon],
>                                     exploded_time.tm_year + 1900);
> 
>               svn_stringbuf_appendcstr (value, human);
>             }
>           break;
-- 
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Dec 6 23:05:03 2005

This is an archived mail posted to the Subversion Dev mailing list.