You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Michael Lukashov <ic...@pochtamt.ru> on 2006/01/31 09:27:17 UTC

[PATCH] new configuration option 'human-timestamp-format-suffix'

   [[[
   new configuration option 'human-timestamp-format-suffix'

   * subversion/include/svn_config.h:  Added define
     SVN_CONFIG_OPTION_HUMAN_TIMESTAMP_FORMAT_SUFFIX
   * subversion/libsvn_subr/time.c
     (svn_time_to_cstring): Add new configuration 
     option 'human-timestamp-format-suffix'
   * subversion/libsvn_subr/config_file.c
     (svn_config_ensure): write default value of 'human-timestamp-format-suffix'
      to config file
   ]]]

Subversion translates keywords:
LastChangedDate, Date
using this constant format of a human explanatory part:
" (%a, %d %b %Y)"
This patch changes constant format to a configuration option.
It is now possible to change a value of 'human-timestamp-format-suffix' option, 
located in [miscellany] section of a config file.
If this option is not present, it defaults to a " (%a, %d %b %Y)" string.
If option value is an empty string, a human explanatory part will be an empty string.

Why should one bother to change this option?
You see, expansion of 'LastChangedDate, Date' keywords is affected by locale set on 
client's computer.
If locale isn't English (for example, Russian), expanded keyword looks like this:
LastChangedDate: 2005-12-16 16:42:25 +0300 (&#166;&#223;T&#194;, 16 &#166;+&#166;&#166;&#166;&#166; 2005) 
That is, Russian symbols are UTF-encoded. It is not acceptable in many cases.
I think it is useful to have an option that controls how 
'LastChangedDate, Date'
keywords are expanded.

Re: [PATCH] new configuration option 'human-timestamp-format-suffix'

Posted by "Peter N. Lundblad" <pe...@famlundblad.se>.
On Tue, 31 Jan 2006, Michael Lukashov wrote:

> Why should one bother to change this option? You see, expansion of
> 'LastChangedDate, Date' keywords is affected by locale set on client's
> computer. If locale isn't English (for example, Russian), expanded
> keyword looks like this: LastChangedDate: 2005-12-16 16:42:25 +0300
> (&#166;&#223;T&#194;, 16 &#166;+&#166;&#166;&#166;&#166; 2005)  That is,
> Russian symbols are UTF-encoded. It is not acceptable in many cases. I
> think it is useful to have an option that controls how 'LastChangedDate,
> Date' keywords are expanded.
>
The UTF8 problem is issue #2332.  I don't think adding this option is a
good idea, since it only solves part of the problem.  We also blindly put
UTF8 when you use the Id keyword (pathnames) and usernames.  Also, people
have asked for more options regarding the format of keywords, so if/when
we do something about this, it needs to be more flexible.

Thanks for the patch, anyway,
//Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org