~debian-bazaar/bzr-mtn/unstable

« back to all changes in this revision

Viewing changes to __init__.py

  • Committer: Jelmer Vernooij
  • Date: 2011-03-12 18:06:09 UTC
  • Revision ID: jelmer@samba.org-20110312180609-aeadahbyxg0n042f
Implement .check_status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
    )
26
26
 
27
27
 
 
28
class MonotoneUnsupportedError(errors.UnsupportedFormatError):
 
29
 
 
30
    _fmt = ('Monotone branches are not yet supported. '
 
31
            'To convert monotone branches to Bazaar branches or vice versa, '
 
32
            'use bzr-fastimport. See http://bazaar-vcs.org/BzrMigration.')
 
33
 
 
34
    def __init__(self, format):
 
35
        errors.BzrError.__init__(self)
 
36
        self.format = format
 
37
 
 
38
 
28
39
class MonotoneDirFormat(controldir.ControlDirFormat):
29
40
    """Monotone directory format."""
30
41
 
40
51
    def is_supported(self):
41
52
        return False
42
53
 
43
 
    def open(self, transport, _found=False):
44
 
        """Open this directory."""
45
 
        raise errors.BzrCommandError(
46
 
            'Monotone branches are not yet supported. '
47
 
            'To convert monotone branches to Bazaar branches or vice versa, '
48
 
            'use bzr-fastimport. See http://bazaar-vcs.org/BzrMigration.')
 
54
    def check_status(self, allow_unsupported, recommend_upgrade=True,
 
55
           basedir=None):
 
56
        raise MonotoneUnsupportedError(self)
49
57
 
50
58
 
51
59
class MonotoneProber(controldir.Prober):