321
325
bzrdir.BzrDirFormat6)):
322
326
result = a_bzrdir.open_repository()
324
result = self._format.initialize(a_bzrdir)
328
result = self._format.initialize(a_bzrdir, shared=self.is_shared())
325
329
self.copy_content_into(result, revision_id, basis)
575
579
return self.control_files.get_transaction()
577
581
@needs_write_lock
582
def set_make_working_trees(self, new_value):
583
"""Set the policy flag for making working trees when creating branches.
585
This only applies to branches that use this repository.
587
The default is 'True'.
588
:param new_value: True to restore the default, False to disable making
591
# FIXME: split out into a new class/strategy ?
592
if isinstance(self._format, (RepositoryFormat4,
595
raise NotImplementedError(self.set_make_working_trees)
598
self.control_files._transport.delete('no-working-trees')
599
except errors.NoSuchFile:
602
self.control_files.put_utf8('no-working-trees', '')
604
def make_working_trees(self):
605
"""Returns the policy for making working trees on new branches."""
606
# FIXME: split out into a new class/strategy ?
607
if isinstance(self._format, (RepositoryFormat4,
611
return self.control_files._transport.has('no-working-trees')
578
614
def sign_revision(self, revision_id, gpg_strategy):
579
615
plaintext = Testament.from_revision(self, revision_id).as_short_text()
580
616
self.store_revision_signature(gpg_strategy, plaintext, revision_id)