trac-ticketlinks / trac /

Diff from to

File trac/

 from trac.util import copytree, create_file, get_pkginfo, makedirs
 from trac.util.compat import any
 from trac.util.concurrency import threading
-from trac.util.text import exception_to_unicode, printerr, printout
+from trac.util.text import exception_to_unicode, path_to_unicode, printerr, \
+                           printout
 from trac.util.translation import _, N_
 from trac.versioncontrol import RepositoryManager
 from trac.web.href import Href
     def _do_hotcopy(self, dest):
         if os.path.exists(dest):
             raise TracError(_("hotcopy can't overwrite existing '%(dest)s'",
-                              dest=dest))
+                              dest=path_to_unicode(dest)))
         import shutil
         # Bogus statement to lock the database while copying files
             printout(_('Hotcopying %(src)s to %(dst)s ...', 
-                       src=self.env.path, dst=dest))
+                       src=path_to_unicode(self.env.path),
+                       dst=path_to_unicode(dest)))
             db_str = self.env.config.get('trac', 'database')
             prefix, db_path = db_str.split(':', 1)
             if prefix == 'sqlite':
                     if src in err:
                         printerr('  %s' % err)
-                        printerr("  %s: '%s'" % (err, src))
+                        printerr("  %s: '%s'" % (err, path_to_unicode(src)))
             # Unlock database
         printout(_("Upgrade done.\n\n"
                    "You may want to upgrade the Trac documentation now by "
                    "running:\n\n  trac-admin %(path)s wiki upgrade",
-                   path=self.env.path))
+                   path=path_to_unicode(self.env.path)))