1765
1767
def get_commit_builder(self, branch, parents, config, timestamp=None,
1766
1768
timezone=None, committer=None, revprops=None,
1767
1769
revision_id=None, lossy=False):
1768
# FIXME: It ought to be possible to call this without immediately
1769
# triggering _ensure_real. For now it's the easiest thing to do.
1771
real_repo = self._real_repository
1772
builder = real_repo.get_commit_builder(branch, parents,
1773
config, timestamp=timestamp, timezone=timezone,
1774
committer=committer, revprops=revprops,
1775
revision_id=revision_id, lossy=lossy)
1770
"""Obtain a CommitBuilder for this repository.
1772
:param branch: Branch to commit to.
1773
:param parents: Revision ids of the parents of the new revision.
1774
:param config: Configuration to use.
1775
:param timestamp: Optional timestamp recorded for commit.
1776
:param timezone: Optional timezone for timestamp.
1777
:param committer: Optional committer to set for commit.
1778
:param revprops: Optional dictionary of revision properties.
1779
:param revision_id: Optional revision id.
1780
:param lossy: Whether to discard data that can not be natively
1781
represented, when pushing to a foreign VCS
1783
if self._fallback_repositories and not self._format.supports_chks:
1784
raise errors.BzrError("Cannot commit directly to a stacked branch"
1785
" in pre-2a formats. See "
1786
"https://bugs.launchpad.net/bzr/+bug/375013 for details.")
1787
if self._format.rich_root_data:
1788
commit_builder_kls = vf_repository.VersionedFileRootCommitBuilder
1790
commit_builder_kls = vf_repository.VersionedFileCommitBuilder
1791
result = commit_builder_kls(self, parents, config,
1792
timestamp, timezone, committer, revprops, revision_id,
1794
self.start_write_group()
1778
1797
def add_fallback_repository(self, repository):
1779
1798
"""Add a repository to use for looking up data not held locally.
1994
2013
if self._real_repository is not None:
1995
2014
self._real_repository.refresh_data()
2015
# Refresh the parents cache for this object
2016
self._unstacked_provider.disable_cache()
2017
self._unstacked_provider.enable_cache()
1997
2019
def revision_ids_to_search_result(self, result_set):
1998
2020
"""Convert a set of revision ids to a graph SearchResult."""