b.t.p.t.TestFileParentReconciliation(TestCaseWithRepository) : class documentation

Part of bzrlib.tests.per_repository_vf.test_check_reconcile View In Hierarchy

Tests for how reconcile corrects errors in parents of file versions.
Method make_populated_repository Create a new repository populated by the given factory.
Method add_revision Add a revision with a given inventory and parents to a repository.
Method make_one_file_inventory Make an inventory containing a version of a file with ID 'a-file'.
Method require_repo_suffers_text_parent_corruption Undocumented
Method file_parents Undocumented
Method assertFileVersionAbsent Undocumented
Method assertParentsMatch Undocumented
Method prepare_test_repository Prepare a repository to test with from the test scenario.
Method shas_for_versions_of_file Get the SHA-1 hashes of the versions of 'a-file' in the repository.
Method test_reconcile_behaviour Populate a repository and reconcile it, verifying the state before
Method test_check_behaviour Populate a repository and check it, and verify the output.
Method test_find_text_key_references Test that find_text_key_references finds erroneous references.
Method test__generate_text_key_index Test that the generated text key index has all entries.
def make_populated_repository(self, factory):
Create a new repository populated by the given factory.
def add_revision(self, repo, revision_id, inv, parent_ids):
Add a revision with a given inventory and parents to a repository.
Parametersrepoa repository.
revision_idthe revision ID for the new revision.
invan inventory (such as created by make_one_file_inventory).
parent_idsthe parents for the new revision.
def make_one_file_inventory(self, repo, revision, parents, inv_revision=None, root_revision=None, file_contents=None, make_file_version=True):
Make an inventory containing a version of a file with ID 'a-file'.

The file's ID will be 'a-file', and its filename will be 'a file name', stored at the tree root.

Parametersrepoa repository to add the new file version to.
revisionthe revision ID of the new inventory.
parentsthe parents for this revision of 'a-file'.
inv_revisionif not None, the revision ID to store in the inventory entry. Otherwise, this defaults to revision.
root_revisionif not None, the inventory's root.revision will be set to this.
file_contentsif not None, the contents of this file version. Otherwise a unique default (based on revision ID) will be generated.
def require_repo_suffers_text_parent_corruption(self, repo):
Undocumented
def file_parents(self, repo, revision_id):
Undocumented
def assertFileVersionAbsent(self, repo, revision_id):
Undocumented
def assertParentsMatch(self, expected_parents_for_versions, repo, when_description):
Undocumented
def prepare_test_repository(self):
Prepare a repository to test with from the test scenario.
ReturnsA repository, and the scenario instance.
def shas_for_versions_of_file(self, repo, versions):
Get the SHA-1 hashes of the versions of 'a-file' in the repository.
Parametersrepothe repository to get the hashes from.
versionsa list of versions to get hashes for.
ReturnsA dict of {version: hash}.
def test_reconcile_behaviour(self):
Populate a repository and reconcile it, verifying the state before and after.
def test_check_behaviour(self):
Populate a repository and check it, and verify the output.
def test_find_text_key_references(self):
Test that find_text_key_references finds erroneous references.
def test__generate_text_key_index(self):
Test that the generated text key index has all entries.
API Documentation for Bazaar, generated by pydoctor at 2019-09-18 00:32:59.