You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Rafael Garcia-Suarez <ra...@hexaflux.com> on 2003/02/25 10:49:40 UTC
--encoding global default
Is there a way to override globally the --encoding default value
for the svn commands that take a log message ?
If not, wouldn't it be a nice feature ? (use case : I work
under the C locale and write log messages in French)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default [PATCH]
Posted by Sander Roobol <ph...@wanadoo.nl>.
This patch has been filed as issue #1178.
Sander
On Tue, Feb 25, 2003 at 04:07:24PM +0100, Rafael Garcia-Suarez wrote:
> cmpilato@collab.net wrote:
> > I'd be cool with that.
> >
> > [miscellany]
> > log-encoding =
>
> Here's a patch against the 0.18 tarball.
> Note that I'm not familiar with the Source and with the Patching Habits.
> If you prefer something else, ask.
>
> Log message : well, uh,
>
> Implement a new configuration option "[miscellany]/log-encoding"
> to set a global default for the "--encoding" option of svn.
> [snip]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default [PATCH]
Posted by Branko Čibej <br...@xbc.nu>.
Rafael Garcia-Suarez wrote:
>I wrote:
>
>
>>cmpilato@collab.net wrote:
>>
>>
>>>I'd be cool with that.
>>>
>>> [miscellany]
>>> log-encoding =
>>>
>>>
>
>I *do* know that patches may wait for weeks in queues, so I apologize in
>advance for my pinging, but : is there a chance to get this one in 0.19 ?
>I already use it in production.
>
Hey, it's only been a week :-)
>>Here's a patch against the 0.18 tarball.
>>Note that I'm not familiar with the Source and with the Patching Habits.
>>If you prefer something else, ask.
>>
>>Log message : well, uh,
>>
>> Implement a new configuration option "[miscellany]/log-encoding"
>> to set a global default for the "--encoding" option of svn.
>>
And wile you're waiting, do please submit the log message in the
required format; it's described in HACKING. :-)
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default [PATCH]
Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
I wrote:
> cmpilato@collab.net wrote:
> > I'd be cool with that.
> >
> > [miscellany]
> > log-encoding =
I *do* know that patches may wait for weeks in queues, so I apologize in
advance for my pinging, but : is there a chance to get this one in 0.19 ?
I already use it in production.
> Here's a patch against the 0.18 tarball.
> Note that I'm not familiar with the Source and with the Patching Habits.
> If you prefer something else, ask.
>
> Log message : well, uh,
>
> Implement a new configuration option "[miscellany]/log-encoding"
> to set a global default for the "--encoding" option of svn.
[...]
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default [PATCH]
Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On Tuesday, February 25, 2003, at 10:07 AM, Rafael Garcia-Suarez wrote:
> cmpilato@collab.net wrote:
>> I'd be cool with that.
>>
>> [miscellany]
>> log-encoding =
>
> Here's a patch against the 0.18 tarball.
> Note that I'm not familiar with the Source and with the Patching
> Habits.
> If you prefer something else, ask.
this was committed, with minor formatting changes, in revision 5283.
-garrett
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default [PATCH]
Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
cmpilato@collab.net wrote:
> I'd be cool with that.
>
> [miscellany]
> log-encoding =
Here's a patch against the 0.18 tarball.
Note that I'm not familiar with the Source and with the Patching Habits.
If you prefer something else, ask.
Log message : well, uh,
Implement a new configuration option "[miscellany]/log-encoding"
to set a global default for the "--encoding" option of svn.
--- subversion/clients/cmdline/main.c.orig Tue Feb 25 15:08:13 2003
+++ subversion/clients/cmdline/main.c Tue Feb 25 15:44:41 2003
@@ -905,6 +905,13 @@ main (int argc, const char * const *argv
ctx.log_msg_baton = svn_cl__make_log_msg_baton (&opt_state, NULL,
ctx.config, pool);
+ if (!opt_state.encoding || !*opt_state.encoding) {
+ svn_config_get (cfg, &opt_state.encoding,
+ SVN_CONFIG_SECTION_MISCELLANY,
+ SVN_CONFIG_OPTION_LOG_ENCODING,
+ NULL);
+ }
+
/* Authentication set-up. */
{
const char *store_password_val = NULL;
--- subversion/libsvn_subr/config_file.c.orig Tue Feb 25 15:45:36 2003
+++ subversion/libsvn_subr/config_file.c Tue Feb 25 15:46:56 2003
@@ -777,7 +777,9 @@ svn_config_ensure (apr_pool_t *pool)
"# [miscellany]\n"
"### Set global-ignores to a set of whitespace-delimited globs\n"
"### which Subversion will ignore in its `status' output.\n"
- "# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#*"
+ "# global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#*\n"
+ "### Set log-encoding to the default encoding for log messages\n"
+ "# log-encoding = latin1\n"
"\n"
"### See http://subversion.tigris.org/issues/show_bug.cgi?id=668\n"
"### for what else will soon be customized in this file.\n";
--- subversion/include/svn_config.h.orig Tue Feb 25 14:55:53 2003
+++ subversion/include/svn_config.h Tue Feb 25 14:56:20 2003
@@ -73,6 +73,7 @@
#define SVN_CONFIG_OPTION_DIFF3_HAS_PROGRAM_ARG "diff3-has-program-arg"
#define SVN_CONFIG_SECTION_MISCELLANY "miscellany"
#define SVN_CONFIG_OPTION_GLOBAL_IGNORES "global-ignores"
+#define SVN_CONFIG_OPTION_LOG_ENCODING "log-encoding"
#define SVN_CONFIG_OPTION_TEMPLATE_ROOT "template-root"
End of Patch.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> Do you not have the necessary tools to use a UTF-8 locale?
>
> Would it not work to set LC_CTYPE to the desired locale when
> committing? (As long as all your filenames are ASCII, I don't see a
> problem.)
Sorry -- I should have said "I could do it, but it would be much more
inconvenient." Setting LC_CTYPE might work, I'll try it next time it
comes up.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Branko Čibej <br...@xbc.nu>.
Greg Hudson wrote:
>On Tue, 2003-02-25 at 13:21, Karl Fogel wrote:
>[About the command-line option for the log message encoding]
>
>
>>Without that option, I would be unable to commit a log message
>>containing, say, Brane's name. (His family name can't be encoded
>>properly in Latin-1, iirc.) I'm surely not the only person in that
>>boat.
>>
>>
>
>Do you not have the necessary tools to use a UTF-8 locale?
>
>Would it not work to set LC_CTYPE to the desired locale when
>committing? (As long as all your filenames are ASCII, I don't see a
>problem.)
>
>
Only on Unix. There are Win^H^H^Hsystems out there where you can't
change the locale on a per-process basis.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2003-02-25 at 13:21, Karl Fogel wrote:
[About the command-line option for the log message encoding]
> Without that option, I would be unable to commit a log message
> containing, say, Brane's name. (His family name can't be encoded
> properly in Latin-1, iirc.) I'm surely not the only person in that
> boat.
Do you not have the necessary tools to use a UTF-8 locale?
Would it not work to set LC_CTYPE to the desired locale when
committing? (As long as all your filenames are ASCII, I don't see a
problem.)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Greg Hudson <gh...@MIT.EDU> writes:
> I think so. And there is no compelling reason to provide any options to
> use encodings other than the native charset for any part of Subversion.
> (I think we already have a command-line option for the log message, but
> we shouldn't.)
Without that option, I would be unable to commit a log message
containing, say, Brane's name. (His family name can't be encoded
properly in Latin-1, iirc.) I'm surely not the only person in that
boat.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2003-02-25 at 12:52, cmpilato@collab.net wrote:
> Ah, true, true. So we declare that the config files must be in the
> native charset, right?
I think so. And there is no compelling reason to provide any options to
use encodings other than the native charset for any part of Subversion.
(I think we already have a command-line option for the log message, but
we shouldn't.)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by cm...@collab.net.
Greg Hudson <gh...@MIT.EDU> writes:
> On Tue, 2003-02-25 at 10:16, cmpilato@collab.net wrote:
> > > So, how should we figure out the encoding of the config file?
>
> > We just declare that it's UTF-8 and be done with (and make sure the
> > code is there to back that declaration).
>
> If we're mandating that people be able to edit UTF-8 text in order to
> use Subversion, what's the pointing of supporting native charsets at
> all?
>
> And why are we considering bending over backwards to support people who
> aren't setting up their environment properly?
Ah, true, true. So we declare that the config files must be in the
native charset, right?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Greg Hudson <gh...@MIT.EDU>.
On Tue, 2003-02-25 at 10:16, cmpilato@collab.net wrote:
> > So, how should we figure out the encoding of the config file?
> We just declare that it's UTF-8 and be done with (and make sure the
> code is there to back that declaration).
If we're mandating that people be able to edit UTF-8 text in order to
use Subversion, what's the pointing of supporting native charsets at
all?
And why are we considering bending over backwards to support people who
aren't setting up their environment properly?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Branko Čibej <br...@xbc.nu>.
cmpilato@collab.net wrote:
>mark benedetto king <mb...@boredom.org> writes:
>
>
>
>>So, how should we figure out the encoding of the config file?
>>
>>
>
>We just declare that it's UTF-8 and be done with (and make sure the
>code is there to back that declaration).
>
>
According to the code, the config files are assumed to be in the native
encoding.
--
Brane Čibej <br...@xbc.nu> http://www.xbc.nu/brane/
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by cm...@collab.net.
mark benedetto king <mb...@boredom.org> writes:
> So, how should we figure out the encoding of the config file?
We just declare that it's UTF-8 and be done with (and make sure the
code is there to back that declaration).
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by mark benedetto king <mb...@boredom.org>.
On Tue, Feb 25, 2003 at 02:52:22PM +0100, Rafael Garcia-Suarez wrote:
> cmpilato@collab.net wrote:
> > >
> > > You mean, put a permanent version of --encoding into the runtime
> > > config file?
> >
> > I'd be cool with that.
> >
> > [miscellany]
> > log-encoding =
>
> in ~/.subversion/config ? That's exactly what I was talking about.
>
So, how should we figure out the encoding of the config file?
--ben
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Rafael Garcia-Suarez <ra...@hexaflux.com>.
cmpilato@collab.net wrote:
> >
> > You mean, put a permanent version of --encoding into the runtime
> > config file?
>
> I'd be cool with that.
>
> [miscellany]
> log-encoding =
in ~/.subversion/config ? That's exactly what I was talking about.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by cm...@collab.net.
Ben Collins-Sussman <su...@collab.net> writes:
> Rafael Garcia-Suarez <ra...@hexaflux.com> writes:
>
> > Is there a way to override globally the --encoding default value
> > for the svn commands that take a log message ?
> >
> > If not, wouldn't it be a nice feature ? (use case : I work
> > under the C locale and write log messages in French)
>
> You mean, put a permanent version of --encoding into the runtime
> config file?
I'd be cool with that.
[miscellany]
log-encoding =
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Re: --encoding global default
Posted by Ben Collins-Sussman <su...@collab.net>.
Rafael Garcia-Suarez <ra...@hexaflux.com> writes:
> Is there a way to override globally the --encoding default value
> for the svn commands that take a log message ?
>
> If not, wouldn't it be a nice feature ? (use case : I work
> under the C locale and write log messages in French)
You mean, put a permanent version of --encoding into the runtime
config file?
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org