~ubuntu-branches/ubuntu/maverick/bzr/maverick

« back to all changes in this revision

Viewing changes to bzrlib/upgrade.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij
  • Date: 2010-03-24 22:27:38 UTC
  • mfrom: (1.4.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20100324222738-5lsc0gdzmtcdp1vp
Tags: 2.1.1-1
* Remove bob2 from uploaders. Closes: #573427
* New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005, 2008, 2009 Canonical Ltd
 
1
# Copyright (C) 2005, 2008, 2009, 2010 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
29
29
    def __init__(self, url, format=None):
30
30
        self.format = format
31
31
        self.bzrdir = BzrDir.open_unsupported(url)
 
32
        # XXX: Change to cleanup
 
33
        warning_id = 'cross_format_fetch'
 
34
        saved_warning = warning_id in ui.ui_factory.suppressed_warnings
32
35
        if isinstance(self.bzrdir, RemoteBzrDir):
33
36
            self.bzrdir._ensure_real()
34
37
            self.bzrdir = self.bzrdir._real_bzrdir
36
39
            raise errors.UpgradeReadonly
37
40
        self.transport = self.bzrdir.root_transport
38
41
        self.pb = ui.ui_factory.nested_progress_bar()
 
42
        ui.ui_factory.suppressed_warnings.add(warning_id)
39
43
        try:
40
44
            self.convert()
41
45
        finally:
42
46
            self.pb.finished()
 
47
            if not saved_warning:
 
48
                ui.ui_factory.suppressed_warnings.remove(warning_id)
43
49
 
44
50
    def convert(self):
45
51
        try: