Author: pburba Date: Tue Aug 23 16:47:54 2011 New Revision: 1160791 URL: http://svn.apache.org/viewvc?rev=1160791&view=rev Log: On the 1.7.x-issue3975 branch: Merge r1152267 and r1152286 from ^/subversion/trunk.
r1152267 adds a test for issue #3975 and r1152286 sets the test as XFail. Resolved some minor conflicts on r1152267 due to other new tests added on trunk after 1.7.x was branched. Modified: subversion/branches/1.7.x-issue3975/ (props changed) subversion/branches/1.7.x-issue3975/subversion/tests/cmdline/merge_tests.py Propchange: subversion/branches/1.7.x-issue3975/ ------------------------------------------------------------------------------ --- svn:mergeinfo (original) +++ svn:mergeinfo Tue Aug 23 16:47:54 2011 @@ -59,4 +59,4 @@ /subversion/branches/tree-conflicts:868291-873154 /subversion/branches/tree-conflicts-notify:873926-874008 /subversion/branches/uris-as-urls:1060426-1064427 -/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148083,1148094,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151906,1151911,1152129,1152140,1152189-1152190,1152282,1152726,1152809,1153138,1153141,1153416,1153799,1153807,1153968,1154009,1154023,1154115,1154119,1154121,1154144,1154155,1154159,1154165,1154215,1154225,1154273,1154461,1154717-1154718,1154733,1154908,1154982,1155015,1155044,1155124,1155131,1155160,1155313,1155334,1155391,1155404,1156085,1156098,1156216,1156218,1156312,1156527,1156717,1156721,1156750,1156827,1156838,1157416,1158193-1158194,1158285,115 8288,1158303,1158309,1158407,1158419,1158421,1158436,1158455,1158616,1158634,1158854,1158893,1159093,1159098,1159101,1159132,1159136,1159148,1159230,1159275,1159686,1159760,1159772,1160605,1160671,1160682,1160704-1160705 +/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148083,1148094,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149401,1149539,1149572,1149627,1149675,1149701,1149713,1150242,1150254,1150260-1150261,1150266,1150302,1150327,1150368,1150372,1150441,1150506,1150812,1150853,1151036,1151177,1151610,1151906,1151911,1152129,1152140,1152189-1152190,1152267,1152282,1152286,1152726,1152809,1153138,1153141,1153416,1153799,1153807,1153968,1154009,1154023,1154115,1154119,1154121,1154144,1154155,1154159,1154165,1154215,1154225,1154273,1154461,1154717-1154718,1154733,1154908,1154982,1155015,1155044,1155124,1155131,1155160,1155313,1155334,1155391,1155404,1156085,1156098,1156216,1156218,1156312,1156527,1156717,1156721,1156750,1156827,1156838,1157416,1158193-115 8194,1158285,1158288,1158303,1158309,1158407,1158419,1158421,1158436,1158455,1158616,1158634,1158854,1158893,1159093,1159098,1159101,1159132,1159136,1159148,1159230,1159275,1159686,1159760,1159772,1160605,1160671,1160682,1160704-1160705 Modified: subversion/branches/1.7.x-issue3975/subversion/tests/cmdline/merge_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x-issue3975/subversion/tests/cmdline/merge_tests.py?rev=1160791&r1=1160790&r2=1160791&view=diff ============================================================================== --- subversion/branches/1.7.x-issue3975/subversion/tests/cmdline/merge_tests.py (original) +++ subversion/branches/1.7.x-issue3975/subversion/tests/cmdline/merge_tests.py Tue Aug 23 16:47:54 2011 @@ -16933,6 +16933,135 @@ def merged_deletion_causes_tree_conflict None, None, None, None, None, 1, False) +#---------------------------------------------------------------------- +# Test for issue #3975 'adds with explicit mergeinfo don't get mergeinfo +# describing merge which added them' +@XFail() +@Issue(3975) +@SkipUnless(server_has_mergeinfo) +def merge_adds_subtree_with_mergeinfo(sbox): + "merge adds subtree with mergeinfo" + + sbox.build() + wc_dir = sbox.wc_dir + wc_disk, wc_status = set_up_branch(sbox, False, 2) + + A_path = os.path.join(wc_dir, 'A') + nu_path = os.path.join(wc_dir, 'A', 'C', 'nu') + nu_COPY_path = os.path.join(wc_dir, 'A_COPY', 'C', 'nu') + A_COPY2_path = os.path.join(wc_dir, 'A_COPY_2') + + # r8 - Add the file A_COPY/C/nu. + svntest.main.file_write(nu_COPY_path, "This is the file 'nu'.\n") + svntest.actions.run_and_verify_svn(None, None, [], 'add', nu_COPY_path) + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Add a file on the A_COPY branch', + wc_dir) + + # r9 - Cherry pick r8 from A_COPY to A. + svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + svntest.actions.run_and_verify_svn(None, None, [], 'merge', + sbox.repo_url + '/A_COPY', + A_path, '-c8') + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Merge r8 from A_COPY to A', wc_dir) + + # r10 - Make a modification to A_COPY/C/nu + svntest.main.file_append(nu_COPY_path, + "More work on the A_COPY branch.\n") + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Some work on the A_COPY branch', wc_dir) + + # r9 - Cherry pick r10 from A_COPY/C/nu to A/C/nu. Make some + # changes to A/C/nu before committing the merge. + svntest.actions.run_and_verify_svn(None, None, [], 'merge', + sbox.repo_url + '/A_COPY/C/nu', + nu_path, '-c10') + svntest.main.file_append(nu_path, "A faux conflict resolution.\n") + svntest.actions.run_and_verify_svn(None, None, [], 'ci', '-m', + 'Merge r8 from A_COPY to A', wc_dir) + + # Sync merge A to A_COPY_2 + svntest.actions.run_and_verify_svn(None, None, [], 'up', wc_dir) + expected_output = wc.State(A_COPY2_path, { + 'B/E/beta' : Item(status='U '), + 'C/nu' : Item(status='A '), + 'D/G/rho' : Item(status='U '), + 'D/H/omega' : Item(status='U '), + 'D/H/psi' : Item(status='U '), + '' : Item(status=' U'), + }) + expected_mergeinfo_output = wc.State(A_COPY2_path, { + '' : Item(status=' G'), + }) + expected_elision_output = wc.State(A_COPY2_path, { + }) + expected_status = wc.State(A_COPY2_path, { + '' : Item(status=' M'), + 'B' : Item(status=' '), + 'mu' : Item(status=' '), + 'B/E' : Item(status=' '), + 'B/E/alpha' : Item(status=' '), + 'B/E/beta' : Item(status='M '), + 'B/lambda' : Item(status=' '), + 'B/F' : Item(status=' '), + 'C' : Item(status=' '), + 'C/nu' : Item(status='A ', copied='+'), + 'D' : Item(status=' '), + 'D/G' : Item(status=' '), + 'D/G/pi' : Item(status=' '), + 'D/G/rho' : Item(status='M '), + 'D/G/tau' : Item(status=' '), + 'D/gamma' : Item(status=' '), + 'D/H' : Item(status=' '), + 'D/H/chi' : Item(status=' '), + 'D/H/psi' : Item(status='M '), + 'D/H/omega' : Item(status='M '), + }) + expected_status.tweak(wc_rev=11) + expected_status.tweak('C/nu', wc_rev='-') + expected_disk = wc.State('', { + '' : Item(props={SVN_PROP_MERGEINFO : '/A:3-11\n/A_COPY:8'}), + 'B' : Item(), + 'mu' : Item("This is the file 'mu'.\n"), + 'B/E' : Item(), + 'B/E/alpha' : Item("This is the file 'alpha'.\n"), + 'B/E/beta' : Item("New content"), + 'B/lambda' : Item("This is the file 'lambda'.\n"), + 'B/F' : Item(), + 'C' : Item(), + # Currently this test fails because A_COPY_2/C/nu gets no + # mergeinfo set on it to describe the merge, it only has + # the explicit mergeinfo from its copy source (i.e. /A_COPY/C/nu:10 + # from ^/A/C/nu@11. + 'C/nu' : Item("This is the file 'nu'.\n" \ + "More work on the A_COPY branch.\n" \ + "A faux conflict resolution.\n", + props={SVN_PROP_MERGEINFO : + '\/A/C/nu:9-11n/A_COPY/C/nu:10'}), + 'D' : Item(), + 'D/G' : Item(), + 'D/G/pi' : Item("This is the file 'pi'.\n"), + 'D/G/rho' : Item("New content"), + 'D/G/tau' : Item("This is the file 'tau'.\n"), + 'D/gamma' : Item("This is the file 'gamma'.\n"), + 'D/H' : Item(), + 'D/H/chi' : Item("This is the file 'chi'.\n"), + 'D/H/psi' : Item("New content"), + 'D/H/omega' : Item("New content"), + }) + expected_skip = wc.State('.', { }) + svntest.actions.run_and_verify_merge(A_COPY2_path, None, None, + sbox.repo_url + '/A', None, + expected_output, + expected_mergeinfo_output, + expected_elision_output, + expected_disk, + expected_status, + expected_skip, + None, None, None, None, + None, 1, False) + ######################################################################## # Run the tests @@ -17059,6 +17188,7 @@ test_list = [ None, foreign_repos_prop_conflict, reverse_merge_adds_subtree, merged_deletion_causes_tree_conflict, + merge_adds_subtree_with_mergeinfo, ] if __name__ == '__main__':