Alien-SVN
view release on metacpan or search on metacpan
src/subversion/subversion/tests/cmdline/merge_tree_conflict_tests.py view on Meta::CPAN
trunk_url = sbox.repo_url + '/A/B/E'
branch_path = os.path.join(wc_dir, 'branch')
br_alpha_moved = os.path.join(branch_path, 'alpha-moved')
# Create a branch
svntest.actions.run_and_verify_svn(None, None, [], 'cp',
trunk_url,
sbox.repo_url + '/branch',
'-m', "Creating the Branch")
svntest.actions.run_and_verify_svn(None, None, [], 'mv',
trunk_url + '/alpha',
trunk_url + '/alpha-moved',
'-m', "Move alpha to alpha-moved")
# Update to revision 2.
svntest.actions.run_and_verify_svn(None, None, [],
'update', wc_dir)
svntest.main.file_write(br_alpha_moved, "I am blocking myself from trunk\n")
branch_path = os.path.join(wc_dir, "branch")
# Merge the obstructions into the branch.
expected_output = svntest.wc.State(branch_path, {
'alpha' : Item(status='D '),
})
expected_mergeinfo_output = wc.State(branch_path, {
'' : Item(status=' U'),
})
expected_elision_output = wc.State(branch_path, {
})
expected_disk = wc.State('', {
'beta' : Item("This is the file 'beta'.\n"),
'alpha-moved' : Item("I am blocking myself from trunk\n"),
})
expected_status = wc.State(branch_path, {
'' : Item(status=' M', wc_rev=3),
'alpha' : Item(status='D ', wc_rev=3),
'beta' : Item(status=' ', wc_rev=3),
})
expected_skip = wc.State(branch_path, {
'alpha-moved' : Item(verb='Skipped'),
})
svntest.actions.run_and_verify_merge(branch_path,
'1', 'HEAD', trunk_url, None,
expected_output,
expected_mergeinfo_output,
expected_elision_output,
expected_disk,
expected_status,
expected_skip)
#----------------------------------------------------------------------
# Detect tree conflicts among files and directories,
# edited or deleted in a deep directory structure.
#
# See use cases 4-6 in notes/tree-conflicts/use-cases.txt for background.
# Note that we do not try to track renames. The only difference from
# the behavior of Subversion 1.4 and 1.5 is the conflicted status of the
# parent directory.
# convenience definitions
leaf_edit = svntest.deeptrees.deep_trees_leaf_edit
tree_del = svntest.deeptrees.deep_trees_tree_del
leaf_del = svntest.deeptrees.deep_trees_leaf_del
disk_after_leaf_edit = svntest.deeptrees.deep_trees_after_leaf_edit
disk_after_leaf_del = svntest.deeptrees.deep_trees_after_leaf_del
disk_after_tree_del = svntest.deeptrees.deep_trees_after_tree_del
disk_after_leaf_del_no_ci = svntest.deeptrees.deep_trees_after_leaf_del_no_ci
disk_after_tree_del_no_ci = svntest.deeptrees.deep_trees_after_tree_del_no_ci
deep_trees_conflict_output = svntest.deeptrees.deep_trees_conflict_output
j = os.path.join
DeepTreesTestCase = svntest.deeptrees.DeepTreesTestCase
alpha_beta_gamma = svntest.wc.State('', {
'F/alpha' : Item(),
'DF/D1/beta' : Item(),
'DDF/D1/D2/gamma' : Item(),
})
#----------------------------------------------------------------------
def tree_conflicts_on_merge_local_ci_4_1(sbox):
"tree conflicts 4.1: tree del, leaf edit"
# use case 4, as in notes/tree-conflicts/use-cases.txt
# 4.1) local tree delete, incoming leaf edit
expected_output = deep_trees_conflict_output
expected_disk = disk_after_tree_del
expected_status = svntest.wc.State('', {
'' : Item(status=' M', wc_rev='3'),
'F' : Item(status=' ', wc_rev='3'),
'D' : Item(status=' ', wc_rev='3'),
'DF' : Item(status=' ', wc_rev='3'),
'DD' : Item(status=' ', wc_rev='3'),
'DDF' : Item(status=' ', wc_rev='3'),
'DDD' : Item(status=' ', wc_rev='3'),
'D/D1' : Item(status='! ', treeconflict='C'),
'F/alpha' : Item(status='! ', treeconflict='C'),
'DD/D1' : Item(status='! ', treeconflict='C'),
'DF/D1' : Item(status='! ', treeconflict='C'),
'DDD/D1' : Item(status='! ', treeconflict='C'),
'DDF/D1' : Item(status='! ', treeconflict='C'),
})
expected_skip = svntest.wc.State('', { })
svntest.deeptrees.deep_trees_run_tests_scheme_for_merge(sbox,
[ DeepTreesTestCase("local_tree_del_incoming_leaf_edit",
tree_del,
leaf_edit,
( run in 0.476 second using v1.01-cache-2.11-cpan-f4a522933cf )