~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/bzrdir.py

  • Committer: John Arbash Meinel
  • Date: 2010-01-13 16:23:07 UTC
  • mto: (4634.119.7 2.0)
  • mto: This revision was merged to the branch mainline in revision 4959.
  • Revision ID: john@arbash-meinel.com-20100113162307-0bs82td16gzih827
Update the MANIFEST.in file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
129
129
        return True
130
130
 
131
131
    def check_conversion_target(self, target_format):
 
132
        """Check that a bzrdir as a whole can be converted to a new format."""
 
133
        # The only current restriction is that the repository content can be 
 
134
        # fetched compatibly with the target.
132
135
        target_repo_format = target_format.repository_format
133
 
        source_repo_format = self._format.repository_format
134
 
        source_repo_format.check_conversion_target(target_repo_format)
 
136
        try:
 
137
            self.open_repository()._format.check_conversion_target(
 
138
                target_repo_format)
 
139
        except errors.NoRepositoryPresent:
 
140
            # No repo, no problem.
 
141
            pass
135
142
 
136
143
    @staticmethod
137
144
    def _check_supported(format, allow_unsupported,
3039
3046
                      new is _mod_branch.BzrBranchFormat8):
3040
3047
                    branch_converter = _mod_branch.Converter7to8()
3041
3048
                else:
3042
 
                    raise errors.BadConversionTarget("No converter", new)
 
3049
                    raise errors.BadConversionTarget("No converter", new,
 
3050
                        branch._format)
3043
3051
                branch_converter.convert(branch)
3044
3052
                branch = self.bzrdir.open_branch()
3045
3053
                old = branch._format.__class__
3548
3556
            if self._require_stacking:
3549
3557
                raise
3550
3558
 
 
3559
    def requires_stacking(self):
 
3560
        """Return True if this policy requires stacking."""
 
3561
        return self._stack_on is not None and self._require_stacking
 
3562
 
3551
3563
    def _get_full_stack_on(self):
3552
3564
        """Get a fully-qualified URL for the stack_on location."""
3553
3565
        if self._stack_on is None:
3860
3872
# The following format should be an alias for the rich root equivalent 
3861
3873
# of the default format
3862
3874
format_registry.register_metadir('default-rich-root',
3863
 
    'bzrlib.repofmt.pack_repo.RepositoryFormatKnitPack4',
3864
 
    help='Default format, rich root variant. (needed for bzr-svn and bzr-git).',
3865
 
    branch_format='bzrlib.branch.BzrBranchFormat6',
3866
 
    tree_format='bzrlib.workingtree.WorkingTreeFormat4',
 
3875
    'bzrlib.repofmt.groupcompress_repo.RepositoryFormat2a',
 
3876
    branch_format='bzrlib.branch.BzrBranchFormat7',
 
3877
    tree_format='bzrlib.workingtree.WorkingTreeFormat6',
3867
3878
    alias=True,
3868
 
    )
 
3879
    help='Same as 2a.')
 
3880
 
3869
3881
# The current format that is made on 'bzr init'.
3870
 
format_registry.set_default('pack-0.92')
 
3882
format_registry.set_default('2a')