~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: Martin Pool
  • Date: 2006-06-15 05:36:34 UTC
  • mto: This revision was merged to the branch mainline in revision 1797.
  • Revision ID: mbp@sourcefrog.net-20060615053634-4fd52ba691855659
Clean up many exception classes.

Errors indicating a user error are now shown with is_user_error on the
exception; use this rather than hardcoding a list of exceptions that should be
handled this way.

Exceptions now inherit from BzrNewException where possible to use consistent
formatting method.

Remove rather obsolete docstring test on Branch.missing_revisions.

Remove dead code from find_merge_base.


Show diffs side-by-side

added added

removed removed

Lines of Context:
92
92
        """
93
93
        if not allow_unsupported and not format.is_supported():
94
94
            # see open_downlevel to open legacy branches.
95
 
            raise errors.UnsupportedFormatError(
96
 
                    'sorry, format %s not supported' % format,
97
 
                    ['use a different bzr version',
98
 
                     'or remove the .bzr directory'
99
 
                     ' and "bzr init" again'])
 
95
            raise errors.UnsupportedFormatError(format=format)
100
96
 
101
97
    def clone(self, url, revision_id=None, basis=None, force_new_repo=False):
102
98
        """Clone this bzrdir and its contents to url verbatim.
945
941
        except errors.NoSuchFile:
946
942
            raise errors.NotBranchError(path=transport.base)
947
943
        except KeyError:
948
 
            raise errors.UnknownFormatError(format_string)
 
944
            raise errors.UnknownFormatError(format=format_string)
949
945
 
950
946
    @classmethod
951
947
    def get_default_format(klass):