Re: [PATCH] add a test of svn_subst_translate_string2() to the subst_translate-test test suite

2011-02-13 Thread Daniel Shahaf
Danny Trebbien wrote on Sat, Feb 12, 2011 at 17:37:53 -0800: Attached is a patch that adds a new test to the subst_translate-test test suite (defined in `subversion/tests/libsvn_subr/subst_translate-test.c`). Also attached is a log message. The purpose of the new test is to test

Re: [PATCH] allow svnsync to translate non-UTF-8 log messages to UTF-8 (v. 5)

2011-02-13 Thread Daniel Shahaf
Danny Trebbien wrote on Sat, Feb 12, 2011 at 18:17:30 -0800: +def identity_copy(sbox): + copy UTF-8 svn:* props identically + orig_lc_all = locale.setlocale(locale.LC_ALL) + other_locales = [ English.1252, German.1252, French.1252, en_US.ISO-8859-1, en_GB.ISO-8859-1, de_DE.ISO-8859-1 ] +

Re: Best way to issue a warning in a C test

2011-02-13 Thread Philip Martin
Danny Trebbien dtrebb...@gmail.com writes: While I couldn't get SVN_TEST_SKIP2 to work because the availability of a locale cannot be tested at preprocessing time Actually, at compile time. Ah, yes. Perhaps you could extend svn_test_mode_t and add a new svn_test_skip_runtime mode: add

Re: Best way to issue a warning in a C test

2011-02-13 Thread Stefan Sperling
On Sun, Feb 13, 2011 at 12:09:32AM +, Philip Martin wrote: Philip Martin philip.mar...@wandisco.com writes: Danny Trebbien dtrebb...@gmail.com writes: I had to look that up, it's Esperanto.  Why do you want that one?  What are you testing?  It doesn't appear to be available on my

Re: [PATCH] add a test of svn_subst_translate_string2() to the subst_translate-test test suite

2011-02-13 Thread Branko Čibej
On 13.02.2011 09:33, Daniel Shahaf wrote: +strncpy(orig_lc_all, setlocale(LC_ALL, NULL), sizeof orig_lc_all); sizeof() with parens please. Why? They're not necessary unless the sizeof operator (not function!) is applied to a type name. There's no ambiguity here at all. -- Brane

Re: [PATCH] add a test of svn_subst_translate_string2() to the subst_translate-test test suite

2011-02-13 Thread Daniel Shahaf
Branko Čibej wrote on Sun, Feb 13, 2011 at 16:10:03 +0100: On 13.02.2011 09:33, Daniel Shahaf wrote: +strncpy(orig_lc_all, setlocale(LC_ALL, NULL), sizeof orig_lc_all); sizeof() with parens please. Why? They're not necessary unless the sizeof operator (not function!) is applied to a

Re: Best way to issue a warning in a C test

2011-02-13 Thread Danny Trebbien
Yes, I basically just want a non-UTF-8 locale.  Which one do you suggest? Danny, what is this new test for (sorry if this has been explained in some other thread -- I briefly checked and couldn't find any). Hi Stefan, This is for a new test. See:

[PATCH] extend the SVN_ERR macro with a cleanup statement parameter

2011-02-13 Thread Danny Trebbien
Attached is a small patch to extend the SVN_ERR macro with another parameter, a cleanup statement, that is executed before the error generated by EXPR (if not SVN_NO_ERROR) is returned. Also attached is a log message. I plan on using this in a test of svn_subst_translate_string2() in which I

Re: [PATCH] add a test of svn_subst_translate_string2() to the subst_translate-test test suite

2011-02-13 Thread Branko Čibej
On 13.02.2011 17:44, Daniel Shahaf wrote: Branko Čibej wrote on Sun, Feb 13, 2011 at 16:10:03 +0100: On 13.02.2011 09:33, Daniel Shahaf wrote: +strncpy(orig_lc_all, setlocale(LC_ALL, NULL), sizeof orig_lc_all); sizeof() with parens please. Why? They're not necessary unless the sizeof

RE: [PATCH] extend the SVN_ERR macro with a cleanup statement parameter

2011-02-13 Thread Bert Huijben
-Original Message- From: Danny Trebbien [mailto:dtrebb...@gmail.com] Sent: zondag 13 februari 2011 21:00 To: Subversion Development Subject: [PATCH] extend the SVN_ERR macro with a cleanup statement parameter Attached is a small patch to extend the SVN_ERR macro with another

Re: [PATCH] extend the SVN_ERR macro with a cleanup statement parameter

2011-02-13 Thread Branko Čibej
On 13.02.2011 21:28, Bert Huijben wrote: -Original Message- From: Danny Trebbien [mailto:dtrebb...@gmail.com] Sent: zondag 13 februari 2011 21:00 To: Subversion Development Subject: [PATCH] extend the SVN_ERR macro with a cleanup statement parameter Attached is a small patch to

Re: Best way to issue a warning in a C test

2011-02-13 Thread Stefan Sperling
On Sun, Feb 13, 2011 at 11:15:13AM -0800, Danny Trebbien wrote: Per Philip's suggestion, I have switched the test to trying a list of locales. While I have not tested it on Windows, I am using examples from MSDN verbatim. It should work. I also try the Windows-specific locale strings first

Re: Best way to issue a warning in a C test

2011-02-13 Thread Branko Čibej
On 13.02.2011 20:15, Danny Trebbien wrote: I also try the Windows-specific locale strings first because I know that a Linux system successfully ignores them. Does setlocale even have a real effect on Windows? Last time I looked, you couldn't change the per-process locale. -- Brane

Re: Best way to issue a warning in a C test

2011-02-13 Thread Danny Trebbien
I also try the Windows-specific locale strings first because I know that a Linux system successfully ignores them. Does setlocale even have a real effect on Windows? Last time I looked, you couldn't change the per-process locale. Yes. I have developed some websites in PHP on Windows where I

[PATCH] add a test of svn_subst_translate_string2() to the subst_translate-test test suite (v. 2)

2011-02-13 Thread Danny Trebbien
Attached is version 2 of the patch and log message. +    strncpy(orig_lc_all, setlocale(LC_ALL, NULL), sizeof orig_lc_all); sizeof() with parens please. Fixed. +    if ((! setlocale(LC_ALL, English.1252)) +        (! setlocale(LC_ALL, German.1252)) +        (! setlocale(LC_ALL,

Re: svn commit: r1069588 - in /subversion/trunk: subversion/tests/cmdline/diff_tests.py subversion/tests/cmdline/svntest/err.py subversion/tests/cmdline/svntest/verify.py tools/dev/gen-py-errors.py

2011-02-13 Thread Hyrum K Wright
On Sun, Feb 13, 2011 at 3:49 AM, Daniel Shahaf d...@daniel.shahaf.name wrote: hwri...@apache.org wrote on Thu, Feb 10, 2011 at 22:04:43 -: Added: subversion/trunk/tools/dev/gen-py-errors.py URL: http://svn.apache.org/viewvc/subversion/trunk/tools/dev/gen-py-errors.py?rev=1069588view=auto

[PATCH] allow svnsync to translate non-UTF-8 log messages to UTF-8 (v. 5.1)

2011-02-13 Thread Danny Trebbien
+def identity_copy(sbox): +  copy UTF-8 svn:* props identically +  orig_lc_all = locale.setlocale(locale.LC_ALL) +  other_locales = [ English.1252, German.1252, French.1252, en_US.ISO-8859-1, en_GB.ISO-8859-1, de_DE.ISO-8859-1 ] +  for other_locale in other_locales: +    try: +      

Re: [PATCH] Re: Regarding issue 3690 - Work in progress

2011-02-13 Thread Noorul Islam K M
Noorul Islam K M noo...@collab.net writes: Hyrum K Wright hy...@hyrumwright.org writes: On Tue, Feb 8, 2011 at 1:41 AM, Daniel Shahaf d...@daniel.shahaf.name wrote: Hyrum K Wright wrote on Mon, Feb 07, 2011 at 23:14:10 +: On Fri, Feb 4, 2011 at 4:36 PM, Noorul Islam K M