ne...@apache.org wrote on Thu, Aug 18, 2011 at 14:24:12 -0000: > Author: neels > Date: Thu Aug 18 14:24:12 2011 > New Revision: 1159240 > > URL: http://svn.apache.org/viewvc?rev=1159240&view=rev > Log: > On 'hold' branch: Block commits for files that have the 'svn:hold' prop. > > * subversion/include/svn_props.h > (SVN_PROP_HOLD): New #define. > > * subversion/libsvn_client/commit_util.c > (harvest_committables): > Check for 'svn:hold' prop and exclude files from committables if found. > > * subversion/include/private/svn_wc_private.h > (svn_wc__node_get_commit_status), > * subversion/libsvn_wc/node.c > (svn_wc__node_get_commit_status): > Also return parameter HAD_PROPS for slight optimization in > harvest_committables().
Neels, I went ahead and put together a regression test for this. It XPASS()es when I use changelists instead of svn:hold. [[[ Index: subversion/tests/cmdline/commit_tests.py =================================================================== --- subversion/tests/cmdline/commit_tests.py (revision 1158967) +++ subversion/tests/cmdline/commit_tests.py (working copy) @@ -2803,7 +2803,42 @@ def commit_multiple_nested_deletes(sbox): svntest.main.run_svn(None, 'ci', A, A_B, '-m', 'Q') +#---------------------------------------------------------------------- +@Issue(3028) +@XFail() +def commit_one_file_with_second_withheld(sbox): + "commit one file, with svn:hold on another" + sbox.build() + wc_dir = sbox.wc_dir + + G_path = sbox.ospath('A/D/G') + rho_path = sbox.ospath('A/D/G/rho') + pi_path = sbox.ospath('A/D/G/pi') + + # Make changes. + sbox.simple_propset('arbitrary', 'change', 'A/D/G/rho', 'A/D/G/pi') + + # Create expected state. + expected_output = svntest.wc.State(wc_dir, { + 'A/D/G/rho' : Item(verb='Sending'), + }) + expected_status = svntest.actions.get_virginal_state(wc_dir, 1) + expected_status.tweak('A/D/G/pi', status=' M') + expected_status.tweak('A/D/G/rho', wc_rev=2, status=' ') + expected_disk = svntest.main.greek_state.copy() + expected_disk.tweak('A/D/G/pi', 'A/D/G/rho', props={'arbitrary': 'change'}) + + # Commit one file. + sbox.simple_propset('svn:hold', 'yes', 'A/D/G/pi') + svntest.actions.run_and_verify_commit(wc_dir, + expected_output, + expected_status, + None, + wc_dir) + svntest.actions.verify_disk(wc_dir, expected_disk, check_props=True) + + ######################################################################## # Run the tests @@ -2871,6 +2906,7 @@ test_list = [ None, tree_conflicts_block_commit, tree_conflicts_resolved, commit_multiple_nested_deletes, + commit_one_file_with_second_withheld, ] if __name__ == '__main__': ]]]