/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: Andrew Bennetts
  • Date: 2008-08-07 00:25:38 UTC
  • mfrom: (3612 +trunk)
  • mto: This revision was merged to the branch mainline in revision 3613.
  • Revision ID: andrew.bennetts@canonical.com-20080807002538-mtl1fcgy2fdabha4
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2005 Canonical Ltd
 
1
# Copyright (C) 2005, 2008 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
51
51
                self.pb.note("This is a checkout. The branch (%s) needs to be "
52
52
                             "upgraded separately.",
53
53
                             branch.bzrdir.root_transport.base)
54
 
        except errors.NotBranchError:
 
54
            del branch
 
55
        except (errors.NotBranchError, errors.IncompatibleRepositories):
 
56
            # might not be a format we can open without upgrading; see e.g. 
 
57
            # https://bugs.launchpad.net/bzr/+bug/253891
55
58
            pass
56
59
        if not self.bzrdir.needs_format_conversion(self.format):
57
60
            raise errors.UpToDateFormat(self.bzrdir._format)
58
61
        if not self.bzrdir.can_convert_format():
59
 
            raise errors.BzrError("cannot upgrade from branch format %s" %
 
62
            raise errors.BzrError("cannot upgrade from bzrdir format %s" %
60
63
                           self.bzrdir._format)
61
64
        if self.format is None:
62
65
            target_format = BzrDirFormat.get_default_format()