You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2015/04/17 12:31:27 UTC
svn commit: r1674267 - in /subversion/branches/1.9.x-r1664664: ./
subversion/libsvn_repos/commit.c subversion/mod_dav_svn/repos.c
subversion/tests/libsvn_ra/ra-test.c
Author: philip
Date: Fri Apr 17 10:31:27 2015
New Revision: 1674267
URL: http://svn.apache.org/r1674267
Log:
On 1.9.x-r1664664: merge r1664664, r1664672 and r1664674, resolve
text conflict in ra-test.c for r1664664.
Modified:
subversion/branches/1.9.x-r1664664/ (props changed)
subversion/branches/1.9.x-r1664664/subversion/libsvn_repos/commit.c
subversion/branches/1.9.x-r1664664/subversion/mod_dav_svn/repos.c
subversion/branches/1.9.x-r1664664/subversion/tests/libsvn_ra/ra-test.c
Propchange: subversion/branches/1.9.x-r1664664/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Apr 17 10:31:27 2015
@@ -90,4 +90,4 @@
/subversion/branches/verify-at-commit:1462039-1462408
/subversion/branches/verify-keep-going:1439280-1546110
/subversion/branches/wc-collate-path:1402685-1480384
-/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665318,1665437-1665438,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667101,1667106-1667107,1667233,1667235,1667301,1667471,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,1670347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,1673202,1673204,1673228,167
3282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674170
+/subversion/trunk:1660545-1660547,1660549-1662901,1663003,1663183-1663184,1663338,1663347,1663355,1663374,1663450,1663697,1663706,1663738,1663749,1663791,1664078,1664080,1664084-1664085,1664187,1664191,1664193,1664200,1664344,1664476,1664480-1664481,1664483,1664489-1664490,1664507,1664520-1664521,1664523,1664526-1664527,1664531-1664532,1664588,1664593-1664594,1664596,1664653,1664664,1664672,1664674,1664684,1664927,1664938-1664940,1664978,1664984,1664997,1665164,1665195,1665318,1665437-1665438,1665611-1665612,1665845,1665850,1665852,1665886,1665894,1665896,1666096,1666270,1666272,1666379,1666449,1666690,1666851,1667101,1667106-1667107,1667233,1667235,1667301,1667471,1667715,1667941,1667976,1668320,1668598-1668600,1668602-1668603,1668607-1668608,1668618,1669743,1669746,1669749,1669945,1670139,1670149,1670152,1670329,1670337,1670347,1670353,1671164,1671388,1672295,1672311,1672372,1672404,1672511-1672512,1672578,1672728,1673044,1673062-1673063,1673065,1673153,1673170,1673172,1673197,167
3202,1673204,1673228,1673282,1673445,1673691-1673692,1673746,1673785,1673803,1674015,1674170
Modified: subversion/branches/1.9.x-r1664664/subversion/libsvn_repos/commit.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1664664/subversion/libsvn_repos/commit.c?rev=1674267&r1=1674266&r2=1674267&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1664664/subversion/libsvn_repos/commit.c (original)
+++ subversion/branches/1.9.x-r1664664/subversion/libsvn_repos/commit.c Fri Apr 17 10:31:27 2015
@@ -397,6 +397,11 @@ open_root(void *edit_baton,
dateness checks. */
SVN_ERR(svn_fs_youngest_rev(&youngest, eb->fs, eb->pool));
+ if (base_revision > youngest)
+ return svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
+ _("No such revision %ld (HEAD is %ld)"),
+ base_revision, youngest);
+
/* Unless we've been instructed to use a specific transaction, we'll
make our own. */
if (eb->txn_owner)
Modified: subversion/branches/1.9.x-r1664664/subversion/mod_dav_svn/repos.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1664664/subversion/mod_dav_svn/repos.c?rev=1674267&r1=1674266&r2=1674267&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1664664/subversion/mod_dav_svn/repos.c (original)
+++ subversion/branches/1.9.x-r1664664/subversion/mod_dav_svn/repos.c Fri Apr 17 10:31:27 2015
@@ -1858,6 +1858,22 @@ do_out_of_date_check(dav_resource_combin
"Attempting to modify out-of-date resource.",
r->pool);
}
+ else if (comb->priv.version_name > created_rev)
+ {
+ svn_revnum_t txn_base_rev;
+
+ txn_base_rev = svn_fs_txn_base_revision(comb->res.info->root.txn);
+ if (comb->priv.version_name > txn_base_rev)
+ {
+ serr = svn_error_createf(SVN_ERR_FS_NO_SUCH_REVISION, NULL,
+ "No such revision %ld",
+ comb->priv.version_name);
+
+ return dav_svn__convert_err(serr, HTTP_INTERNAL_SERVER_ERROR,
+ "Unknown base revision",
+ r->pool);
+ }
+ }
}
else if (comb->res.collection)
{
Modified: subversion/branches/1.9.x-r1664664/subversion/tests/libsvn_ra/ra-test.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.9.x-r1664664/subversion/tests/libsvn_ra/ra-test.c?rev=1674267&r1=1674266&r2=1674267&view=diff
==============================================================================
--- subversion/branches/1.9.x-r1664664/subversion/tests/libsvn_ra/ra-test.c (original)
+++ subversion/branches/1.9.x-r1664664/subversion/tests/libsvn_ra/ra-test.c Fri Apr 17 10:31:27 2015
@@ -651,7 +651,7 @@ commit_callback_failure(const svn_test_o
apr_hash_make(pool), commit_callback_with_failure,
NULL, NULL, FALSE, pool));
- SVN_ERR(editor->open_root(edit_baton, 1, pool, &root_baton));
+ SVN_ERR(editor->open_root(edit_baton, 0, pool, &root_baton));
SVN_ERR(editor->change_dir_prop(root_baton, "A",
svn_string_create("B", pool), pool));
SVN_ERR(editor->close_directory(root_baton, pool));
@@ -665,6 +665,51 @@ commit_callback_failure(const svn_test_o
}
static svn_error_t *
+base_revision_above_youngest(const svn_test_opts_t *opts,
+ apr_pool_t *pool)
+{
+ svn_ra_session_t *ra_session;
+ const svn_delta_editor_t *editor;
+ void *edit_baton;
+ void *root_baton;
+ svn_error_t *err;
+ SVN_ERR(make_and_open_repos(&ra_session, "base_revision_above_youngest",
+ opts, pool));
+
+ SVN_ERR(svn_ra_get_commit_editor3(ra_session, &editor, &edit_baton,
+ apr_hash_make(pool), NULL,
+ NULL, NULL, FALSE, pool));
+
+ /* r1 doesn't exist, but we say we want to apply changes against this
+ revision to see how the ra layers behave.
+
+ Some will see an error directly on open_root, others in a later
+ state. */
+
+ /* ra-local and http pre-v2 will see the error here */
+ err = editor->open_root(edit_baton, 1, pool, &root_baton);
+
+ if (!err)
+ err = editor->change_dir_prop(root_baton, "A",
+ svn_string_create("B", pool), pool);
+
+ /* http v2 will notice it here (PROPPATCH) */
+ if (!err)
+ err = editor->close_directory(root_baton, pool);
+
+ /* ra svn only notes it at some later point. Typically here */
+ if (!err)
+ err = editor->close_edit(edit_baton, pool);
+
+ SVN_TEST_ASSERT_ERROR(err,
+ SVN_ERR_FS_NO_SUCH_REVISION);
+
+ SVN_ERR(editor->abort_edit(edit_baton, pool));
+ return SVN_NO_ERROR;
+}
+
+
+static svn_error_t *
ra_list_has_props(const svn_test_opts_t *opts,
apr_pool_t *pool)
{
@@ -761,6 +806,8 @@ static struct svn_test_descriptor_t test
"test ra_get_dir2"),
SVN_TEST_OPTS_PASS(commit_callback_failure,
"commit callback failure"),
+ SVN_TEST_OPTS_PASS(base_revision_above_youngest,
+ "base revision newer than youngest"),
SVN_TEST_OPTS_PASS(ra_list_has_props,
"check list has_props performance"),
SVN_TEST_NULL