~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-17 09:27:29 UTC
  • mto: This revision was merged to the branch mainline in revision 6085.
  • Revision ID: jelmer@samba.org-20110817092729-1sg4zs7ckiucqe6n
Use utf8 as encoding for urls passed to note().

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
 
20
20
from bzrlib import (
21
21
    errors,
22
 
    osutils,
23
22
    trace,
24
23
    ui,
25
24
    urlutils,
75
74
                ui.ui_factory.note(
76
75
                    'This is a checkout. The branch (%s) needs to be upgraded'
77
76
                    ' separately.' % (urlutils.unescape_for_display(
78
 
                        branch.user_url, osutils.get_terminal_encoding())))
 
77
                        branch.user_url, 'utf-8')))
79
78
            del branch
80
79
        except (errors.NotBranchError, errors.IncompatibleRepositories):
81
80
            # might not be a format we can open without upgrading; see e.g.
100
99
                           self.bzrdir._format)
101
100
        self.bzrdir.check_conversion_target(format)
102
101
        ui.ui_factory.note('starting upgrade of %s' % 
103
 
            urlutils.unescape_for_display(self.transport.base,
104
 
                osutils.get_terminal_encoding()))
 
102
            urlutils.unescape_for_display(self.transport.base, 'utf-8'))
105
103
 
106
104
        self.backup_oldpath, self.backup_newpath = self.bzrdir.backup_bzrdir()
107
105
        while self.bzrdir.needs_format_conversion(format):
280
278
        type_label = label or bzr_label
281
279
        child_pb.update("Upgrading %s" % (type_label), i+1, len(items))
282
280
        ui.ui_factory.note('Upgrading %s %s ...' % (type_label, 
283
 
            urlutils.unescape_for_display(location, osutils.get_terminal_encoding(),)))
 
281
            urlutils.unescape_for_display(location, 'utf-8'),))
284
282
        try:
285
283
            if not dry_run:
286
284
                cv = Convert(control_dir=control_dir, format=format)