You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by st...@apache.org on 2013/07/11 18:00:52 UTC
svn commit: r1502256 [2/4] - in /subversion/branches/fsfs-improvements: ./
build/ac-macros/ build/generator/
subversion/bindings/cxxhl/include/svncxxhl/ subversion/bindings/cxxhl/src/
subversion/bindings/cxxhl/src/aprwrap/ subversion/bindings/javahl/na...
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/ssl_server_trust_providers.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/ssl_server_trust_providers.c?rev=1502256&r1=1502255&r2=1502256&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/ssl_server_trust_providers.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/ssl_server_trust_providers.c Thu Jul 11 16:00:50 2013
@@ -78,13 +78,7 @@ ssl_server_trust_file_first_credentials(
failstr = svn_hash_gets(creds_hash, AUTHN_FAILURES_KEY);
if (failstr)
- {
- char *endptr;
- unsigned long tmp_ulong = strtoul(failstr->data, &endptr, 10);
-
- if (*endptr == '\0')
- last_failures = (apr_uint32_t) tmp_ulong;
- }
+ SVN_ERR(svn_cstring_atoui(&last_failures, failstr->data));
/* If the cert is trusted and there are no new failures, we
* accept it by clearing all failures. */
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_subr/string.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_subr/string.c?rev=1502256&r1=1502255&r2=1502256&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_subr/string.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_subr/string.c Thu Jul 11 16:00:50 2013
@@ -418,6 +418,17 @@ svn_stringbuf_create_from_string(const s
return svn_stringbuf_ncreate(str->data, str->len, pool);
}
+svn_stringbuf_t *
+svn_stringbuf_create_wrap(char *str, apr_pool_t *pool)
+{
+ svn_stringbuf_t *result = apr_palloc(pool, sizeof(*result));
+ result->pool = pool;
+ result->data = str;
+ result->len = strlen(str);
+ result->blocksize = result->len + 1;
+
+ return result;
+}
svn_stringbuf_t *
svn_stringbuf_createv(apr_pool_t *pool, const char *fmt, va_list ap)
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_wc/update_editor.c?rev=1502256&r1=1502255&r2=1502256&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_wc/update_editor.c Thu Jul 11 16:00:50 2013
@@ -924,7 +924,6 @@ mark_directory_edited(struct dir_baton *
do_notification(db->edit_baton, db->local_abspath, svn_node_dir,
svn_wc_notify_tree_conflict, scratch_pool);
db->already_notified = TRUE;
-
}
return SVN_NO_ERROR;
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db.c?rev=1502256&r1=1502255&r2=1502256&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db.c Thu Jul 11 16:00:50 2013
@@ -1529,7 +1529,6 @@ svn_wc__db_init(svn_wc__db_t *db,
apr_pstrdup(db->state_pool, local_abspath),
sdb, wc_id, FORMAT_FROM_SDB,
FALSE /* auto-upgrade */,
- FALSE /* enforce_empty_wq */,
db->state_pool, scratch_pool));
/* The WCROOT is complete. Stash it into DB. */
@@ -12300,7 +12299,6 @@ svn_wc__db_upgrade_begin(svn_sqlite__db_
dir_abspath),
*sdb, *wc_id, FORMAT_FROM_SDB,
FALSE /* auto-upgrade */,
- FALSE /* enforce_empty_wq */,
wc_db->state_pool, scratch_pool));
/* The WCROOT is complete. Stash it into DB. */
@@ -13505,6 +13503,7 @@ wclock_obtain_cb(svn_wc__db_wcroot_t *wc
const char *local_relpath,
int levels_to_lock,
svn_boolean_t steal_lock,
+ svn_boolean_t enforce_empty_wq,
apr_pool_t *scratch_pool)
{
svn_sqlite__stmt_t *stmt;
@@ -13534,6 +13533,9 @@ wclock_obtain_cb(svn_wc__db_wcroot_t *wc
scratch_pool));
}
+ if (enforce_empty_wq)
+ SVN_ERR(svn_wc__db_verify_no_work(wcroot->sdb));
+
/* Check if there are nodes locked below the new lock root */
SVN_ERR(svn_sqlite__get_statement(&stmt, wcroot->sdb, STMT_FIND_WC_LOCK));
SVN_ERR(svn_sqlite__bindf(stmt, "is", wcroot->wc_id, local_relpath));
@@ -13708,7 +13710,7 @@ svn_wc__db_wclock_obtain(svn_wc__db_t *d
SVN_WC__DB_WITH_TXN(
wclock_obtain_cb(wcroot, local_relpath, levels_to_lock, steal_lock,
- scratch_pool),
+ db->enforce_empty_wq, scratch_pool),
wcroot);
return SVN_NO_ERROR;
}
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_private.h
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_private.h?rev=1502256&r1=1502255&r2=1502256&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_private.h (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_private.h Thu Jul 11 16:00:50 2013
@@ -42,7 +42,8 @@ struct svn_wc__db_t {
opened, and found to be not-current? */
svn_boolean_t verify_format;
- /* Should we ensure the WORK_QUEUE is empty when a WCROOT is opened? */
+ /* Should we ensure the WORK_QUEUE is empty when a DB is locked
+ * for writing? */
svn_boolean_t enforce_empty_wq;
/* Should we open Sqlite databases EXCLUSIVE */
@@ -122,7 +123,6 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
apr_int64_t wc_id,
int format,
svn_boolean_t verify_format,
- svn_boolean_t enforce_empty_wq,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
@@ -145,6 +145,9 @@ svn_wc__db_wcroot_parse_local_abspath(sv
apr_pool_t *result_pool,
apr_pool_t *scratch_pool);
+/* Return an error if the work queue in SDB is non-empty. */
+svn_error_t *
+svn_wc__db_verify_no_work(svn_sqlite__db_t *sdb);
/* Assert that the given WCROOT is usable.
NOTE: the expression is multiply-evaluated!! */
Modified: subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_wcroot.c
URL: http://svn.apache.org/viewvc/subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_wcroot.c?rev=1502256&r1=1502255&r2=1502256&view=diff
==============================================================================
--- subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_wcroot.c (original)
+++ subversion/branches/fsfs-improvements/subversion/libsvn_wc/wc_db_wcroot.c Thu Jul 11 16:00:50 2013
@@ -145,9 +145,8 @@ get_path_kind(svn_node_kind_t *kind,
}
-/* Return an error if the work queue in SDB is non-empty. */
-static svn_error_t *
-verify_no_work(svn_sqlite__db_t *sdb)
+svn_error_t *
+svn_wc__db_verify_no_work(svn_sqlite__db_t *sdb)
{
svn_sqlite__stmt_t *stmt;
svn_boolean_t have_row;
@@ -258,7 +257,6 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
apr_int64_t wc_id,
int format,
svn_boolean_t verify_format,
- svn_boolean_t enforce_empty_wq,
apr_pool_t *result_pool,
apr_pool_t *scratch_pool)
{
@@ -293,11 +291,11 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
}
/* Verify that no work items exists. If they do, then our integrity is
- suspect and, thus, we cannot use this database. */
- if (format >= SVN_WC__HAS_WORK_QUEUE
- && (enforce_empty_wq || (format < SVN_WC__VERSION && verify_format)))
+ suspect and, thus, we cannot upgrade this database. */
+ if (format >= SVN_WC__HAS_WORK_QUEUE &&
+ format < SVN_WC__VERSION && verify_format)
{
- svn_error_t *err = verify_no_work(sdb);
+ svn_error_t *err = svn_wc__db_verify_no_work(sdb);
if (err)
{
/* Special message for attempts to upgrade a 1.7-dev wc with
@@ -678,7 +676,7 @@ try_symlink_as_dir:
? symlink_wcroot_abspath
: local_abspath),
sdb, wc_id, FORMAT_FROM_SDB,
- db->verify_format, db->enforce_empty_wq,
+ db->verify_format,
db->state_pool, scratch_pool);
if (err && (err->apr_err == SVN_ERR_WC_UNSUPPORTED_FORMAT ||
err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED) &&
@@ -749,7 +747,7 @@ try_symlink_as_dir:
? symlink_wcroot_abspath
: local_abspath),
NULL, UNKNOWN_WC_ID, wc_format,
- db->verify_format, db->enforce_empty_wq,
+ db->verify_format,
db->state_pool, scratch_pool));
}