b.t.t.TestTreeTransform(tests.TestCaseWithTransport) : class documentation

Part of bzrlib.tests.test_transform View In Hierarchy

No class docstring
Method setUp Undocumented
Method get_transform Undocumented
Method get_transform_for_sha1_test Undocumented
Method test_existing_limbo Undocumented
Method test_existing_pending_deletion Undocumented
Method test_build Undocumented
Method test_apply_informs_tree_of_observed_sha1 Undocumented
Method test_create_file_caches_sha1 Undocumented
Method test__apply_insertions_updates_sha1 Undocumented
Method test_new_file_caches_sha1 Undocumented
Method test_cancel_creation_removes_observed_sha1 Undocumented
Method test_create_files_same_timestamp Undocumented
Method test_change_root_id Undocumented
Method test_change_root_id_add_files Undocumented
Method test_add_two_roots Undocumented
Method test_retain_existing_root Undocumented
Method test_retain_existing_root_added_file Undocumented
Method test_add_unversioned_root Undocumented
Method test_remove_root_fixup Undocumented
Method test_fixup_new_roots_permits_empty_tree Undocumented
Method test_apply_retains_root_directory Undocumented
Method test_apply_retains_file_id Undocumented
Method test_hardlink Undocumented
Method test_convenience Undocumented
Method test_tree_reference Undocumented
Method test_conflicts Undocumented
Method test_conflict_on_case_insensitive Undocumented
Method test_conflict_on_case_insensitive_existing Undocumented
Method test_resolve_case_insensitive_conflict Undocumented
Method test_resolve_checkout_case_conflict Undocumented
Method test_apply_case_conflict Ensure that a transform with case conflicts can always be applied
Method test_case_insensitive_limbo Undocumented
Method test_adjust_path_updates_child_limbo_names Undocumented
Method test_add_del Undocumented
Method test_unversioning Undocumented
Method test_name_invariants Undocumented
Method test_both_rename Undocumented
Method test_both_rename2 Undocumented
Method test_both_rename3 Undocumented
Method test_move_dangling_ie Undocumented
Method test_replace_dangling_ie Undocumented
Method test_symlinks Undocumented
Method test_symlinks_unicode Undocumented
Method test_unable_create_symlink Undocumented
Method get_conflicted Undocumented
Method test_conflict_resolution Undocumented
Method test_cook_conflicts Undocumented
Method test_string_conflicts Undocumented
Method prepare_wrong_parent_kind Undocumented
Method test_find_conflicts_wrong_parent_kind Undocumented
Method test_resolve_conflicts_wrong_existing_parent_kind Undocumented
Method test_resolve_conflicts_wrong_new_parent_kind Undocumented
Method test_resolve_conflicts_wrong_parent_kind_unversioned Undocumented
Method test_resolve_conflicts_missing_parent Undocumented
Method test_moving_versioned_directories Undocumented
Method test_moving_root Undocumented
Method test_renames Undocumented
Method test_rename_fails Undocumented
Method test_set_executability_order Ensure that executability behaves the same, no matter what order.
Method test_preserve_mode File mode is preserved when replacing content
Method test__set_mode_stats_correctly _set_mode stats to determine file mode.
Method test_iter_changes Undocumented
Method test_iter_changes_new Undocumented
Method test_iter_changes_modifications Undocumented
Method test_iter_changes_modified_bleed Undocumented
Method test_iter_changes_move_missing Test moving ids with no files around
Method test_iter_changes_pointless Ensure that no-ops are not treated as modifications
Method test_rename_count Undocumented
Method test_change_parent Ensure that after we change a parent, the results are still right.
Method test_cancel_parent Cancelling a parent doesn't cause deletion of a non-empty directory
Method test_adjust_and_cancel Make sure adjust_path keeps track of limbo children properly
Method test_noname_contents TreeTransform should permit deferring naming files.
Method test_noname_contents_nested TreeTransform should permit deferring naming files.
Method test_reuse_name Avoid reusing the same limbo name for different files
Method test_reuse_when_first_moved Don't avoid direct paths when it is safe to use them
Method test_reuse_after_cancel Don't avoid direct paths when it is safe to use them
Method test_finalize_order Finalize must be done in child-to-parent order
Method test_cancel_with_cancelled_child_should_succeed Undocumented
Method test_rollback_on_directory_clash Undocumented
Method test_two_directories_clash Undocumented
Method test_two_directories_clash_finalize Undocumented
Method test_file_to_directory Undocumented
Method test_file_to_symlink Undocumented
Method test_dir_to_file Undocumented
Method test_dir_to_hardlink Undocumented
Method test_no_final_path Undocumented
Method test_create_from_tree Undocumented
Method test_create_from_tree_bytes Provided lines are used instead of tree content.
Method test_create_from_tree_symlink Undocumented
Method _test_symlinks Undocumented

Inherited from TestCaseWithTransport:

Method get_vfs_only_server See TestCaseWithMemoryTransport.
Method make_branch_and_tree Create a branch on the transport and a tree locally.
Method assertIsDirectory Assert that relpath within transport is a directory.
Method assertTreesEqual Check that left and right have the same content and properties.
Method disable_missing_extensions_warning Some tests expect a precise stderr content.

Inherited from TestCaseInTempDir (via TestCaseWithTransport):

Method check_file_contents Undocumented
Method makeAndChdirToTestDir See TestCaseWithMemoryTransport.makeAndChdirToTestDir().
Method deleteTestDir Undocumented
Method build_tree Build a test tree according to a pattern.
Method assertInWorkingTree Assert whether path or paths are in the WorkingTree
Method assertNotInWorkingTree Assert whether path or paths are not in the WorkingTree
Method _getTestDirPrefix Undocumented

Inherited from TestCaseWithMemoryTransport (via TestCaseWithTransport, TestCaseInTempDir):

Method __init__ Undocumented
Method get_transport Return a writeable transport.
Method get_readonly_transport Return a readonly transport for the test scratch space
Method create_transport_readonly_server Create a transport server from class defined at init.
Method get_readonly_server Get the server instance for the readonly transport
Method get_readonly_url Get a URL for the readonly transport.
Method get_server Get the read/write server instance.
Method get_url Get a URL (or maybe a path) for the readwrite transport.
Method get_vfs_only_url Get a URL (or maybe a path for the plain old vfs transport.
Method make_branch Create a branch on the transport at relpath.
Method get_default_format Undocumented
Method resolve_format Resolve an object to a ControlDir format object.
Method make_bzrdir Undocumented
Method make_repository Create a repository on our default transport at relpath.
Method make_smart_server Undocumented
Method make_branch_and_memory_tree Create a branch on the default transport and a MemoryTree for it.
Method make_branch_builder Undocumented
Method overrideEnvironmentForTesting Undocumented
Method setup_smart_server_with_call_log Sets up a smart server as the transport server with a call log.
Method reset_smart_call_log Undocumented
Method _adjust_url Get a URL (or maybe a path) for the readwrite transport.
Method _create_safety_net Make a fake bzr directory.
Method _check_safety_net Check that the safety .bzr directory have not been touched.
Method _make_test_root Undocumented

Inherited from TestCase (via TestCaseWithTransport, TestCaseInTempDir, TestCaseWithMemoryTransport):

Method debug Undocumented
Method discardDetail Extend the addDetail, getDetails api so we can remove a detail.
Method install_counter_hook Install a counting hook.
Method disable_directory_isolation Turn off directory isolation checks.
Method enable_directory_isolation Enable directory isolation checks.
Method permit_dir Permit a directory to be used by this test. See permit_url.
Method permit_url Declare that url is an ok url to use in this test.
Method permit_source_tree_branch_repo Permit the source tree bzr is running from to be opened.
Method record_directory_isolation Gather accessed directories to permit later access.
Method start_server Start transport_server for this test.
Method assertEqual Undocumented
Method assertEqualDiff Assert two texts are equal, if not raise an exception.
Method assertEqualMode Undocumented
Method assertEqualStat assert that expected and actual are the same stat result.
Method assertLength Assert that obj_with_len is of length length.
Method assertLogsError Assert that func(*args, **kwargs) quietly logs a specific error.
Method assertPositive Assert that val is greater than 0.
Method assertNegative Assert that val is less than 0.
Method assertStartsWith Undocumented
Method assertEndsWith Asserts that s ends with suffix.
Method assertContainsRe Assert that a contains something matching a regular expression.
Method assertNotContainsRe Assert that a does not match a regular expression
Method assertContainsString Undocumented
Method assertNotContainsString Undocumented
Method assertSubset Assert that every entry in sublist is present in superlist.
Method assertListRaises Fail unless excClass is raised when the iterator from func is used.
Method assertRaises Assert that a callable raises a particular exception.
Method assertIs Undocumented
Method assertIsNot Undocumented
Method assertTransportMode Fail if a path does not have mode "mode".
Method assertIsSameRealPath Fail if path1 and path2 points to different files
Method assertIsInstance Fail if obj is not an instance of kls
Method assertFileEqual Fail if path does not contain 'content'.
Method assertDocstring Fail if obj does not have expected_docstring
Method failUnlessExists Undocumented
Method assertPathExists Fail unless path or paths, which may be abs or relative, exist.
Method failIfExists Undocumented
Method assertPathDoesNotExist Fail if path or paths, which may be abs or relative, exist.
Method applyDeprecated Call a deprecated callable without warning the user.
Method callCatchWarnings Call a callable that raises python warnings.
Method callDeprecated Assert that a callable is deprecated in a particular way.
Method thisFailsStrictLockCheck It is known that this test would fail with -Dstrict_locks.
Method overrideAttr Overrides an object attribute restoring it after the test.
Method overrideEnv Set an environment variable, and reset it after the test.
Method recordCalls Monkeypatch in a wrapper that will record calls.
Method knownFailure Declare that this test fails for a known reason
Method time Run callable and accrue the time it takes to the benchmark time.
Method log Undocumented
Method get_log Get a unicode string containing the log from bzrlib.trace.
Method requireFeature This test requires a specific feature is available.
Method run_bzr Invoke bzr, as if it were run from the command line.
Method run_bzr_error Run bzr, and check that stderr contains the supplied regexes
Method run_bzr_subprocess Run bzr in a subprocess for testing.
Method start_bzr_subprocess Start bzr in a subprocess for testing.
Method get_source_path Return the path of the directory containing bzrlib.
Method get_bzr_path Return the path of the 'bzr' executable for this test suite.
Method finish_bzr_subprocess Finish the execution of process.
Method check_tree_shape Compare a tree to a list of expected names.
Method apply_redirected Call callable with redirected std io pipes.
Method reduceLockdirTimeout Reduce the default lock timeout for the duration of the test, so that
Method make_utf8_encoded_stringio Return a StringIOWrapper instance, that will encode Unicode
Method disable_verb Disable a smart server verb for one test.
Method _install_config_stats_hooks Install config hooks to count hook calls.
Method _clear_debug_flags Prevent externally set debug flags affecting tests.
Method _clear_hooks Undocumented
Method _silenceUI Turn off UI for duration of test
Method _check_locks Check that all lock take/release actions have been paired.
Method _track_locks Track lock activity during tests.
Method _lock_acquired Undocumented
Method _lock_released Undocumented
Method _lock_broken Undocumented
Method _preopen_isolate_transport Check that all transport openings are done in the test work area.
Method _preopen_isolate_url Undocumented
Method _track_transports Install checks for transport usage.
Method _ndiff_strings Return ndiff between two strings containing lines.
Method _capture_deprecation_warnings A helper for callDeprecated and applyDeprecated.
Method _startLogFile Setup a in-memory target for bzr and testcase log messages
Method _finishLogFile Flush and dereference the in-memory log for this testcase
Method _cleanEnvironment Undocumented
Method _restoreHooks Undocumented
Method _suppress_log Remove the log info from details.
Method _do_skip Undocumented
Static Method _do_known_failure Undocumented
Static Method _do_not_applicable Undocumented
Static Method _report_skip Override the default _report_skip.
Static Method _report_expected_failure Strip the log.
Static Method _do_unsupported_or_skip Undocumented
Method _run_bzr_autosplit Run bazaar command line, splitting up a string command line.
Method _run_bzr_core Undocumented
Method _add_subprocess_log Undocumented
Method _subprocess_log_cleanup Undocumented
Method _popen Place a call to Popen.
def setUp(self):
def get_transform(self):
def get_transform_for_sha1_test(self):
def test_existing_limbo(self):
def test_existing_pending_deletion(self):
def test_build(self):
def test_apply_informs_tree_of_observed_sha1(self):
def test_create_file_caches_sha1(self):
def test__apply_insertions_updates_sha1(self):
def test_new_file_caches_sha1(self):
def test_cancel_creation_removes_observed_sha1(self):
def test_create_files_same_timestamp(self):
def test_change_root_id(self):
def test_change_root_id_add_files(self):
def test_add_two_roots(self):
def test_retain_existing_root(self):
def test_retain_existing_root_added_file(self):
def test_add_unversioned_root(self):
def test_remove_root_fixup(self):
def test_fixup_new_roots_permits_empty_tree(self):
def test_apply_retains_root_directory(self):
def test_apply_retains_file_id(self):
def test_hardlink(self):
def test_convenience(self):
def test_tree_reference(self):
def test_conflicts(self):
def test_conflict_on_case_insensitive(self):
def test_conflict_on_case_insensitive_existing(self):
def test_resolve_case_insensitive_conflict(self):
def test_resolve_checkout_case_conflict(self):
def test_apply_case_conflict(self):
Ensure that a transform with case conflicts can always be applied
def test_case_insensitive_limbo(self):
def test_adjust_path_updates_child_limbo_names(self):
def test_add_del(self):
def test_unversioning(self):
def test_name_invariants(self):
def test_both_rename(self):
def test_both_rename2(self):
def test_both_rename3(self):
def test_move_dangling_ie(self):
def test_replace_dangling_ie(self):
def _test_symlinks(self, link_name1, link_target1, link_name2, link_target2):
def test_symlinks(self):
def test_symlinks_unicode(self):
def test_unable_create_symlink(self):
def get_conflicted(self):
def test_conflict_resolution(self):
def test_cook_conflicts(self):
def test_string_conflicts(self):
def prepare_wrong_parent_kind(self):
def test_find_conflicts_wrong_parent_kind(self):
def test_resolve_conflicts_wrong_existing_parent_kind(self):
def test_resolve_conflicts_wrong_new_parent_kind(self):
def test_resolve_conflicts_wrong_parent_kind_unversioned(self):
def test_resolve_conflicts_missing_parent(self):
def test_moving_versioned_directories(self):
def test_moving_root(self):
def test_renames(self):
def test_rename_fails(self):
def test_set_executability_order(self):
Ensure that executability behaves the same, no matter what order.

- create file and set executability simultaneously
- create file and set executability afterward
- unsetting the executability of a file whose executability has not been
declared should throw an exception (this may happen when a
merge attempts to create a file with a duplicate ID)
def test_preserve_mode(self):
File mode is preserved when replacing content
def test__set_mode_stats_correctly(self):
_set_mode stats to determine file mode.
def test_iter_changes(self):
def test_iter_changes_new(self):
def test_iter_changes_modifications(self):
def test_iter_changes_modified_bleed(self):
def test_iter_changes_move_missing(self):
Test moving ids with no files around
def test_iter_changes_pointless(self):
Ensure that no-ops are not treated as modifications
def test_rename_count(self):
def test_change_parent(self):
Ensure that after we change a parent, the results are still right.

Renames and parent changes on pending transforms can happen as part of conflict resolution, and are explicitly permitted by the TreeTransform API.

This test ensures they work correctly with the rename-avoidance optimization.

def test_cancel_parent(self):
Cancelling a parent doesn't cause deletion of a non-empty directory

This is like the test_change_parent, except that we cancel the parent before adjusting the path. The transform must detect that the directory is non-empty, and move children to safe locations.

def test_adjust_and_cancel(self):
Make sure adjust_path keeps track of limbo children properly
def test_noname_contents(self):
TreeTransform should permit deferring naming files.
def test_noname_contents_nested(self):
TreeTransform should permit deferring naming files.
def test_reuse_name(self):
Avoid reusing the same limbo name for different files
def test_reuse_when_first_moved(self):
Don't avoid direct paths when it is safe to use them
def test_reuse_after_cancel(self):
Don't avoid direct paths when it is safe to use them
def test_finalize_order(self):
Finalize must be done in child-to-parent order
def test_cancel_with_cancelled_child_should_succeed(self):
def test_rollback_on_directory_clash(self):
def test_two_directories_clash(self):
def test_two_directories_clash_finalize(self):
def test_file_to_directory(self):
def test_file_to_symlink(self):
def test_dir_to_file(self):
def test_dir_to_hardlink(self):
def test_no_final_path(self):
def test_create_from_tree(self):
def test_create_from_tree_bytes(self):
Provided lines are used instead of tree content.
def test_create_from_tree_symlink(self):
API Documentation for Bazaar, generated by pydoctor at 2021-09-27 00:20:28.