/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Jelmer Vernooij
  • Date: 2011-08-16 14:07:34 UTC
  • mto: This revision was merged to the branch mainline in revision 6085.
  • Revision ID: jelmer@samba.org-20110816140734-8n5xockzyav4mjwh
Format URLs in ``bzr upgrade`` before display.

Show diffs side-by-side

added added

removed removed

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