[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Unable to rename a directory from English to T.Chinese

From: plasma <plasma_at_ms9.hinet.net>
Date: 2005-02-22 16:18:44 CET

Hi all,

This problem was reported from a user, and I confirmed it.

The recipe:

  svnadmin create --fs-type fsfs SVN_ROOT
  svn co file://`pwd`/SVN_ROOT foo
  cd foo
  touch BugReport
  svn add BugReport
  svn commit -m "A new file"
  svn mv BugReport 'Bugㅞヘ캐'
  svn commit -m "Rename a file to TC name" # Works fine.
  svn rm 'Bugㅞヘ캐'
  svn commit -m "Remove a TC-named file"
  svn up
  svn mkdir BugReport
  svn commit -m "A new directory"
  svn mv BugReport 'Bugㅞヘ캐' # Rename a directory to TC name. It barks.

If a file's name is English, and renamed to Big5, it works just fine.
If do the same operation to a directory, it fails:

  plasma@plasmanb:~/tmp/xyz/foo(0)> svn mv BugReport 'Bugㅞヘ캐'
  subversion/libsvn_subr/utf.c:363: (apr_err=22)
  svn: Can't recode string

And there are two directories in the WC:

  plasma@plasmanb:~/tmp/xyz/foo(1)> ll
  total 6
  drwxrwxr-x 7 plasma plasma 512 2 22 23:14 .svn
  drwxrwxr-x 3 plasma plasma 512 2 22 23:14 Bugㅞヘ캐
  drwxrwxr-x 3 plasma plasma 512 2 22 23:14 BugReport

Since renaming a file works fine, I think it's a bug in Subversion.

My platform is FreeBSD, and the one who reported this problem uses
Linux. Both of us use Subversion 1.1.3. And locale settings from my
FreeBSD box:

  plasma@plasmanb:~/tmp/xyz/foo(0)> env | grep LC

Below is backtrace from gdb:

plasma@plasmanb:~/tmp/xyz/foo(0)> gdb svn
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for details.
This GDB was configured as "i386-marcel-freebsd"...
(gdb) directory ~/tmp/1.1.x
Source directories searched: /home/plasma/tmp/1.1.x:$cdir:$cwd
(gdb) b utf.c:363
No source file named utf.c.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (utf.c:363) pending.
(gdb) run mv BugReport 'Bugㅞヘ캐'
Starting program: /usr/local/bin/svn mv BugReport 'Bugㅞヘ캐'
Breakpoint 2 at 0x281a1c0e: file subversion/libsvn_subr/utf.c, line 363.
Pending breakpoint "utf.c:363" resolved

Breakpoint 2, convert_to_stringbuf (convset=0x80700d0, src_data=0x808d348 "Bug\217\212兩븃/.svn/lock", src_length=22,
    dest=0xbfbfe05c, pool=0x808d018) at subversion/libsvn_subr/utf.c:363
warning: Source file is more recent than executable.

363 return svn_error_create (apr_err, NULL, "Can't recode string");
(gdb) bt
#0 convert_to_stringbuf (convset=0x80700d0, src_data=0x808d348 "Bug\217\212兩븃/.svn/lock", src_length=22,
    dest=0xbfbfe05c, pool=0x808d018) at subversion/libsvn_subr/utf.c:363
#1 0x281a236a in convert_cstring (dest=0xbfbfe0fc, src=0x808d348 "Bug\217\212兩븃/.svn/lock", convset=0x80700d0,
    pool=0x808d018) at subversion/libsvn_subr/utf.c:551
#2 0x281a244a in svn_utf_cstring_to_utf8 (dest=0xbfbfe0fc, src=0x808d348 "Bug\217\212兩븃/.svn/lock", pool=0x808d018)
    at subversion/libsvn_subr/utf.c:574
#3 0x2819b655 in svn_path_cstring_to_utf8 (path_utf8=0xbfbfe0fc, path_apr=0x808d348 "Bug\217\212兩븃/.svn/lock",
    pool=0x808d018) at subversion/libsvn_subr/path.c:1250
#4 0x28193d6b in svn_io_copy_dir_recursively (src=0x80872b8 "BugReport/.svn", dst_parent=0x808ade8 "Bug\217\212兩븃",
    dst_basename=0x80872f0 ".svn", copy_perms=1, cancel_func=0x804fb50 <svn_cl__check_cancel>, cancel_baton=0x0,
    pool=0x8087018) at subversion/libsvn_subr/io.c:681
#5 0x28193f01 in svn_io_copy_dir_recursively (src=0x8074d18 "BugReport", dst_parent=0x8074fa8 "",
    dst_basename=0x8074eb0 "Bug\217\212兩븃", copy_perms=1, cancel_func=0x804fb50 <svn_cl__check_cancel>,
    cancel_baton=0x0, pool=0x8073018) at subversion/libsvn_subr/io.c:701
#6 0x280cbdf6 in copy_dir_administratively (src_path=0x8074d18 "BugReport", src_access=0x808aa60, dst_parent=0x8074f80,
    dst_basename=0x8074eb0 "Bug\217\212兩븃", cancel_func=0x804fb50 <svn_cl__check_cancel>, cancel_baton=0x0,
    notify_copied=0x8051e90 <notify>, notify_baton=0x8074dd8, pool=0x8073018) at subversion/libsvn_wc/copy.c:319
#7 0x280cc099 in svn_wc_copy (src_path=0x8074d18 "BugReport", dst_parent=0x8074f80,
    dst_basename=0x8074eb0 "Bug\217\212兩븃", cancel_func=0x804fb50 <svn_cl__check_cancel>, cancel_baton=0x0,
    notify_func=0x8051e90 <notify>, notify_baton=0x8074dd8, pool=0x8073018) at subversion/libsvn_wc/copy.c:389
#8 0x280a5f3b in wc_to_wc_copy (src_path=0x8074d18 "BugReport", dst_path=0x8074db8 "Bug\217\212兩븃", is_move=1,
    force=0, ctx=0x8073510, pool=0x8073018) at subversion/libsvn_client/copy.c:157
#9 0x280a80fe in setup_copy (commit_info=0xbfbfe3f0, src_path=0x8074d18 "BugReport", src_revision=0xbfbfe5ec,
    dst_path=0x8074db8 "Bug\217\212兩븃", is_move=1, force=0, ctx=0x8073510, pool=0x8073018)
    at subversion/libsvn_client/copy.c:1096
#10 0x280a8293 in svn_client_move (commit_info=0xbfbfe3f0, src_path=0x8074d18 "BugReport", src_revision=0xbfbfe5ec,
    dst_path=0x8074db8 "Bug\217\212兩븃", force=0, ctx=0x8073510, pool=0x8073018) at subversion/libsvn_client/copy.c:1151
#11 0x08051e12 in svn_cl__move (os=0x8073050, baton=0xbfbfe4e4, pool=0x8073018) at subversion/clients/cmdline/move-cmd.c:68
#12 0x08051376 in main (argc=4, argv=0xbfbfe6fc) at subversion/clients/cmdline/main.c:1332

If you need any further information, don't be hestitated to ask.


To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Tue Feb 22 16:20:24 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.