[Svnmerge] Patch for international support of SVN

Thomas Heller theller at ctypes.org
Tue Jan 30 12:50:50 PST 2007


Giovanni Bajo schrieb:
> On 1/30/2007 4:23 PM, book at cpan.org wrote:
> 
>> I just tried svnmerge for the first time (yeah, they removed the .py on
>> Debian), but it wasn't very successful:
>> 
>>     $ svnmerge init -v -v
>>     svn propget --strict "svnmerge-integrated" "."
>>     svnmerge: calculate head path for the branch
>>     svn info "."
>>     Traceback (most recent call last):
>>       File "/usr/bin/svnmerge", line 1946, in ?
>>         main(sys.argv[1:])
>>       File "/usr/bin/svnmerge", line 1886, in main
>>         cf_head, cf_rev =3D get_copyfrom(branch_dir)
>>       File "/usr/bin/svnmerge", line 764, in get_copyfrom
>>         repos_path =3D target_to_repos_relative_path(dir)
>>       File "/usr/bin/svnmerge", line 754, in target_to_repos_relative_path
>>         root =3D get_repo_root(target)
>>       File "/usr/bin/svnmerge", line 726, in get_repo_root
>>         url =3D target_to_url(dir)
>>       File "/usr/bin/svnmerge", line 714, in target_to_url
>>         return info["URL"]
>>     KeyError: 'URL'
>> 
>> Apparently, svnmerge hates me because I'm French:
>> 
>>     $ printenv LC_ALL
>>     fr_FR.UTF-8
>>     $ LC_ALL=C svnmerge init
>>     property 'svnmerge-integrated' set on '.'
>> 
>> Here's a quick and dirty patch that works for me:
>> 
>> Index: svnmerge.py
>> ===================================================================
>> --- svnmerge.py	(revision 23287)
>> +++ svnmerge.py	(working copy)
>> @@ -206,6 +206,7 @@
>>      optionally split by lines (if split_lines is True). Raise a LaunchError
>>      exception if the exit code of the process is non-zero (failure)."""
>>      if os.name not in ['nt', 'os2']:
>> +        cmd = "LC_ALL=C " + cmd
>>          p = popen2.Popen4(cmd)
>>          p.tochild.close()
>>          if split_lines:
>> 
>> It was done against the HEAD of
>> http://svn.collab.net/repos/svn/trunk/contrib/client-side
> 
> That's weird since svnmerge already contains this code:
> 
> # We expect non-localized output from SVN
> os.environ["LC_MESSAGES"] = "C"
> 
> To the best of my understing SVN/APR uses LC_MESSAGES to decide how to 
> localize messages. Any clue why that does not work for you?

It seems that's not true.  Quick test (Win XP):

C:\svn\theller\ctypeslib>set LC_MESSAGES=C
C:\svn\theller\ctypeslib>set LC_ALL=fr_FR.UTF-8
C:\svn\theller\ctypeslib>svn --version
svn, version 1.3.2 (r19776)
    compilé May 26 2006, 13:10:00

Copyright (C) 2000-2006 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet (http://www.Collab.Net/).

Les modules d'accès à un dépôt (RA) suivants sont disponibles :

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
  - handles 'http' scheme
  - handles 'https' scheme
* ra_svn : Module pour accéder à un dépôt avec le protocole réseau propre de svn
  - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
  - handles 'file' scheme


C:\svn\theller\ctypeslib>

Thomas




More information about the Svnmerge mailing list