Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py?rev=1687422&r1=1687421&r2=1687422&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/mergeinfo_tests.py Thu Jun 25 08:00:57 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/fsx-1.10/subversion/tests/cmdline/move_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/move_tests.py?rev=1687422&r1=1687421&r2=1687422&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/move_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/move_tests.py Thu Jun 25 08:00:57 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' + Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py?rev=1687422&r1=1687421&r2=1687422&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/prop_tests.py Thu Jun 25 08:00:57 2015 @@ -2740,11 +2740,8 @@ def dir_prop_conflict_details(sbox): None, expected_status, check_props=True) - - # The conflict properties file line was shown for previous versions, but the - # conflict source urls are new since 1.8. expected_info = { - 'Conflict Properties File' : re.escape(sbox.ospath('A/dir_conflicts.prej')), + 'Conflicted Properties' : 'my-prop', 'Conflict Details': re.escape('incoming dir edit upon update' + ' Source left: (dir) ^/A@1' + ' Source right: (dir) ^/A@2') Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py?rev=1687422&r1=1687421&r2=1687422&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svnadmin_tests.py Thu Jun 25 08:00:57 2015 @@ -3006,6 +3006,25 @@ def load_no_svndate_r0(sbox): 'proplist', '--revprop', '-r0', sbox.repo_dir) +# This is only supported for FSFS +# The port to FSX is still pending, BDB won't support it. +@SkipUnless(svntest.main.is_fs_type_fsfs) +def hotcopy_read_only(sbox): + "'svnadmin hotcopy' a read-only source repository" + sbox.build() + svntest.main.chmod_tree(sbox.repo_dir, 0, 0222) + + backup_dir, backup_url = sbox.add_repo_path('backup') + exit_code, output, errput = svntest.main.run_svnadmin("hotcopy", + sbox.repo_dir, + backup_dir) + + # r/o repos are hard to clean up. Make it writable again. + svntest.main.chmod_tree(sbox.repo_dir, 0222, 0222) + if errput: + logger.warn("Error: hotcopy failed") + raise SVNUnexpectedStderr(errput) + ######################################################################## # Run the tests @@ -3062,6 +3081,7 @@ test_list = [ None, upgrade, load_txdelta, load_no_svndate_r0, + hotcopy_read_only, ] if __name__ == '__main__': Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py?rev=1687422&r1=1687421&r2=1687422&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/svntest/main.py Thu Jun 25 08:00:57 2015 @@ -881,6 +881,8 @@ def youngest(repos_path): # Chmod recursively on a whole subtree def chmod_tree(path, mode, mask): + """For each node in the OS filesystem tree PATH, subtract MASK from its + permissions and add MODE to them.""" for dirpath, dirs, files in os.walk(path): for name in dirs + files: fullname = os.path.join(dirpath, name) Modified: subversion/branches/fsx-1.10/subversion/tests/cmdline/update_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/fsx-1.10/subversion/tests/cmdline/update_tests.py?rev=1687422&r1=1687421&r2=1687422&view=diff ============================================================================== --- subversion/branches/fsx-1.10/subversion/tests/cmdline/update_tests.py (original) +++ subversion/branches/fsx-1.10/subversion/tests/cmdline/update_tests.py Thu Jun 25 08:00:57 2015 @@ -6623,8 +6623,7 @@ def update_conflict_details(sbox): { "Path" : re.escape(sbox.ospath('A/B')), - "Conflict Properties File" : - re.escape(sbox.ospath('A/B/dir_conflicts.prej')) + '.*', + "Conflicted Properties" : "key", "Conflict Details": re.escape( 'incoming dir edit upon update' + ' Source left: (dir) ^/A/B@1' + @@ -6694,6 +6693,44 @@ def update_conflict_details(sbox): svntest.actions.run_and_verify_info(expected_info, sbox.ospath('A/B'), '--depth', 'infinity') +# Keywords should be updated in local file even if text change is shortcut +# (due to the local change being the same as the incoming change, for example). +@XFail() +def update_keywords_on_shortcut(sbox): + "update_keywords_on_shortcut" + + sbox.build() + wc_dir = sbox.wc_dir + + # Start with a file with keywords expanded + mu_path = sbox.ospath('A/mu') + svntest.main.file_append(mu_path, '$LastChangedRevision$\n') + svntest.main.run_svn(None, 'ps', 'svn:keywords', 'LastChangedRevision', mu_path) + sbox.simple_commit('A/mu') + + # Modify the text, and commit + svntest.main.file_append(mu_path, 'New line.\n') + sbox.simple_commit('A/mu') + + # Update back to the previous revision + sbox.simple_update('A/mu', 2) + + # Make the same change again locally + svntest.main.file_append(mu_path, 'New line.\n') + + # Update, so that merging the text change is a short-cut merge + text_before_up = open(sbox.ospath('A/mu'), 'r').readlines() + sbox.simple_update('A/mu') + text_after_up = open(sbox.ospath('A/mu'), 'r').readlines() + + # Check the keywords have been updated + if not any(['$LastChangedRevision: 2 $' in line + for line in text_before_up]): + raise svntest.Failure("keyword not as expected in test set-up phase") + if not any(['$LastChangedRevision: 3 $' in line + for line in text_after_up]): + raise svntest.Failure("update did not update the LastChangedRevision keyword") + ####################################################################### # Run the tests @@ -6780,6 +6817,7 @@ test_list = [ None, bump_below_tree_conflict, update_child_below_add, update_conflict_details, + update_keywords_on_shortcut, ] if __name__ == '__main__':
