~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/repository.py

  • Committer: Vincent Ladeuil
  • Date: 2012-01-05 16:19:30 UTC
  • mto: This revision was merged to the branch mainline in revision 6437.
  • Revision ID: v.ladeuil+lp@free.fr-20120105161930-bh6bwqnt9tvv902f
Tweak news entry to conflict on merge.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1293
1293
        """Returns the policy for making working trees on new branches."""
1294
1294
        return not self._transport.has('no-working-trees')
1295
1295
 
1296
 
    @needs_write_lock
1297
 
    def update_feature_flags(self, updated_flags):
1298
 
        """Update the feature flags for this branch.
1299
 
 
1300
 
        :param updated_flags: Dictionary mapping feature names to necessities
1301
 
            A necessity can be None to indicate the feature should be removed
1302
 
        """
1303
 
        self._format._update_feature_flags(updated_flags)
1304
 
        self.control_transport.put_bytes('format', self._format.as_string())
1305
 
 
1306
1296
 
1307
1297
class RepositoryFormatRegistry(controldir.ControlComponentFormatRegistry):
1308
1298
    """Repository format registry."""
1507
1497
            hook(params)
1508
1498
 
1509
1499
 
1510
 
class RepositoryFormatMetaDir(bzrdir.BzrFormat, RepositoryFormat):
 
1500
class RepositoryFormatMetaDir(bzrdir.BzrDirMetaComponentFormat, RepositoryFormat):
1511
1501
    """Common base class for the new repositories using the metadir layout."""
1512
1502
 
1513
1503
    rich_root_data = False
1524
1514
 
1525
1515
    def __init__(self):
1526
1516
        RepositoryFormat.__init__(self)
1527
 
        bzrdir.BzrFormat.__init__(self)
 
1517
        bzrdir.BzrDirMetaComponentFormat.__init__(self)
1528
1518
 
1529
1519
    def _create_control_files(self, a_bzrdir):
1530
1520
        """Create the required files and the initial control_files object."""
1569
1559
            raise errors.NoRepositoryPresent(a_bzrdir)
1570
1560
        return klass._find_format(format_registry, 'repository', format_string)
1571
1561
 
1572
 
    def check_support_status(self, allow_unsupported, recommend_upgrade=True,
1573
 
            basedir=None):
1574
 
        RepositoryFormat.check_support_status(self,
1575
 
            allow_unsupported=allow_unsupported, recommend_upgrade=recommend_upgrade,
1576
 
            basedir=basedir)
1577
 
        bzrdir.BzrFormat.check_support_status(self, allow_unsupported=allow_unsupported,
1578
 
            recommend_upgrade=recommend_upgrade, basedir=basedir)
1579
 
 
1580
1562
 
1581
1563
# formats which have no format string are not discoverable or independently
1582
1564
# creatable on disk, so are not registered in format_registry.  They're