You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by da...@apache.org on 2010/12/30 20:44:23 UTC
svn commit: r1053984 - in /subversion/trunk/subversion:
libsvn_client/commit_util.c tests/cmdline/special_tests.py
Author: danielsh
Date: Thu Dec 30 19:44:23 2010
New Revision: 1053984
URL: http://svn.apache.org/viewvc?rev=1053984&view=rev
Log:
Fix bug where committing a changelist was prevented by a file outside that
changelist having unexpected changed special status.
Thread: http://mid.gmane.org/1292856447.8650.24.camel@nimble.325Bayport
* subversion/tests/cmdline/special_tests.py
(unrelated_changed_special_status): New test.
(special_tests): Run it on symlink-ful platforms.
* subversion/libsvn_client/commit_util.c
(harvest_committables):
Check for changelist-excluded files earlier.
Found by: Nick <no...@codesniffer.com>
Modified:
subversion/trunk/subversion/libsvn_client/commit_util.c
subversion/trunk/subversion/tests/cmdline/special_tests.py
Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1053984&r1=1053983&r2=1053984&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Thu Dec 30 19:44:23 2010
@@ -394,6 +394,7 @@ harvest_committables(apr_hash_t *committ
const char *cf_relpath = NULL;
svn_revnum_t entry_rev, cf_rev = SVN_INVALID_REVNUM;
const svn_string_t *propval;
+ svn_boolean_t matches_changelists;
svn_boolean_t is_special;
svn_boolean_t is_file_external;
svn_boolean_t is_added;
@@ -442,6 +443,17 @@ harvest_committables(apr_hash_t *committ
svn_dirent_local_style(local_abspath, scratch_pool));
}
+ /* Save the result for reuse. */
+ matches_changelists = svn_wc__changelist_match(ctx->wc_ctx, local_abspath,
+ changelists, scratch_pool);
+
+ /* Early exit. */
+ if (working_kind != svn_node_dir && working_kind != svn_node_none
+ && ! matches_changelists)
+ {
+ return SVN_NO_ERROR;
+ }
+
/* Verify that the node's type has not changed before attempting to
commit. */
SVN_ERR(svn_wc_prop_get2(&propval, ctx->wc_ctx, local_abspath,
@@ -466,8 +478,7 @@ harvest_committables(apr_hash_t *committ
/* If ENTRY is in our changelist, then examine it for conflicts. We
need to bail out if any conflicts exist. */
- if (svn_wc__changelist_match(ctx->wc_ctx, local_abspath, changelists,
- scratch_pool))
+ if (matches_changelists)
{
svn_boolean_t tc, pc, treec;
Modified: subversion/trunk/subversion/tests/cmdline/special_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/special_tests.py?rev=1053984&r1=1053983&r2=1053984&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/special_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/special_tests.py Thu Dec 30 19:44:23 2010
@@ -664,6 +664,24 @@ def propvalue_normalized(sbox):
iota2_path)
+# on users@: http://mid.gmane.org/1292856447.8650.24.camel@nimble.325Bayport
+def unrelated_changed_special_status(sbox):
+ "commit foo while bar changed special status"
+
+ sbox.build()
+ wc_dir = sbox.wc_dir
+
+ os.chdir(os.path.join(sbox.wc_dir, 'A/D/H'))
+
+ open('chi', 'a').write('random local mod')
+ os.unlink('psi')
+ os.symlink('omega', 'psi') # omega is versioned!
+ svntest.main.run_svn(None, 'changelist', 'chi cl', 'chi')
+ svntest.actions.run_and_verify_svn(None, None, [], 'commit',
+ '--changelist', 'chi cl',
+ '-m', 'psi changed special status')
+
+
########################################################################
# Run the tests
@@ -687,6 +705,8 @@ test_list = [ None,
SkipUnless(update_obstructing_symlink, svntest.main.is_posix_os),
warn_on_reserved_name,
Skip(propvalue_normalized, svntest.main.is_posix_os),
+ SkipUnless(unrelated_changed_special_status,
+ svntest.main.is_posix_os),
]
if __name__ == '__main__':