~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Shannon Weyrick
  • Date: 2011-11-04 13:40:04 UTC
  • mfrom: (6238 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6256.
  • Revision ID: weyrick@mozek.us-20111104134004-033t2wqhc3ydzm0a
Merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
    ui,
24
24
    urlutils,
25
25
    )
26
 
from bzrlib.bzrdir import (
27
 
    BzrDir,
 
26
from bzrlib.controldir import (
 
27
    ControlDir,
28
28
    format_registry,
29
29
    )
30
30
from bzrlib.i18n import gettext
54
54
        if control_dir is not None:
55
55
            self.bzrdir = control_dir
56
56
        else:
57
 
            self.bzrdir = BzrDir.open_unsupported(url)
 
57
            self.bzrdir = ControlDir.open_unsupported(url)
58
58
        if isinstance(self.bzrdir, RemoteBzrDir):
59
59
            self.bzrdir._ensure_real()
60
60
            self.bzrdir = self.bzrdir._real_bzrdir
139
139
    :param dry_run: show what would happen but don't actually do any upgrades
140
140
    :return: the list of exceptions encountered
141
141
    """
142
 
    control_dirs = [BzrDir.open_unsupported(url)]
 
142
    control_dirs = [ControlDir.open_unsupported(url)]
143
143
    attempted, succeeded, exceptions = smart_upgrade(control_dirs,
144
144
        format, clean_up=clean_up, dry_run=dry_run)
145
145
    if len(attempted) > 1:
284
284
        try:
285
285
            if not dry_run:
286
286
                cv = Convert(control_dir=control_dir, format=format)
 
287
        except errors.UpToDateFormat, ex:
 
288
            ui.ui_factory.note(str(ex))
 
289
            succeeded.append(control_dir)
 
290
            continue
287
291
        except Exception, ex:
288
292
            trace.warning('conversion error: %s' % ex)
289
293
            exceptions.append(ex)