~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repofmt/pack_repo.py

  • Committer: Robert Collins
  • Date: 2008-01-02 22:30:46 UTC
  • mto: (3221.11.1 StackableBranch)
  • mto: This revision was merged to the branch mainline in revision 3226.
  • Revision ID: robertc@robertcollins.net-20080102223046-h8nxufr1v21pnei2
* A new repository format 'development' has been added. This format will
  represent the latest 'in-progress' format that the bzr developers are
  interested in getting early-adopter testing and feedback on.
  ``doc/developers/development-repo.txt`` has detailed information.
  (Robert Collins)

Show diffs side-by-side

added added

removed removed

Lines of Context:
2237
2237
    def get_format_description(self):
2238
2238
        """See RepositoryFormat.get_format_description()."""
2239
2239
        return "Packs containing knits with rich root support\n"
 
2240
 
 
2241
 
 
2242
class RepositoryFormatPackDevelopment0(RepositoryFormatPack):
 
2243
    """A no-subtrees development repository.
 
2244
 
 
2245
    This format should be retained until the second release after bzr 1.0.
 
2246
 
 
2247
    No changes to the disk behaviour from pack-0.92.
 
2248
    """
 
2249
 
 
2250
    repository_class = KnitPackRepository
 
2251
    _commit_builder_class = PackCommitBuilder
 
2252
    _serializer = xml5.serializer_v5
 
2253
 
 
2254
    def _get_matching_bzrdir(self):
 
2255
        return bzrdir.format_registry.make_bzrdir('development0')
 
2256
 
 
2257
    def _ignore_setting_bzrdir(self, format):
 
2258
        pass
 
2259
 
 
2260
    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
 
2261
 
 
2262
    def get_format_string(self):
 
2263
        """See RepositoryFormat.get_format_string()."""
 
2264
        return "Bazaar development format 0 (needs bzr.dev from before 1.1)\n"
 
2265
 
 
2266
    def get_format_description(self):
 
2267
        """See RepositoryFormat.get_format_description()."""
 
2268
        return ("Development repository format, currently the same as "
 
2269
            "pack-0.92\n")
 
2270
 
 
2271
    def check_conversion_target(self, target_format):
 
2272
        pass
 
2273
 
 
2274
 
 
2275
class RepositoryFormatPackDevelopment0Subtree(RepositoryFormatPack):
 
2276
    """A subtrees development repository.
 
2277
 
 
2278
    This format should be retained until the second release after bzr 1.0.
 
2279
 
 
2280
    No changes to the disk behaviour from pack-0.92-subtree.
 
2281
    """
 
2282
 
 
2283
    repository_class = KnitPackRepository
 
2284
    _commit_builder_class = PackRootCommitBuilder
 
2285
    rich_root_data = True
 
2286
    supports_tree_reference = True
 
2287
    _serializer = xml7.serializer_v7
 
2288
 
 
2289
    def _get_matching_bzrdir(self):
 
2290
        return bzrdir.format_registry.make_bzrdir(
 
2291
            'development0-subtree')
 
2292
 
 
2293
    def _ignore_setting_bzrdir(self, format):
 
2294
        pass
 
2295
 
 
2296
    _matchingbzrdir = property(_get_matching_bzrdir, _ignore_setting_bzrdir)
 
2297
 
 
2298
    def check_conversion_target(self, target_format):
 
2299
        if not target_format.rich_root_data:
 
2300
            raise errors.BadConversionTarget(
 
2301
                'Does not support rich root data.', target_format)
 
2302
        if not getattr(target_format, 'supports_tree_reference', False):
 
2303
            raise errors.BadConversionTarget(
 
2304
                'Does not support nested trees', target_format)
 
2305
            
 
2306
    def get_format_string(self):
 
2307
        """See RepositoryFormat.get_format_string()."""
 
2308
        return ("Bazaar development format 0 with subtree support "
 
2309
            "(needs bzr.dev from before 1.1)\n")
 
2310
 
 
2311
    def get_format_description(self):
 
2312
        """See RepositoryFormat.get_format_description()."""
 
2313
        return ("Development repository format, currently the same as "
 
2314
            "pack-0.92-subtree\n")
 
2315
 
 
2316