Author: svn-role Date: Sat Apr 14 04:01:12 2012 New Revision: 1326052 URL: http://svn.apache.org/viewvc?rev=1326052&view=rev Log: Merge the r1296251 group from trunk:
* r1296251, r1296303, r1297522 Resolve issue 4136, "Deep commit followed by --depth immediates update triggers checksum failure" Justification: User reported regression since 1.7.0 Votes: +1: stsp, rhuijben, philip Modified: subversion/branches/1.7.x/ (props changed) subversion/branches/1.7.x/STATUS subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py Propchange: subversion/branches/1.7.x/ ------------------------------------------------------------------------------ Merged /subversion/trunk:r1296251,1296303,1297522 Modified: subversion/branches/1.7.x/STATUS URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1326052&r1=1326051&r2=1326052&view=diff ============================================================================== --- subversion/branches/1.7.x/STATUS (original) +++ subversion/branches/1.7.x/STATUS Sat Apr 14 04:01:12 2012 @@ -142,11 +142,3 @@ Veto-blocked changes: Approved changes: ================= - - * r1296251, r1296303, r1297522 - Resolve issue 4136, "Deep commit followed by --depth immediates update - triggers checksum failure" - Justification: - User reported regression since 1.7.0 - Votes: - +1: stsp, rhuijben, philip Modified: subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c?rev=1326052&r1=1326051&r2=1326052&view=diff ============================================================================== --- subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c (original) +++ subversion/branches/1.7.x/subversion/libsvn_wc/adm_crawler.c Sat Apr 14 04:01:12 2012 @@ -495,10 +495,14 @@ report_revisions_and_depths(svn_wc__db_t { svn_boolean_t is_incomplete; svn_boolean_t start_empty; + svn_depth_t report_depth = ths->depth; is_incomplete = (ths->status == svn_wc__db_status_incomplete); start_empty = is_incomplete; + if (!SVN_DEPTH_IS_RECURSIVE(depth)) + report_depth = svn_depth_empty; + /* When a <= 1.6 working copy is upgraded without some of its subdirectories we miss some information in the database. If we report the revision as -1, the update editor will receive an @@ -526,7 +530,7 @@ report_revisions_and_depths(svn_wc__db_t dir_repos_root, ths->repos_relpath, iterpool), ths->revnum, - ths->depth, + report_depth, start_empty, ths->lock ? ths->lock->token : NULL, @@ -535,7 +539,7 @@ report_revisions_and_depths(svn_wc__db_t SVN_ERR(reporter->set_path(report_baton, this_report_relpath, ths->revnum, - ths->depth, + report_depth, start_empty, ths->lock ? ths->lock->token : NULL, iterpool)); @@ -549,7 +553,7 @@ report_revisions_and_depths(svn_wc__db_t dir_repos_root, ths->repos_relpath, iterpool), ths->revnum, - ths->depth, + report_depth, start_empty, ths->lock ? ths->lock->token : NULL, iterpool)); @@ -573,7 +577,7 @@ report_revisions_and_depths(svn_wc__db_t SVN_ERR(reporter->set_path(report_baton, this_report_relpath, ths->revnum, - ths->depth, + report_depth, start_empty, ths->lock ? ths->lock->token : NULL, iterpool)); Modified: subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py?rev=1326052&r1=1326051&r2=1326052&view=diff ============================================================================== --- subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py (original) +++ subversion/branches/1.7.x/subversion/tests/cmdline/depth_tests.py Sat Apr 14 04:01:12 2012 @@ -2842,6 +2842,48 @@ def update_below_depth_empty(sbox): svntest.actions.run_and_verify_update(sbox.wc_dir, expected_output, None, None, None) +# Test for issue #4136. +@Issue(4136) +def commit_then_immediates_update(sbox): + "deep commit followed by update --depth immediates" + sbox.build() + + repo_url = sbox.repo_url + wc_dir = sbox.wc_dir + mu_path = sbox.ospath('A/mu') + + # Modify A/mu and commit the changes. + svntest.main.file_write(mu_path, "modified mu\n") + expected_output = svntest.wc.State(wc_dir, { + 'A/mu' : Item(verb='Sending'), + }) + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.tweak('A/mu', wc_rev=2, status=' ') + svntest.actions.run_and_verify_commit(wc_dir, + expected_output, + expected_status, + None, + wc_dir) + + # Now, update --depth immediates in the root of the working copy. + expected_output = svntest.wc.State(wc_dir, { }) + expected_disk = svntest.main.greek_state.copy() + expected_disk.tweak('A/mu', contents="modified mu\n") + expected_status = svntest.wc.State(wc_dir, { '' : svntest.wc.StateItem() }) + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.tweak('', wc_rev=2, status=' ') + expected_status.tweak('A', wc_rev=2, status=' ') + expected_status.tweak('A/mu', wc_rev=2, status=' ') + expected_status.tweak('iota', wc_rev=2, status=' ') + svntest.actions.run_and_verify_update(wc_dir, + expected_output, + expected_disk, + expected_status, + None, None, None, None, None, False, + "--depth=immediates", wc_dir) + + + #---------------------------------------------------------------------- # list all tests here, starting with None: test_list = [ None, @@ -2889,6 +2931,7 @@ test_list = [ None, update_depth_empty_root_of_infinite_children, sparse_update_with_dash_dash_parents, update_below_depth_empty, + commit_then_immediates_update, ] if __name__ == "__main__":