You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2015/11/30 11:24:23 UTC
svn commit: r1717223 [44/50] - in /subversion/branches/ra-git: ./ build/
build/ac-macros/ build/generator/ build/generator/templates/
contrib/hook-scripts/ notes/ notes/api-errata/1.9/ notes/move-tracking/
subversion/ subversion/bindings/ctypes-python/...
Modified: subversion/branches/ra-git/subversion/tests/cmdline/log_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/log_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/log_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/log_tests.py Mon Nov 30 10:24:16 2015
@@ -2686,6 +2686,99 @@ def log_revision_move_copy(sbox):
'log', '-v', '-q', sbox.wc_dir,
'-c3')
+def log_on_deleted_deep(sbox):
+ "log on deleted deep path"
+
+ sbox.build()
+ sbox.simple_propset('k', 'v', 'A/B/E/alpha')
+ sbox.simple_commit() #r2
+ sbox.simple_propset('k', 'v', 'A/B/E/beta')
+ sbox.simple_commit() #r3
+
+ sbox.simple_update() # Or commit fails
+ sbox.simple_move('A/B', 'B')
+ sbox.simple_commit() #r4
+
+ expected_output = svntest.verify.RegexListOutput([
+ r'-+\n',
+ r'r1 .*\n',
+ r'-+\n',
+ r'r2 .*\n',
+ r'-+\n',
+ r'r2 .*\n',
+ r'-+\n',
+ r'r3 .*\n',
+ r'-+\n',
+ ])
+ # In deleted location
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ '-q', '-c', '1-2,2-3')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ 'alpha', 'beta',
+ '-q', '-c', '1-2,2-3')
+
+ # In new location
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ '-q', '-c', '1-2,2-3')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E@4',
+ 'alpha', 'beta',
+ '-q', '-c', '1-2,2-3')
+
+ expected_output = svntest.verify.RegexListOutput([
+ r'-+\n',
+ r'r1 .*\n',
+ r'-+\n',
+ r'r2 .*\n',
+ r'-+\n',
+ ])
+ # 2 ranges
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ 'alpha',
+ '-q', '-c', '1,2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ 'alpha',
+ '-q', '-c', '1,2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ '',
+ '-q', '-c', '1,2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ '',
+ '-q', '-c', '1,2')
+
+ # 1 range
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ 'alpha',
+ '-q', '-c', '1-2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ 'alpha',
+ '-q', '-c', '1-2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/A/B/E@3',
+ '',
+ '-q', '-c', '1-2')
+
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'log', sbox.repo_url + '/B/E',
+ '',
+ '-q', '-c', '1-2')
+
########################################################################
# Run the tests
@@ -2736,6 +2829,7 @@ test_list = [ None,
mergeinfo_log,
merge_sensitive_log_xml_reverse_merges,
log_revision_move_copy,
+ log_on_deleted_deep,
]
if __name__ == '__main__':
Modified: subversion/branches/ra-git/subversion/tests/cmdline/merge_automatic_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/merge_automatic_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/merge_automatic_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/merge_automatic_tests.py Mon Nov 30 10:24:16 2015
@@ -1327,6 +1327,78 @@ def reintegrate_subtree_not_updated(sbox
sbox.simple_commit()
sbox.simple_update()
+def merge_to_copy_and_add(sbox):
+ "merge peg to a copy and add"
+
+ sbox.build()
+
+ sbox.simple_copy('A', 'AA')
+ sbox.simple_append('A/mu', 'A/mu')
+ sbox.simple_commit('A')
+
+ # This is the scenario the code is supposed to support; a copy
+ svntest.actions.run_and_verify_svn(None, [],
+ 'merge', '^/A', sbox.ospath('AA'))
+
+ sbox.simple_mkdir('A3')
+ # And this case currently segfaults, because merge doesn't check
+ # if the path has a repository location
+ expected_err = ".*svn: E195012: Can't perform .*A3'.*added.*"
+ svntest.actions.run_and_verify_svn(None, expected_err,
+ 'merge', '^/A', sbox.ospath('A3'))
+ # Try the same merge with --reintegrate, for completeness' sake.
+ expected_err = ".*svn: E195012: Can't reintegrate into .*A3'.*added.*"
+ svntest.actions.run_and_verify_svn(None, expected_err,
+ 'merge', '--reintegrate', '^/A',
+ sbox.ospath('A3'))
+
+def merge_delete_crlf_file(sbox):
+ "merge the deletion of a strict CRLF file"
+
+ sbox.build()
+
+ sbox.simple_copy('A', 'AA')
+
+ # Let commit fix the eols
+ sbox.simple_add_text('with\rCRLF\rhere!', 'A/crlf')
+ sbox.simple_add_text('with\rnative\r\eol', 'A/native')
+ sbox.simple_add_text('with\rCR\r\eol', 'A/cr')
+ sbox.simple_add_text('with\rLF\r\eol', 'A/lf')
+
+ # And apply the magic property
+ sbox.simple_propset('svn:eol-style', 'CRLF', 'A/crlf')
+ sbox.simple_propset('svn:eol-style', 'native', 'A/native')
+ sbox.simple_propset('svn:eol-style', 'CR', 'A/cr')
+ sbox.simple_propset('svn:eol-style', 'LF', 'A/lf')
+
+ sbox.simple_commit('A') # r2
+
+ # Merge the addition of the files
+ svntest.actions.run_and_verify_svn(None, [],
+ 'merge', '^/A', sbox.ospath('AA'))
+ sbox.simple_commit('AA') # r3
+
+ sbox.simple_rm('A/D', 'A/mu', 'A/crlf', 'A/native', 'A/cr', 'A/lf')
+ sbox.simple_commit('A') # r4
+
+ sbox.simple_update('') # Make single revision r4
+
+ # And now merge the deletes
+ expected_output = svntest.verify.UnorderedOutput([
+ '--- Merging r3 through r4 into \'%s\':\n' % sbox.ospath('AA'),
+ 'D %s\n' % sbox.ospath('AA/cr'),
+ 'D %s\n' % sbox.ospath('AA/crlf'),
+ 'D %s\n' % sbox.ospath('AA/lf'),
+ 'D %s\n' % sbox.ospath('AA/native'),
+ 'D %s\n' % sbox.ospath('AA/mu'),
+ 'D %s\n' % sbox.ospath('AA/D'),
+ '--- Recording mergeinfo for merge of r3 through r4 into \'%s\':\n'
+ % sbox.ospath('AA'),
+ ' U %s\n' % sbox.ospath('AA')
+ ])
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'merge', '^/A', sbox.ospath('AA'))
+
########################################################################
# Run the tests
@@ -1356,6 +1428,8 @@ test_list = [ None,
auto_merge_handles_replacements_in_merge_source,
effective_sync_results_in_reintegrate,
reintegrate_subtree_not_updated,
+ merge_to_copy_and_add,
+ merge_delete_crlf_file,
]
if __name__ == '__main__':
Modified: subversion/branches/ra-git/subversion/tests/cmdline/merge_tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/merge_tree_conflict_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/merge_tree_conflict_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/merge_tree_conflict_tests.py Mon Nov 30 10:24:16 2015
@@ -2012,9 +2012,7 @@ def merge_conflict_details(sbox):
expected_info = [
{
"Path" : re.escape(sbox.ospath('B')),
-
- "Conflict Properties File" :
- re.escape(sbox.ospath('B/dir_conflicts.prej')) + '.*',
+ "Conflicted Properties" : "key",
"Conflict Details": re.escape(
'incoming dir edit upon merge' +
' Source left: (dir) ^/A/B@1' +
@@ -2087,6 +2085,114 @@ def merge_conflict_details(sbox):
svntest.actions.run_and_verify_info(expected_info, sbox.ospath('B'),
'--depth', 'infinity')
+def merge_obstruction_recording(sbox):
+ "merge obstruction recording"
+
+ sbox.build(empty=True)
+ wc_dir = sbox.wc_dir
+
+ sbox.simple_mkdir('trunk')
+ sbox.simple_mkdir('branches')
+ sbox.simple_commit() #r1
+
+ svntest.actions.run_and_verify_svn(None, [],
+ 'copy', sbox.repo_url + '/trunk',
+ sbox.repo_url + '/branches/branch',
+ '-mCopy') # r2
+
+ sbox.simple_mkdir('trunk/dir')
+ sbox.simple_add_text('The file on trunk\n', 'trunk/dir/file.txt')
+ sbox.simple_commit() #r3
+
+ sbox.simple_update()
+
+ sbox.simple_mkdir('branches/branch/dir')
+ sbox.simple_add_text('The file on branch\n', 'branches/branch/dir/file.txt')
+ sbox.simple_commit() #r4
+
+ sbox.simple_update()
+
+ svntest.actions.run_and_verify_svn(None, [],
+ 'switch', '^/branches/branch', wc_dir,
+ '--ignore-ancestry')
+
+ expected_output = wc.State(wc_dir, {
+ 'dir' : Item(status=' ', treeconflict='C'),
+ 'dir/file.txt' : Item(status=' ', treeconflict='A'),
+ })
+ expected_mergeinfo_output = wc.State(wc_dir, {
+ '' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(wc_dir, {
+ })
+ expected_disk = wc.State('', {
+ 'dir/file.txt' : Item(contents="The file on branch\n"),
+ '.' : Item(props={'svn:mergeinfo':'/trunk:2-4'}),
+ })
+ expected_status = wc.State(wc_dir, {
+ '' : Item(status=' M', wc_rev='4'),
+ 'dir' : Item(status=' ', treeconflict='C', wc_rev='4'),
+ 'dir/file.txt' : Item(status=' ', wc_rev='4'),
+ })
+ expected_skip = wc.State('', {
+ })
+ svntest.actions.run_and_verify_merge(wc_dir, '1', '4', sbox.repo_url + '/trunk',
+ None,
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip,
+ check_props=True)
+ expected_info = [
+ {
+ "Path" : re.escape(sbox.ospath('dir')),
+ "Tree conflict": re.escape(
+ 'local dir obstruction, incoming dir add upon merge' +
+ ' Source left: (none) ^/trunk/dir@1' +
+ ' Source right: (dir) ^/trunk/dir@4')
+ },
+ ]
+
+ svntest.actions.run_and_verify_info(expected_info, sbox.ospath('dir'))
+
+ # How should the user handle this conflict?
+ # ### Would be nice if we could just accept mine (leave as is, fix mergeinfo)
+ # ### or accept theirs (delete what is here and insert copy
+ svntest.actions.run_and_verify_svn(None, [],
+ 'resolve', '--accept=working',
+ sbox.ospath('dir'))
+
+ # Redo the skipped merge as record only merge
+ expected_output = [
+ '--- Recording mergeinfo for merge of r4 into \'%s\':\n' % \
+ sbox.ospath('dir'),
+ ' U %s\n' % sbox.ospath('dir'),
+ ]
+ # ### Why are r1-r3 not recorded?
+ # ### Guess: Because dir's history only exists since r4.
+ svntest.actions.run_and_verify_svn(expected_output, [],
+ 'merge', '--record-only',
+ sbox.repo_url + '/trunk/dir',
+ sbox.ospath('dir'),
+ '-c', '1-4')
+
+ expected_disk = wc.State('', {
+ 'dir' : Item(props={'svn:mergeinfo':'/trunk/dir:4'}),
+ 'dir/file.txt' : Item(contents="The file on branch\n"),
+ '.' : Item(props={'svn:mergeinfo':'/trunk:2-4'}),
+ })
+ svntest.actions.verify_disk(wc_dir, expected_disk, check_props=True)
+
+ # Because r1-r3 are not recorded, the mergeinfo is not elided :(
+
+ # Even something like a two url merge wouldn't work, because dir
+ # didn't exist below trunk in r1 either.
+
+ # A resolver action could be smarter though...
+
+
########################################################################
# Run the tests
@@ -2118,6 +2224,7 @@ test_list = [ None,
merge_replace_causes_tree_conflict2,
merge_replace_on_del_fails,
merge_conflict_details,
+ merge_obstruction_recording,
]
if __name__ == '__main__':
Modified: subversion/branches/ra-git/subversion/tests/cmdline/mergeinfo_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/mergeinfo_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/mergeinfo_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/mergeinfo_tests.py Mon Nov 30 10:24:16 2015
@@ -786,6 +786,166 @@ def mergeinfo_local_move(sbox):
'mergeinfo', sbox.repo_url + '/A',
sbox.ospath('A2'))
+@SkipUnless(server_has_mergeinfo)
+@Issue(4582)
+def no_mergeinfo_on_tree_conflict_victim(sbox):
+ "do not record mergeinfo on tree conflict victims"
+ sbox.build()
+
+ # Create a branch of A called A_copy
+ sbox.simple_copy('A', 'A_copy')
+ sbox.simple_commit()
+
+ # Add a new directory and file on both branches
+ sbox.simple_mkdir('A/dir')
+ sbox.simple_add_text('new file', 'A/dir/f')
+ sbox.simple_commit()
+
+ sbox.simple_mkdir('A_copy/dir')
+ sbox.simple_add_text('new file', 'A_copy/dir/f')
+ sbox.simple_commit()
+
+ # Run a merge from A to A_copy
+ expected_output = wc.State(sbox.ospath('A_copy'), {
+ 'dir' : Item(status=' ', treeconflict='C'),
+ 'dir/f' : Item(status=' ', treeconflict='A'),
+ })
+ expected_mergeinfo_output = wc.State(sbox.ospath('A_copy'), {
+ '' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(sbox.ospath('A_copy'), {
+ })
+
+ expected_disk = svntest.wc.State('', {
+ 'C' : Item(),
+ 'B/E/beta' : Item(contents="This is the file 'beta'.\n"),
+ 'B/E/alpha' : Item(contents="This is the file 'alpha'.\n"),
+ 'B/lambda' : Item(contents="This is the file 'lambda'.\n"),
+ 'B/F' : Item(),
+ 'D/H/omega' : Item(contents="This is the file 'omega'.\n"),
+ 'D/H/psi' : Item(contents="This is the file 'psi'.\n"),
+ 'D/H/chi' : Item(contents="This is the file 'chi'.\n"),
+ 'D/G/tau' : Item(contents="This is the file 'tau'.\n"),
+ 'D/G/pi' : Item(contents="This is the file 'pi'.\n"),
+ 'D/G/rho' : Item(contents="This is the file 'rho'.\n"),
+ 'D/gamma' : Item(contents="This is the file 'gamma'.\n"),
+ 'dir/f' : Item(contents="new file"),
+ 'mu' : Item(contents="This is the file 'mu'.\n"),
+ })
+
+ # The merge will create an add vs add tree conflict on A_copy/dir
+ expected_status = svntest.wc.State(sbox.ospath('A_copy'), {
+ '' : Item(status=' M', wc_rev='4'),
+ 'D' : Item(status=' ', wc_rev='4'),
+ 'D/G' : Item(status=' ', wc_rev='4'),
+ 'D/G/pi' : Item(status=' ', wc_rev='4'),
+ 'D/G/rho' : Item(status=' ', wc_rev='4'),
+ 'D/G/tau' : Item(status=' ', wc_rev='4'),
+ 'D/H' : Item(status=' ', wc_rev='4'),
+ 'D/H/psi' : Item(status=' ', wc_rev='4'),
+ 'D/H/omega' : Item(status=' ', wc_rev='4'),
+ 'D/H/chi' : Item(status=' ', wc_rev='4'),
+ 'D/gamma' : Item(status=' ', wc_rev='4'),
+ 'B' : Item(status=' ', wc_rev='4'),
+ 'B/F' : Item(status=' ', wc_rev='4'),
+ 'B/E' : Item(status=' ', wc_rev='4'),
+ 'B/E/alpha' : Item(status=' ', wc_rev='4'),
+ 'B/E/beta' : Item(status=' ', wc_rev='4'),
+ 'B/lambda' : Item(status=' ', wc_rev='4'),
+ 'C' : Item(status=' ', wc_rev='4'),
+ 'dir' : Item(status=' ', treeconflict='C', wc_rev='4'),
+ 'dir/f' : Item(status=' ', wc_rev='4'),
+ 'mu' : Item(status=' ', wc_rev='4'),
+ })
+
+ expected_skip = wc.State('', { })
+
+ sbox.simple_update('A_copy')
+ svntest.actions.run_and_verify_merge(sbox.ospath('A_copy'),
+ None, None, # rev1, rev2
+ '^/A',
+ None, # URL2
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip)
+
+ # Resolve the tree conflict by accepting the working copy state left
+ # behind by the merge. This preserves the line of history of A_copy/dir,
+ # which originated on the branch 'A_copy', rather than replacing it with
+ # Jthe line f history of A/dir which originated on branch 'A'
+ svntest.actions.run_and_verify_resolve([sbox.ospath('A_copy/dir')],
+ '--accept', 'working',
+ sbox.ospath('A_copy/dir'))
+ sbox.simple_commit('A_copy')
+
+ # Now try to merge the 'A_copy' branch back to 'A"
+ expected_output = wc.State(sbox.ospath('A'), {
+ 'dir' : Item(status='R '), # changes line of history of A/dir
+ 'dir/f' : Item(status='A '),
+ })
+ expected_mergeinfo_output = wc.State(sbox.ospath('A'), {
+ '' : Item(status=' U'),
+ })
+ expected_elision_output = wc.State(sbox.ospath('A'), {
+ })
+
+ expected_disk = svntest.wc.State('', {
+ 'C' : Item(),
+ 'B/E/beta' : Item(contents="This is the file 'beta'.\n"),
+ 'B/E/alpha' : Item(contents="This is the file 'alpha'.\n"),
+ 'B/F' : Item(),
+ 'B/lambda' : Item(contents="This is the file 'lambda'.\n"),
+ 'D/H/omega' : Item(contents="This is the file 'omega'.\n"),
+ 'D/H/psi' : Item(contents="This is the file 'psi'.\n"),
+ 'D/H/chi' : Item(contents="This is the file 'chi'.\n"),
+ 'D/G/tau' : Item(contents="This is the file 'tau'.\n"),
+ 'D/G/pi' : Item(contents="This is the file 'pi'.\n"),
+ 'D/G/rho' : Item(contents="This is the file 'rho'.\n"),
+ 'D/gamma' : Item(contents="This is the file 'gamma'.\n"),
+ 'dir/f' : Item(contents="new file"),
+ 'mu' : Item(contents="This is the file 'mu'.\n"),
+ })
+
+ expected_status = svntest.wc.State(sbox.ospath('A'), {
+ '' : Item(status=' M', wc_rev='5'),
+ 'dir' : Item(status='R ', copied='+', wc_rev='-'),
+ 'dir/f' : Item(status=' ', copied='+', wc_rev='-'),
+ 'D' : Item(status=' ', wc_rev='5'),
+ 'D/H' : Item(status=' ', wc_rev='5'),
+ 'D/H/chi' : Item(status=' ', wc_rev='5'),
+ 'D/H/omega' : Item(status=' ', wc_rev='5'),
+ 'D/H/psi' : Item(status=' ', wc_rev='5'),
+ 'D/G' : Item(status=' ', wc_rev='5'),
+ 'D/G/pi' : Item(status=' ', wc_rev='5'),
+ 'D/G/rho' : Item(status=' ', wc_rev='5'),
+ 'D/G/tau' : Item(status=' ', wc_rev='5'),
+ 'D/gamma' : Item(status=' ', wc_rev='5'),
+ 'B' : Item(status=' ', wc_rev='5'),
+ 'B/E' : Item(status=' ', wc_rev='5'),
+ 'B/E/beta' : Item(status=' ', wc_rev='5'),
+ 'B/E/alpha' : Item(status=' ', wc_rev='5'),
+ 'B/lambda' : Item(status=' ', wc_rev='5'),
+ 'B/F' : Item(status=' ', wc_rev='5'),
+ 'mu' : Item(status=' ', wc_rev='5'),
+ 'C' : Item(status=' ', wc_rev='5'),
+ })
+
+ expected_skip = wc.State('', { })
+ sbox.simple_update('A')
+ svntest.actions.run_and_verify_merge(sbox.ospath('A'),
+ None, None, # rev1, rev2
+ '^/A_copy',
+ None, # URL2
+ expected_output,
+ expected_mergeinfo_output,
+ expected_elision_output,
+ expected_disk,
+ expected_status,
+ expected_skip)
+ sbox.simple_commit('A')
########################################################################
# Run the tests
@@ -806,6 +966,7 @@ test_list = [ None,
natural_history_is_not_eligible_nor_merged,
noninheritable_mergeinfo_not_always_eligible,
mergeinfo_local_move,
+ no_mergeinfo_on_tree_conflict_victim,
]
if __name__ == '__main__':
Modified: subversion/branches/ra-git/subversion/tests/cmdline/move_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/ra-git/subversion/tests/cmdline/move_tests.py?rev=1717223&r1=1717222&r2=1717223&view=diff
==============================================================================
--- subversion/branches/ra-git/subversion/tests/cmdline/move_tests.py (original)
+++ subversion/branches/ra-git/subversion/tests/cmdline/move_tests.py Mon Nov 30 10:24:16 2015
@@ -1619,9 +1619,7 @@ def move_conflict_details(sbox):
expected_info = [
{
"Path" : re.escape(sbox.ospath('B')),
-
- "Conflict Properties File" :
- re.escape(sbox.ospath('B/dir_conflicts.prej')) + '.*',
+ "Conflicted Properties" : "key",
"Conflict Details": re.escape(
'incoming dir edit upon update' +
' Source left: (dir) ^/A/B@1' +
@@ -1694,6 +1692,75 @@ def move_conflict_details(sbox):
svntest.actions.run_and_verify_info(expected_info, sbox.ospath('B'),
'--depth', 'infinity')
+def move_conflict_markers(sbox):
+ "move conflict markers"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+ sbox.simple_propset('key','val', 'iota', 'A/B/E', 'A/B/E/beta')
+ sbox.simple_commit()
+ sbox.simple_update('', 1)
+ sbox.simple_propset('key','false', 'iota', 'A/B/E', 'A/B/E/beta')
+
+ expected_output = svntest.wc.State(wc_dir, {
+ 'A/B/E' : Item(status=' C'),
+ 'A/B/E/beta' : Item(status=' C'),
+ 'iota' : Item(status=' C'),
+ })
+ expected_status = svntest.actions.get_virginal_state(wc_dir, 2)
+ expected_status.tweak('iota', 'A/B/E', 'A/B/E/beta', status=' C')
+ expected_disk = svntest.main.greek_state.copy()
+ expected_disk.add({
+ 'A/B/E/dir_conflicts.prej' : Item(contents=
+ "Trying to add new property 'key'\n"
+ "but the property already exists.\n"
+ "<<<<<<< (local property value)\n"
+ "false||||||| (incoming 'changed from' value)\n"
+ "=======\n"
+ "val>>>>>>> (incoming 'changed to' value)\n"),
+ 'A/B/E/beta.prej' : Item(contents=
+ "Trying to add new property 'key'\n"
+ "but the property already exists.\n"
+ "<<<<<<< (local property value)\n"
+ "false||||||| (incoming 'changed from' value)\n"
+ "=======\n"
+ "val>>>>>>> (incoming 'changed to' value)\n"),
+ 'iota.prej' : Item(contents=
+ "Trying to add new property 'key'\n"
+ "but the property already exists.\n"
+ "<<<<<<< (local property value)\n"
+ "false||||||| (incoming 'changed from' value)\n"
+ "=======\n"
+ "val>>>>>>> (incoming 'changed to' value)\n"),
+ })
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output,
+ expected_disk,
+ expected_status)
+
+ sbox.simple_move('iota', 'A/iotb')
+ sbox.simple_move('A/B/E', 'E')
+
+ expected_status.tweak('iota', status='D ', moved_to='A/iotb')
+ expected_status.tweak('A/B/E', status='D ', moved_to='E')
+ expected_status.tweak('A/B/E/alpha', 'A/B/E/beta', status='D ')
+ expected_status.add({
+ 'A/iotb' : Item(status='A ', copied='+', moved_from='iota', wc_rev='-'),
+ 'E' : Item(status='A ', copied='+', moved_from='A/B/E', wc_rev='-'),
+ 'E/beta' : Item(status=' M', copied='+', wc_rev='-'),
+ 'E/alpha' : Item(status=' ', copied='+', wc_rev='-'),
+ })
+ expected_disk.remove('iota', 'iota.prej',
+ 'A/B/E', 'A/B/E/alpha', 'A/B/E/beta',
+ 'A/B/E/dir_conflicts.prej',
+ 'A/B/E/beta.prej')
+ expected_disk.add({
+ 'A/iotb' : Item(contents="This is the file 'iota'.\n"),
+ 'E/beta' : Item(contents="This is the file 'beta'.\n"),
+ 'E/alpha' : Item(contents="This is the file 'alpha'.\n"),
+ })
+ svntest.actions.run_and_verify_status(wc_dir, expected_status)
+ svntest.actions.verify_disk(wc_dir, expected_disk)
#######################################################################
# Run the tests
@@ -1714,6 +1781,7 @@ test_list = [ None,
move_to_from_external,
revert_del_root_of_move,
move_conflict_details,
+ move_conflict_markers,
]
if __name__ == '__main__':