[Svnmerge] Patch for international support of SVN

book at cpan.org book at cpan.org
Tue Jan 30 07:23:07 PST 2007


Hi,

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

    Regards,

-- 
 Philippe "BooK" Bruhat

 The world is a gamble and the only "sure thing" is that cheaters eventually
 lose.                              (Moral from Groo The Wanderer #23 (Epic))



More information about the Svnmerge mailing list