Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_delta/svndiff.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_delta/svndiff.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_delta/svndiff.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_delta/svndiff.c Wed Nov 19 14:37:04 2014 @@ -723,8 +723,6 @@ decode_window(svn_txdelta_window_t *wind svn_stringbuf_t *instout = svn_stringbuf_create_empty(pool); svn_stringbuf_t *ndout = svn_stringbuf_create_empty(pool); - /* these may in fact simply return references to insend */ - SVN_ERR(zlib_decode(insend, newlen, ndout, SVN_DELTA_WINDOW_SIZE)); SVN_ERR(zlib_decode(data, insend - data, instout, @@ -739,7 +737,13 @@ decode_window(svn_txdelta_window_t *wind } else { - new_data->data = (const char *) insend; + /* Copy the data because an svn_string_t must have the invariant + data[len]=='\0'. */ + char *buf = apr_palloc(pool, newlen + 1); + + memcpy(buf, insend, newlen); + buf[newlen] = '\0'; + new_data->data = buf; new_data->len = newlen; }
Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_diff/parse-diff.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_diff/parse-diff.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_diff/parse-diff.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_diff/parse-diff.c Wed Nov 19 14:37:04 2014 @@ -1313,6 +1313,7 @@ svn_diff_parse_next_patch(svn_patch_t ** line_after_tree_header_read = TRUE; } else if (! valid_header_line && state != state_start + && state != state_git_diff_seen && !starts_with(line->data, "index ")) { /* We've encountered an invalid diff header. Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/caching.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/caching.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/caching.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/caching.c Wed Nov 19 14:37:04 2014 @@ -89,7 +89,7 @@ read_config(svn_memcache_t **memcache_p, fs_fs_data_t *ffd = fs->fsap_data; SVN_ERR(svn_cache__make_memcache_from_config(memcache_p, ffd->config, - fs->pool)); + fs->pool)); /* No cache namespace by default. I.e. all FS instances share the * cached data. If you specify different namespaces, the data will @@ -129,23 +129,9 @@ read_config(svn_memcache_t **memcache_p, SVN_FS_CONFIG_FSFS_CACHE_FULLTEXTS, TRUE); - /* don't cache revprops by default. - * Revprop caching significantly speeds up operations like - * svn ls -v. However, it requires synchronization that may - * not be available or efficient in the current server setup. - * - * If the caller chose option "2", enable revprop caching if - * the required API support is there to make it efficient. + /* For now, always disable revprop caching. */ - if (strcmp(svn_hash__get_cstring(fs->config, - SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, - ""), "2")) - *cache_revprops - = svn_hash__get_bool(fs->config, - SVN_FS_CONFIG_FSFS_CACHE_REVPROPS, - FALSE); - else - *cache_revprops = svn_named_atomic__is_efficient(); + *cache_revprops = FALSE; return svn_config_get_bool(ffd->config, fail_stop, CONFIG_SECTION_CACHES, CONFIG_OPTION_FAIL_STOP, Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs.h URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs.h?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs.h (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs.h Wed Nov 19 14:37:04 2014 @@ -266,7 +266,7 @@ typedef struct fs_fs_data_t svn_cache__t *dir_cache; /* Fulltext cache; currently only used with memcached. Maps from - rep key (revision/offset) to svn_string_t. */ + rep key (revision/offset) to svn_stringbuf_t. */ svn_cache__t *fulltext_cache; /* Access object to the atomics namespace used by revprop caching. Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs_fs.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs_fs.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs_fs.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_fs_fs/fs_fs.c Wed Nov 19 14:37:04 2014 @@ -6966,8 +6966,13 @@ svn_fs_fs__set_entry(svn_fs_t *fs, rep = apr_pcalloc(pool, sizeof(*rep)); rep->revision = SVN_INVALID_REVNUM; rep->txn_id = txn_id; - SVN_ERR(get_new_txn_node_id(&unique_suffix, fs, txn_id, pool)); - rep->uniquifier = apr_psprintf(pool, "%s/%s", txn_id, unique_suffix); + + if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT) + { + SVN_ERR(get_new_txn_node_id(&unique_suffix, fs, txn_id, pool)); + rep->uniquifier = apr_psprintf(pool, "%s/%s", txn_id, unique_suffix); + } + parent_noderev->data_rep = rep; SVN_ERR(svn_fs_fs__put_node_revision(fs, parent_noderev->id, parent_noderev, FALSE, pool)); @@ -7551,6 +7556,7 @@ rep_write_contents_close(void *baton) representation_t *rep; representation_t *old_rep; apr_off_t offset; + fs_fs_data_t *ffd = b->fs->fsap_data; rep = apr_pcalloc(b->parent_pool, sizeof(*rep)); rep->offset = b->rep_offset; @@ -7567,9 +7573,13 @@ rep_write_contents_close(void *baton) /* Fill in the rest of the representation field. */ rep->expanded_size = b->rep_size; rep->txn_id = svn_fs_fs__id_txn_id(b->noderev->id); - SVN_ERR(get_new_txn_node_id(&unique_suffix, b->fs, rep->txn_id, b->pool)); - rep->uniquifier = apr_psprintf(b->parent_pool, "%s/%s", rep->txn_id, - unique_suffix); + + if (ffd->format >= SVN_FS_FS__MIN_REP_SHARING_FORMAT) + { + SVN_ERR(get_new_txn_node_id(&unique_suffix, b->fs, rep->txn_id, b->pool)); + rep->uniquifier = apr_psprintf(b->parent_pool, "%s/%s", rep->txn_id, + unique_suffix); + } rep->revision = SVN_INVALID_REVNUM; /* Finalize the checksum. */ @@ -8877,7 +8887,12 @@ svn_fs_fs__create(svn_fs_t *fs, SVN_ERR(write_revision_zero(fs)); - SVN_ERR(write_config(fs, pool)); + /* Create the fsfs.conf file if supported. Older server versions would + simply ignore the file but that might result in a different behavior + than with the later releases. Also, hotcopy would ignore, i.e. not + copy, a fsfs.conf with old formats. */ + if (ffd->format >= SVN_FS_FS__MIN_CONFIG_FILE) + SVN_ERR(write_config(fs, pool)); SVN_ERR(read_config(ffd, fs->path, pool)); Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/commit.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/commit.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/commit.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/commit.c Wed Nov 19 14:37:04 2014 @@ -99,14 +99,11 @@ typedef struct proppatch_context_t { } proppatch_context_t; typedef struct delete_context_t { - const char *path; + const char *relpath; svn_revnum_t revision; - const char *lock_token; - apr_hash_t *lock_token_hash; - svn_boolean_t keep_locks; - + commit_context_t *commit; } delete_context_t; /* Represents a directory. */ @@ -149,7 +146,6 @@ typedef struct dir_context_t { /* The checked-out working resource for this directory. May be NULL; if so call checkout_dir() first. */ const char *working_url; - } dir_context_t; /* Represents a file to be committed. */ @@ -1078,6 +1074,96 @@ setup_copy_file_headers(serf_bucket_t *h } static svn_error_t * +setup_if_header_recursive(svn_boolean_t *added, + serf_bucket_t *headers, + commit_context_t *commit_ctx, + const char *rq_relpath, + apr_pool_t *pool) +{ + svn_stringbuf_t *sb = NULL; + apr_hash_index_t *hi; + apr_pool_t *iterpool = NULL; + + if (!commit_ctx->lock_tokens) + { + *added = FALSE; + return SVN_NO_ERROR; + } + + /* We try to create a directory, so within the Subversion world that + would imply that there is nothing here, but mod_dav_svn still sees + locks on the old nodes here as in DAV it is perfectly legal to lock + something that is not there... + + Let's make mod_dav, mod_dav_svn and the DAV RFC happy by providing + the locks we know of with the request */ + + for (hi = apr_hash_first(pool, commit_ctx->lock_tokens); + hi; + hi = apr_hash_next(hi)) + { + const char *relpath = svn__apr_hash_index_key(hi); + apr_uri_t uri; + + if (!svn_relpath_skip_ancestor(rq_relpath, relpath)) + continue; + else if (svn_hash_gets(commit_ctx->deleted_entries, relpath)) + { + /* When a path is already explicit deleted then its lock + will be removed by mod_dav. But mod_dav doesn't remove + locks on descendants */ + continue; + } + + if (!iterpool) + iterpool = svn_pool_create(pool); + else + svn_pool_clear(iterpool); + + if (sb == NULL) + sb = svn_stringbuf_create("", pool); + else + svn_stringbuf_appendbyte(sb, ' '); + + uri = commit_ctx->session->session_url; + uri.path = (char *)svn_path_url_add_component2(uri.path, relpath, + iterpool); + + svn_stringbuf_appendbyte(sb, '<'); + svn_stringbuf_appendcstr(sb, apr_uri_unparse(iterpool, &uri, 0)); + svn_stringbuf_appendcstr(sb, "> (<"); + svn_stringbuf_appendcstr(sb, svn__apr_hash_index_val(hi)); + svn_stringbuf_appendcstr(sb, ">)"); + } + + if (iterpool) + svn_pool_destroy(iterpool); + + if (sb) + { + serf_bucket_headers_set(headers, "If", sb->data); + *added = TRUE; + } + else + *added = FALSE; + + return SVN_NO_ERROR; +} + +static svn_error_t * +setup_add_dir_common_headers(serf_bucket_t *headers, + void *baton, + apr_pool_t *pool) +{ + dir_context_t *dir = baton; + svn_boolean_t added; + + return svn_error_trace( + setup_if_header_recursive(&added, headers, dir->commit, dir->relpath, + pool)); +} + +static svn_error_t * setup_copy_dir_headers(serf_bucket_t *headers, void *baton, apr_pool_t *pool) @@ -1109,7 +1195,7 @@ setup_copy_dir_headers(serf_bucket_t *he /* Implicitly checkout this dir now. */ dir->working_url = apr_pstrdup(dir->pool, uri.path); - return SVN_NO_ERROR; + return svn_error_trace(setup_add_dir_common_headers(headers, baton, pool)); } static svn_error_t * @@ -1117,54 +1203,22 @@ setup_delete_headers(serf_bucket_t *head void *baton, apr_pool_t *pool) { - delete_context_t *ctx = baton; + delete_context_t *del = baton; + svn_boolean_t added; serf_bucket_headers_set(headers, SVN_DAV_VERSION_NAME_HEADER, - apr_ltoa(pool, ctx->revision)); - - if (ctx->lock_token_hash) - { - ctx->lock_token = svn_hash_gets(ctx->lock_token_hash, ctx->path); - - if (ctx->lock_token) - { - const char *token_header; - - token_header = apr_pstrcat(pool, "<", ctx->path, "> (<", - ctx->lock_token, ">)", (char *)NULL); + apr_ltoa(pool, del->revision)); - serf_bucket_headers_set(headers, "If", token_header); + SVN_ERR(setup_if_header_recursive(&added, headers, del->commit, + del->relpath, pool)); - if (ctx->keep_locks) - serf_bucket_headers_setn(headers, SVN_DAV_OPTIONS_HEADER, - SVN_DAV_OPTION_KEEP_LOCKS); - } - } + if (added && del->commit->keep_locks) + serf_bucket_headers_setn(headers, SVN_DAV_OPTIONS_HEADER, + SVN_DAV_OPTION_KEEP_LOCKS); return SVN_NO_ERROR; } -/* Implements svn_ra_serf__request_body_delegate_t */ -static svn_error_t * -create_delete_body(serf_bucket_t **body_bkt, - void *baton, - serf_bucket_alloc_t *alloc, - apr_pool_t *pool) -{ - delete_context_t *ctx = baton; - serf_bucket_t *body; - - body = serf_bucket_aggregate_create(alloc); - - svn_ra_serf__add_xml_header_buckets(body, alloc); - - svn_ra_serf__merge_lock_token_list(ctx->lock_token_hash, ctx->path, - body, alloc, pool); - - *body_bkt = body; - return SVN_NO_ERROR; -} - /* Helper function to write the svndiff stream to temporary file. */ static svn_error_t * svndiff_stream_write(void *file_baton, @@ -1541,7 +1595,6 @@ delete_entry(const char *path, delete_context_t *delete_ctx; svn_ra_serf__handler_t *handler; const char *delete_target; - svn_error_t *err; if (USING_HTTPV2_COMMIT_SUPPORT(dir->commit)) { @@ -1560,10 +1613,9 @@ delete_entry(const char *path, /* DELETE our entry */ delete_ctx = apr_pcalloc(pool, sizeof(*delete_ctx)); - delete_ctx->path = apr_pstrdup(pool, path); + delete_ctx->relpath = apr_pstrdup(pool, path); delete_ctx->revision = revision; - delete_ctx->lock_token_hash = dir->commit->lock_tokens; - delete_ctx->keep_locks = dir->commit->keep_locks; + delete_ctx->commit = dir->commit; handler = apr_pcalloc(pool, sizeof(*handler)); handler->handler_pool = pool; @@ -1579,30 +1631,7 @@ delete_entry(const char *path, handler->method = "DELETE"; handler->path = delete_target; - err = svn_ra_serf__context_run_one(handler, pool); - - if (err && - (err->apr_err == SVN_ERR_FS_BAD_LOCK_TOKEN || - err->apr_err == SVN_ERR_FS_NO_LOCK_TOKEN || - err->apr_err == SVN_ERR_FS_LOCK_OWNER_MISMATCH || - err->apr_err == SVN_ERR_FS_PATH_ALREADY_LOCKED)) - { - svn_error_clear(err); - - /* An error has been registered on the connection. Reset the thing - so that we can use it again. */ - serf_connection_reset(handler->conn->conn); - - handler->body_delegate = create_delete_body; - handler->body_delegate_baton = delete_ctx; - handler->body_type = "text/xml"; - - SVN_ERR(svn_ra_serf__context_run_one(handler, pool)); - } - else if (err) - { - return err; - } + SVN_ERR(svn_ra_serf__context_run_one(handler, pool)); /* 204 No Content: item successfully deleted */ if (handler->sline.code != 204) @@ -1673,6 +1702,9 @@ add_directory(const char *path, { handler->method = "MKCOL"; handler->path = mkcol_target; + + handler->header_delegate = setup_add_dir_common_headers; + handler->header_delegate_baton = dir; } else { @@ -2341,7 +2373,8 @@ svn_ra_serf__get_commit_editor(svn_ra_se ctx->callback = callback; ctx->callback_baton = callback_baton; - ctx->lock_tokens = lock_tokens; + ctx->lock_tokens = (lock_tokens && apr_hash_count(lock_tokens)) + ? lock_tokens : NULL; ctx->keep_locks = keep_locks; ctx->deleted_entries = apr_hash_make(ctx->pool); Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/getlocks.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/getlocks.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/getlocks.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/getlocks.c Wed Nov 19 14:37:04 2014 @@ -116,6 +116,7 @@ getlocks_closed(svn_ra_serf__xml_estate_ if (leaving_state == LOCK) { const char *path = svn_hash_gets(attrs, "path"); + const char *token = svn_hash_gets(attrs, "token"); svn_boolean_t save_lock = FALSE; /* Filter out unwanted paths. Since Subversion only allows @@ -128,6 +129,12 @@ getlocks_closed(svn_ra_serf__xml_estate_ c) we've asked for depth=files or depth=immediates, and this lock is on an immediate child of our query path. */ + if (! token) + { + /* A lock without a token is not a lock; just an answer that there + is no lock on the node. */ + save_lock = FALSE; + } if (strcmp(lock_ctx->path, path) == 0 || lock_ctx->requested_depth == svn_depth_infinity) { @@ -154,7 +161,7 @@ getlocks_closed(svn_ra_serf__xml_estate_ them may have not been sent, so the value will be NULL. */ lock.path = path; - lock.token = svn_hash_gets(attrs, "token"); + lock.token = token; lock.owner = svn_hash_gets(attrs, "owner"); lock.comment = svn_hash_gets(attrs, "comment"); @@ -234,6 +241,7 @@ svn_ra_serf__get_locks(svn_ra_session_t svn_ra_serf__handler_t *handler; svn_ra_serf__xml_context_t *xmlctx; const char *req_url, *rel_path; + svn_error_t *err; req_url = svn_path_url_add_component2(session->session_url.path, path, pool); SVN_ERR(svn_ra_serf__get_relative_path(&rel_path, req_url, session, @@ -260,7 +268,14 @@ svn_ra_serf__get_locks(svn_ra_session_t handler->body_delegate = create_getlocks_body; handler->body_delegate_baton = lock_ctx; - SVN_ERR(svn_ra_serf__context_run_one(handler, pool)); + err = svn_ra_serf__context_run_one(handler, pool); + + /* Wrap the server generated error for an unsupported report with the + documented error for this ra function. */ + if (svn_error_find_cause(err, SVN_ERR_UNSUPPORTED_FEATURE)) + err = svn_error_create(SVN_ERR_RA_NOT_IMPLEMENTED, err, NULL); + + SVN_ERR(err); /* We get a 404 when a path doesn't exist in HEAD, but it might have existed earlier (E.g. 'svn ls http://s/svn/trunk/file@1' */ Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/locks.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/locks.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/locks.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/locks.c Wed Nov 19 14:37:04 2014 @@ -156,11 +156,20 @@ locks_closed(svn_ra_serf__xml_estate_t * if (leaving_state == TIMEOUT) { - if (strcmp(cdata->data, "Infinite") == 0) + if (strcasecmp(cdata->data, "Infinite") == 0) lock_ctx->lock->expiration_date = 0; + else if (strncasecmp(cdata->data, "Second-", 7) == 0) + { + unsigned n; + SVN_ERR(svn_cstring_atoui(&n, cdata->data+7)); + + lock_ctx->lock->expiration_date = apr_time_now() + + apr_time_from_sec(n); + } else - SVN_ERR(svn_time_from_cstring(&lock_ctx->lock->creation_date, - cdata->data, lock_ctx->pool)); + return svn_error_createf(SVN_ERR_RA_DAV_MALFORMED_DATA, NULL, + _("Invalid LOCK timeout value '%s'"), + cdata->data); } else if (leaving_state == HREF) { @@ -362,29 +371,30 @@ svn_error_t * svn_ra_serf__get_lock(svn_ra_session_t *ra_session, svn_lock_t **lock, const char *path, - apr_pool_t *pool) + apr_pool_t *result_pool) { svn_ra_serf__session_t *session = ra_session->priv; svn_ra_serf__handler_t *handler; svn_ra_serf__xml_context_t *xmlctx; + apr_pool_t *scratch_pool = svn_pool_create(result_pool); lock_info_t *lock_ctx; const char *req_url; svn_error_t *err; - req_url = svn_path_url_add_component2(session->session_url.path, path, pool); - - lock_ctx = apr_pcalloc(pool, sizeof(*lock_ctx)); + req_url = svn_path_url_add_component2(session->session_url.path, path, + scratch_pool); - lock_ctx->pool = pool; + lock_ctx = apr_pcalloc(scratch_pool, sizeof(*lock_ctx)); + lock_ctx->pool = result_pool; lock_ctx->path = req_url; - lock_ctx->lock = svn_lock_create(pool); - lock_ctx->lock->path = apr_pstrdup(pool, path); /* be sure */ + lock_ctx->lock = svn_lock_create(result_pool); + lock_ctx->lock->path = apr_pstrdup(result_pool, path); xmlctx = svn_ra_serf__xml_context_create(locks_ttable, NULL, locks_closed, NULL, lock_ctx, - pool); - handler = svn_ra_serf__create_expat_handler(xmlctx, pool); + scratch_pool); + handler = svn_ra_serf__create_expat_handler(xmlctx, scratch_pool); handler->method = "PROPFIND"; handler->path = req_url; @@ -405,7 +415,7 @@ svn_ra_serf__get_lock(svn_ra_session_t * lock_ctx->handler = handler; - err = svn_ra_serf__context_run_one(handler, pool); + err = svn_ra_serf__context_run_one(handler, scratch_pool); err = determine_error(handler, err); if (handler->sline.code == 404) @@ -420,7 +430,12 @@ svn_ra_serf__get_lock(svn_ra_session_t * _("Server does not support locking features")); } - *lock = lock_ctx->lock; + if (lock_ctx->lock && lock_ctx->lock->token) + *lock = lock_ctx->lock; + else + *lock = NULL; + + svn_pool_destroy(scratch_pool); return SVN_NO_ERROR; } @@ -574,7 +589,7 @@ svn_ra_serf__unlock(svn_ra_session_t *ra { SVN_ERR(svn_ra_serf__get_lock(ra_session, &existing_lock, path, iterpool)); - token = existing_lock->token; + token = existing_lock ? existing_lock->token : NULL; if (!token) { err = svn_error_createf(SVN_ERR_RA_NOT_LOCKED, NULL, Propchange: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/locks.c ------------------------------------------------------------------------------ --- svn:mergeinfo (added) +++ svn:mergeinfo Wed Nov 19 14:37:04 2014 @@ -0,0 +1,123 @@ +/subversion/branches/1.5.x-r30215/subversion/libsvn_ra_serf/locks.c:870312 +/subversion/branches/1.7.x-fs-verify/subversion/libsvn_ra_serf/locks.c:1146708,1161180 +/subversion/branches/1.8.x/subversion/libsvn_ra_serf/locks.c:1536952-1640560 +/subversion/branches/1.8.x-VS2013-14/subversion/libsvn_ra_serf/locks.c:1603404-1615199 +/subversion/branches/1.8.x-apr-0.9/subversion/libsvn_ra_serf/locks.c:1585493-1589570 +/subversion/branches/1.8.x-busted-proxy/subversion/libsvn_ra_serf/locks.c:1499222-1502434 +/subversion/branches/1.8.x-issue4400/subversion/libsvn_ra_serf/locks.c:1507591-1512557 +/subversion/branches/1.8.x-issue4437/subversion/libsvn_ra_serf/locks.c:1567249-1591140 +/subversion/branches/1.8.x-issue4448/subversion/libsvn_ra_serf/locks.c:1540420-1541802 +/subversion/branches/1.8.x-issue4480/subversion/libsvn_ra_serf/locks.c:1588773-1591136 +/subversion/branches/1.8.x-javahl-exception-crash/subversion/libsvn_ra_serf/locks.c:1586424-1588151 +/subversion/branches/1.8.x-libsvnjavahl-version/subversion/libsvn_ra_serf/locks.c:1483910-1485054 +/subversion/branches/1.8.x-openssl-dirs/subversion/libsvn_ra_serf/locks.c:1535137-1540436 +/subversion/branches/1.8.x-r1477876/subversion/libsvn_ra_serf/locks.c:1477981-1487716 +/subversion/branches/1.8.x-r1481625/subversion/libsvn_ra_serf/locks.c:1481637-1482135 +/subversion/branches/1.8.x-r1495063/subversion/libsvn_ra_serf/locks.c:1495804-1501074 +/subversion/branches/1.8.x-r1497310-partial/subversion/libsvn_ra_serf/locks.c:1497500-1501063 +/subversion/branches/1.8.x-r1502267/subversion/libsvn_ra_serf/locks.c:1502268-1515998 +/subversion/branches/1.8.x-r1507044/subversion/libsvn_ra_serf/locks.c:1507282-1511571 +/subversion/branches/1.8.x-r1513879/subversion/libsvn_ra_serf/locks.c:1514699-1516021 +/subversion/branches/1.8.x-r1536931/subversion/libsvn_ra_serf/locks.c:1536934-1591145 +/subversion/branches/1.8.x-r1537147/subversion/libsvn_ra_serf/locks.c:1537201-1537216 +/subversion/branches/1.8.x-r1537193/subversion/libsvn_ra_serf/locks.c:1537217-1541815 +/subversion/branches/1.8.x-r1541790/subversion/libsvn_ra_serf/locks.c:1541791-1542075 +/subversion/branches/1.8.x-r1544597/subversion/libsvn_ra_serf/locks.c:1564547-1591149 +/subversion/branches/1.8.x-r1554978/subversion/libsvn_ra_serf/locks.c:1555500-1565076 +/subversion/branches/1.8.x-r1561426/subversion/libsvn_ra_serf/locks.c:1561547-1640480 +/subversion/branches/1.8.x-r1564215/subversion/libsvn_ra_serf/locks.c:1564281-1564620 +/subversion/branches/1.8.x-r1567286/subversion/libsvn_ra_serf/locks.c:1567364-1567731 +/subversion/branches/1.8.x-r1567985/subversion/libsvn_ra_serf/locks.c:1568016-1568055 +/subversion/branches/1.8.x-r1574868/subversion/libsvn_ra_serf/locks.c:1575329-1579873 +/subversion/branches/1.8.x-r1577151/subversion/libsvn_ra_serf/locks.c:1589064-1589574 +/subversion/branches/1.8.x-r1577812/subversion/libsvn_ra_serf/locks.c:1577814-1588145 +/subversion/branches/1.8.x-r1578311/subversion/libsvn_ra_serf/locks.c:1578312-1589576 +/subversion/branches/1.8.x-r1578853/subversion/libsvn_ra_serf/locks.c:1578879-1581682 +/subversion/branches/1.8.x-r1579588/subversion/libsvn_ra_serf/locks.c:1579589-1591112 +/subversion/branches/1.8.x-r1580626/subversion/libsvn_ra_serf/locks.c:1580631,1580652,1580661,1581435,1588382-1591134 +/subversion/branches/1.8.x-r1581305/subversion/libsvn_ra_serf/locks.c:1581320-1582587 +/subversion/branches/1.8.x-r1584342/subversion/libsvn_ra_serf/locks.c:1584350-1589572 +/subversion/branches/1.8.x-r1594223/subversion/libsvn_ra_serf/locks.c:1594224-1606975 +/subversion/branches/1.8.x-r1619774/subversion/libsvn_ra_serf/locks.c:1626728-1640478 +/subversion/branches/1.8.x-r175-daemonize/subversion/libsvn_ra_serf/locks.c:1515866-1516020 +/subversion/branches/1.8.x-rm-external-dir/subversion/libsvn_ra_serf/locks.c:1600632-1615197 +/subversion/branches/1.8.x-serf-1.3+-windows/subversion/libsvn_ra_serf/locks.c:1517122-1533873 +/subversion/branches/1.8.x-serf-no-lock-support/subversion/libsvn_ra_serf/locks.c:1584583-1591109 +/subversion/branches/1.8.x-svn_fs_info-removal/subversion/libsvn_ra_serf/locks.c:1467420-1468159 +/subversion/branches/1.8.x-svnsync-serf-memory/subversion/libsvn_ra_serf/locks.c:1515248-1515701 +/subversion/branches/1.8.x-synvsync-serf-memory/subversion/libsvn_ra_serf/locks.c:1515247 +/subversion/branches/1.8.x-tristate-chunked-request/subversion/libsvn_ra_serf/locks.c:1502435-1503894 +/subversion/branches/10Gb/subversion/libsvn_ra_serf/locks.c:1388102,1388163-1388190,1388195,1388202,1388205,1388211,1388276,1388362,1388375,1388394,1388636,1388639-1388640,1388643-1388644,1388654,1388720,1388789,1388795,1388801,1388805,1388807,1388810,1388816,1389044,1389276,1389289,1389662,1389867,1390017,1390209,1390216,1390407,1390409,1390414,1390419,1390955 +/subversion/branches/atomic-revprop/subversion/libsvn_ra_serf/locks.c:965046-1000689 +/subversion/branches/auto-props-sdc/subversion/libsvn_ra_serf/locks.c:1384106-1401643 +/subversion/branches/bdb-reverse-deltas/subversion/libsvn_ra_serf/locks.c:872050-872529 +/subversion/branches/diff-callbacks3/subversion/libsvn_ra_serf/locks.c:870059-870761 +/subversion/branches/diff-optimizations/subversion/libsvn_ra_serf/locks.c:1031270-1037352 +/subversion/branches/diff-optimizations-bytes/subversion/libsvn_ra_serf/locks.c:1037353-1067789 +/subversion/branches/dont-save-plaintext-passwords-by-default/subversion/libsvn_ra_serf/locks.c:870728-871118 +/subversion/branches/double-delete/subversion/libsvn_ra_serf/locks.c:870511-872970 +/subversion/branches/ev2-export/subversion/libsvn_ra_serf/locks.c:1325914,1332738,1413107 +/subversion/branches/explore-wc/subversion/libsvn_ra_serf/locks.c:875486,875493,875497,875507,875511,875514,875559,875580-875581,875584,875587,875611,875627,875647,875667-875668,875711-875712,875733-875734,875736,875744-875748,875751,875758,875782,875795-875796,875830,875836,875838,875842,875852,875855,875864,875870,875873,875880,875885-875888,875890,875897-875898,875905,875907-875909,875935,875943-875944,875946,875979,875982-875983,875985-875986,875990,875997 +/subversion/branches/file-externals/subversion/libsvn_ra_serf/locks.c:871779-873302 +/subversion/branches/fs-rep-sharing/subversion/libsvn_ra_serf/locks.c:869036-873803 +/subversion/branches/fsfs-pack/subversion/libsvn_ra_serf/locks.c:873717-874575 +/subversion/branches/gnome-keyring/subversion/libsvn_ra_serf/locks.c:870558-871410 +/subversion/branches/gpg-agent-password-store/subversion/libsvn_ra_serf/locks.c:1005036-1150766 +/subversion/branches/http-protocol-v2/subversion/libsvn_ra_serf/locks.c:874395-876041 +/subversion/branches/in-memory-cache/subversion/libsvn_ra_serf/locks.c:869829-871452 +/subversion/branches/in-repo-authz/subversion/libsvn_ra_serf/locks.c:1414342-1424779 +/subversion/branches/inheritable-props/subversion/libsvn_ra_serf/locks.c:1297080-1395089 +/subversion/branches/integrate-cache-item-serialization/subversion/libsvn_ra_serf/locks.c:1068724-1068739 +/subversion/branches/integrate-cache-membuffer/subversion/libsvn_ra_serf/locks.c:998649-998852 +/subversion/branches/integrate-compression-level/subversion/libsvn_ra_serf/locks.c:1068651-1072287 +/subversion/branches/integrate-io-improvements/subversion/libsvn_ra_serf/locks.c:1068684-1072297 +/subversion/branches/integrate-is-cachable/subversion/libsvn_ra_serf/locks.c:1072568-1074082 +/subversion/branches/integrate-partial-getter/subversion/libsvn_ra_serf/locks.c:1072558-1076552 +/subversion/branches/integrate-readline-speedup/subversion/libsvn_ra_serf/locks.c:1072553-1072555 +/subversion/branches/integrate-stream-api-extensions/subversion/libsvn_ra_serf/locks.c:1068695-1072516 +/subversion/branches/integrate-string-improvements/subversion/libsvn_ra_serf/locks.c:1068251-1190617 +/subversion/branches/integrate-txdelta-caching/subversion/libsvn_ra_serf/locks.c:1072541-1078213 +/subversion/branches/issue-2779-dev/subversion/libsvn_ra_serf/locks.c:965496-984198 +/subversion/branches/issue-2843-dev/subversion/libsvn_ra_serf/locks.c:871432-874179 +/subversion/branches/issue-3000/subversion/libsvn_ra_serf/locks.c:871713,871716-871719,871721-871726,871728,871734 +/subversion/branches/issue-3067-deleted-subtrees/subversion/libsvn_ra_serf/locks.c:873375-874084 +/subversion/branches/issue-3148-dev/subversion/libsvn_ra_serf/locks.c:875193-875204 +/subversion/branches/issue-3220-dev/subversion/libsvn_ra_serf/locks.c:872210-872226 +/subversion/branches/issue-3242-dev/subversion/libsvn_ra_serf/locks.c:879653-896436 +/subversion/branches/issue-3334-dirs/subversion/libsvn_ra_serf/locks.c:875156-875867 +/subversion/branches/issue-3975/subversion/libsvn_ra_serf/locks.c:1152931-1160746 +/subversion/branches/issue-4116-dev/subversion/libsvn_ra_serf/locks.c:1424719-1425040 +/subversion/branches/issue-4194-dev/subversion/libsvn_ra_serf/locks.c:1410507-1414880 +/subversion/branches/javahl-ra/subversion/libsvn_ra_serf/locks.c:1342682,1344977 +/subversion/branches/kwallet/subversion/libsvn_ra_serf/locks.c:870785-871314 +/subversion/branches/log-g-performance/subversion/libsvn_ra_serf/locks.c:870941-871032 +/subversion/branches/merge-skips-obstructions/subversion/libsvn_ra_serf/locks.c:874525-874615 +/subversion/branches/multi-layer-moves/subversion/libsvn_ra_serf/locks.c:1239019-1300930 +/subversion/branches/nfc-nfd-aware-client/subversion/libsvn_ra_serf/locks.c:870276,870376 +/subversion/branches/node_pool/subversion/libsvn_ra_serf/locks.c:1304828-1305388 +/subversion/branches/performance/subversion/libsvn_ra_serf/locks.c:979193,980118,981087,981090,981189,981194,981287,981684,981827,982043,982355,983398,983406,983430,983474,983488,983490,983760,983764,983766,983770,984927,984973,984984,985014,985037,985046,985472,985477,985482,985487-985488,985493,985497,985500,985514,985601,985603,985606,985669,985673,985695,985697,986453,986465,986485,986491-986492,986517,986521,986605,986608,986817,986832,987865,987868-987869,987872,987886-987888,987893,988319,988898,990330,990533,990535-990537,990541,990568,990572,990574-990575,990600,990759,992899,992904,992911,993127,993141,994956,995478,995507,995603,998012,998858,999098,1001413,1001417,1004291,1022668,1022670,1022676,1022715,1022719,1025660,1025672,1027193,1027203,1027206,1027214,1027227,1028077,1028092,1028094,1028104,1028107,1028111,1028354,1029038,1029042-1029043,1029054-1029055,1029062-1029063,1029078,1029080,1029090,1029092-1029093,1029111,1029151,1029158,1029229-1029230,1029232,1029335- 1029336,1029339-1029340,1029342,1029344,1030763,1030827,1031203,1031235,1032285,1032333,1033040,1033057,1033294,1035869,1035882,1039511,1043705,1053735,1056015,1066452,1067683,1067697-1078365 +/subversion/branches/py-tests-as-modules/subversion/libsvn_ra_serf/locks.c:956579-1033052 +/subversion/branches/ra_serf-digest-authn/subversion/libsvn_ra_serf/locks.c:875693-876404 +/subversion/branches/reintegrate-improvements/subversion/libsvn_ra_serf/locks.c:873853-874164 +/subversion/branches/revprop-cache/subversion/libsvn_ra_serf/locks.c:1298521-1326293 +/subversion/branches/revprop-packing/subversion/libsvn_ra_serf/locks.c:1143907,1143971,1143997,1144017,1144499,1144568,1146145 +/subversion/branches/subtree-mergeinfo/subversion/libsvn_ra_serf/locks.c:876734-878766 +/subversion/branches/svn-mergeinfo-enhancements/subversion/libsvn_ra_serf/locks.c:870119-870195,870197-870288 +/subversion/branches/svn-patch-improvements/subversion/libsvn_ra_serf/locks.c:918519-934609 +/subversion/branches/svn_mutex/subversion/libsvn_ra_serf/locks.c:1141683-1182099 +/subversion/branches/svnpatch-diff/subversion/libsvn_ra_serf/locks.c:865738-876477 +/subversion/branches/svnraisetc/subversion/libsvn_ra_serf/locks.c:874709-875149 +/subversion/branches/svnserve-logging/subversion/libsvn_ra_serf/locks.c:869828-870893 +/subversion/branches/tc-issue-3334/subversion/libsvn_ra_serf/locks.c:874697-874773 +/subversion/branches/tc-merge-notify/subversion/libsvn_ra_serf/locks.c:874017-874062 +/subversion/branches/tc-resolve/subversion/libsvn_ra_serf/locks.c:874191-874239 +/subversion/branches/tc_url_rev/subversion/libsvn_ra_serf/locks.c:874351-874483 +/subversion/branches/tree-conflicts/subversion/libsvn_ra_serf/locks.c:868291-873154 +/subversion/branches/tree-conflicts-notify/subversion/libsvn_ra_serf/locks.c:873926-874008 +/subversion/branches/tristate-chunked-request/subversion/libsvn_ra_serf/locks.c:1502401,1502673 +/subversion/branches/tweak-build-take-two/subversion/libsvn_ra_serf/locks.c:1424288-1425049,1425051-1425613 +/subversion/branches/uris-as-urls/subversion/libsvn_ra_serf/locks.c:1060426-1064427 +/subversion/branches/verify-at-commit/subversion/libsvn_ra_serf/locks.c:1462039-1462408 +/subversion/branches/wc-collate-path/subversion/libsvn_ra_serf/locks.c:1407642 +/subversion/trunk/subversion/libsvn_ra_serf/get_lock.c:1578311 +/subversion/trunk/subversion/libsvn_ra_serf/locks.c:1467440,1467450,1467481,1467587,1467597,1467668,1467675,1467803,1467807,1467951,1468109,1468116,1468151,1468347,1468395,1468439,1468487,1468565-1468566,1468980,1469248,1469363,1469478,1469489,1469512-1469513,1469550,1469556,1469645,1469674,1469833,1469862,1469866,1469871,1469994,1470031,1470037,1470221,1470238,1470246,1470248,1470537,1470650,1470738,1470781,1470898,1470904,1470908,1470913,1470936,1470993-1470994,1471028-1471029,1471107,1471153,1471302,1471443,1471490,1471744,1475704,1475724,1475772,1475963,1476092,1476155,1476181,1476193,1476254,1476359,1476366,1476607,1477294,1477359,1477729-1477730,1477876,1477891,1478001,1478220-1478221,1478465,1478617,1478897,1478951,1478987,1478998,1479320-1479321,1479323,1479326,1479329,1479540,1479563,1479605,1479896,1480054,1480077,1480080,1480082,1480119,1480149,1480344,1480412,1480426,1480442,1480616,1480641-1480642,1480664,1480669,1480681,1480723,1480738,1480765,1481010,1481418,1481594,1 481596,1481625,1481627-1481628,1481631-1481632,1481772,1481782,1481800,1481813,1481847,1481944,1481981,1482282,1482327,1482338,1482350,1482354,1482436,1482479,1482524,1482528,1482536,1482554,1482558,1482592,1482724,1482759,1482779,1482829,1482969-1482970,1482973,1483015,1483077,1483101,1483116,1483125,1483391,1483397,1483555,1483557,1483575,1483580,1483781,1483927,1483939,1483947,1483964-1483965,1483968,1483972,1483975,1483977,1483984,1484006,1484016-1484017,1484023,1484755,1485018,1485127,1485350,1485413,1485427,1485447,1485449,1485497,1485501,1485650,1486072,1486457,1486572,1486809,1486915,1486931,1487083,1487094,1488183,1488267,1488294,1488425,1488639,1488693,1488878,1489114,1489116-1489117,1489203,1489339,1489935,1490045,1490326,1490679,1490684,1490721,1491432,1491499,1491707,1491739,1491755-1491756,1491762,1491770,1491816,1491868,1492005,1492020,1492145,1492148,1492152,1492164,1492264,1492295,1493102,1493424,1493475,1493703,1493720,1493951,1494089,1494171,1494223,1494287,149429 8,1494318,1494342,1494657,1494913,1494967,1495063,1495104,1495204,1495209,1495214,1495256,1495329,1495428,1495432,1495446,1495597,1495805,1495850,1495978,1496007,1496110-1496111,1496127,1496132,1496151,1496470,1496938,1496957,1497002,1497318-1497319,1497551,1497614,1497804,1497975,1497980,1498000,1498012,1498136,1498449,1498455-1498456,1498483-1498484,1498486,1498550,1498564,1498851,1498885,1498997,1499034,1499044,1499064,1499095-1499096,1499100,1499403,1499423,1499438,1499447,1499460,1499470,1499483,1499492,1499496,1499498,1499595,1499727,1500074,1500175,1500226,1500680,1500695,1500762,1500799,1500801-1500802,1500904,1500928,1501199,1501207,1501656,1501702,1502097,1502267,1502577,1502777,1502811,1502901,1502909,1502952,1503009-1503010,1503058,1503061,1503211,1503318,1503528,1503884,1504192,1504505,1506040-1506041,1506047,1506058,1506966,1507044,1507382,1507567,1507589,1507889,1507891,1508438,1509186,1509196,1511057,1511272,1511353,1511603,1512067,1512119,1512195,1512300-1512301,151 2432,1512471-1512472,1513119,1513122,1513156,1513463,1513472,1513874,1513879-1513880,1513943,1514295,1514315,1514318,1514356,1514628,1514763,1514785,1514804,1515119,1515141,1515201,1515225,1515237,1515343,1515366,1515516,1515534,1515721,1515992,1515997,1516023-1516024,1516049,1516051-1516053,1516071,1516271,1516429,1516556,1516565,1516567,1516806,1518184,1518942,1519615,1519617,1519733,1519816,1519823,1519955,1520065,1520529,1520532,1520539,1520745,1522892,1523666,1524869,1525902,1526439,1526655,1527103,1527105,1530763,1530768,1530872,1530922,1530967,1531002,1531004,1531014,1531938,1532023,1532098,1532316,1534102,1534149,1534158,1534713,1534737,1534860,1535115,1535161,1535532,1535610,1535676,1536350,1536383,1536464,1536488,1536537,1536854,1536914,1536931,1537018,1537147,1537190,1537193,1537221,1537263,1537360,1537415,1537555,1537700,1538516-1538517,1538519,1538574,1538581,1538812,1538925,1538928,1538939,1540044,1540417,1540752,1541432,1541635,1541638,1541705,1541790,1542042,1542069, 1542071,1542119,1542129,1542138,1542146,1542151,1542765,1542767,1542774,1543145,1543187,1543413,1543594,1543961,1544295,1544316,1544597,1544600,1544688,1544690,1544878,1544895,1545111,1545122,1545302,1545835,1545845,1547252,1547454,1547774,1547866,1547873,1548097,1548105,1548170,1548486,1548673,1549858,1549874,1550691,1550772,1550803,1551524,1551579,1552957-1552958,1553101,1553105,1553113,1553376-1553377,1553501,1553556,1554978,1555403,1555499,1557320,1557522,1559009,1559197,1560690,1560701,1561426,1561703,1563110,1564292,1564966,1564969,1565085,1565531,1566503-1566504,1567064,1567109,1567134,1567204,1567228,1567286,1567392,1567492,1567494,1567740,1567752,1567985,1568070,1568349,1568361,1568872,1568953,1568955,1569069,1570642,1571214,1571747,1571787,1571795,1572102,1572200,1572340,1573088,1573106,1573209,1574868,1575270,1575284,1575525,1575915,1577151,1577200,1577294,1577739,1577755,1577812-1577813,1578273,1578311,1578326,1578670,1578820,1578853,1578875,1579274,1579429,1579588,15796 84,1580626,1580650,1580832,1580867,1580872,1581296,1581305,1581315,1581430,1581810,1583580,1583977,1584342,1584576,1584592,1584745,1585686,1586052,1586255,1586352,1586467,1587511,1587946,1587968,1588772,1588778,1589184,1589188,1589460,1589486,1590212,1591123,1592014,1592034,1593992,1594156,1594223,1594794,1594814,1594834,1595061,1595431,1596866,1600311,1600315,1600323,1600393,1600909,1601851,1606009,1612225,1615211,1615219,1615255-1615256,1615260,1615263,1616131,1619105,1619118,1619153,1619774,1619802,1636874 Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/options.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/options.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/options.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/options.c Wed Nov 19 14:37:04 2014 @@ -302,7 +302,7 @@ capabilities_headers_iterator_callback(v /* May contain multiple values, separated by commas. */ int i; apr_array_header_t *vals = svn_cstring_split(val, ",", TRUE, - opt_ctx->pool); + session->pool); for (i = 0; i < vals->nelts; i++) { Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/update.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/update.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/update.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/update.c Wed Nov 19 14:37:04 2014 @@ -329,9 +329,6 @@ struct report_context_t { files/dirs? */ svn_boolean_t add_props_included; - /* Path -> lock token mapping. */ - apr_hash_t *lock_path_tokens; - /* Path -> const char *repos_relpath mapping */ apr_hash_t *switched_paths; @@ -2248,8 +2245,6 @@ end_report(svn_ra_serf__xml_parser_t *pa info->pool); } - info->lock_token = svn_hash_gets(ctx->lock_path_tokens, info->name); - if (info->lock_token && !info->fetch_props) info->fetch_props = TRUE; @@ -2578,13 +2573,6 @@ set_path(void *report_baton, SVN_ERR(svn_io_file_write_full(report->body_file, buf->data, buf->len, NULL, pool)); - if (lock_token) - { - svn_hash_sets(report->lock_path_tokens, - apr_pstrdup(report->pool, path), - apr_pstrdup(report->pool, lock_token)); - } - return SVN_NO_ERROR; } @@ -2660,12 +2648,6 @@ link_path(void *report_baton, if (!*path) report->root_is_switched = TRUE; - if (lock_token) - { - svn_hash_sets(report->lock_path_tokens, - path, apr_pstrdup(report->pool, lock_token)); - } - return APR_SUCCESS; } @@ -3193,7 +3175,6 @@ make_update_reporter(svn_ra_session_t *r report->ignore_ancestry = ignore_ancestry; report->send_copyfrom_args = send_copyfrom_args; report->text_deltas = text_deltas; - report->lock_path_tokens = apr_hash_make(report->pool); report->switched_paths = apr_hash_make(report->pool); report->source = src_path; Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/util.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/util.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/util.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_serf/util.c Wed Nov 19 14:37:04 2014 @@ -28,7 +28,6 @@ #define APR_WANT_STRFUNC #include <apr.h> #include <apr_want.h> -#include <apr_fnmatch.h> #include <serf.h> #include <serf_bucket_types.h> @@ -49,6 +48,7 @@ #include "private/svn_fspath.h" #include "private/svn_subr_private.h" #include "private/svn_auth_private.h" +#include "private/svn_cert.h" #include "ra_serf.h" @@ -274,7 +274,6 @@ ssl_server_cert(void *baton, int failure apr_hash_t *subject = NULL; apr_hash_t *serf_cert = NULL; void *creds; - int found_matching_hostname = 0; svn_failures = (ssl_convert_serf_failures(failures) | conn->server_cert_failures); @@ -286,26 +285,37 @@ ssl_server_cert(void *baton, int failure ### This should really be handled by serf, which should pass an error for this case, but that has backwards compatibility issues. */ apr_array_header_t *san; + svn_boolean_t found_san_entry = FALSE; + svn_boolean_t found_matching_hostname = FALSE; + svn_string_t *actual_hostname = + svn_string_create(conn->session->session_url.hostname, scratch_pool); serf_cert = serf_ssl_cert_certificate(cert, scratch_pool); san = svn_hash_gets(serf_cert, "subjectAltName"); /* Try to find matching server name via subjectAltName first... */ - if (san) { + if (san) + { int i; - for (i = 0; i < san->nelts; i++) { + found_san_entry = san->nelts > 0; + for (i = 0; i < san->nelts; i++) + { const char *s = APR_ARRAY_IDX(san, i, const char*); - if (apr_fnmatch(s, conn->session->session_url.hostname, - APR_FNM_PERIOD | APR_FNM_CASE_BLIND) == APR_SUCCESS) - { - found_matching_hostname = 1; + svn_string_t *cert_hostname = svn_string_create(s, scratch_pool); + + if (svn_cert__match_dns_identity(cert_hostname, actual_hostname)) + { + found_matching_hostname = TRUE; break; - } - } - } + } + } + } - /* Match server certificate CN with the hostname of the server */ - if (!found_matching_hostname) + /* Match server certificate CN with the hostname of the server iff + * we didn't find any subjectAltName fields and try to match them. + * Per RFC 2818 they are authoritative if present and CommonName + * should be ignored. */ + if (!found_matching_hostname && !found_san_entry) { const char *hostname = NULL; @@ -314,13 +324,20 @@ ssl_server_cert(void *baton, int failure if (subject) hostname = svn_hash_gets(subject, "CN"); - if (!hostname - || apr_fnmatch(hostname, conn->session->session_url.hostname, - APR_FNM_PERIOD | APR_FNM_CASE_BLIND) != APR_SUCCESS) - { - svn_failures |= SVN_AUTH_SSL_CNMISMATCH; - } - } + if (hostname) + { + svn_string_t *cert_hostname = svn_string_create(hostname, + scratch_pool); + + if (svn_cert__match_dns_identity(cert_hostname, actual_hostname)) + { + found_matching_hostname = TRUE; + } + } + } + + if (!found_matching_hostname) + svn_failures |= SVN_AUTH_SSL_CNMISMATCH; } if (!svn_failures) Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_svn/protocol URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_svn/protocol?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_svn/protocol (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_ra_svn/protocol Wed Nov 19 14:37:04 2014 @@ -310,6 +310,7 @@ second place for auth-request point as n sends file contents as a series of strings, terminated by the empty string, followed by a second empty command response to indicate whether an error occurred during the sending of the file. + NOTE: the standard client never sends want-iprops, it uses get-iprops. get-dir params: ( path:string [ rev:number ] want-props:bool want-contents:bool @@ -321,6 +322,7 @@ second place for auth-request point as n [ last-author:string ] ) dirent-field: kind | size | has-props | created-rev | time | last-author | word + NOTE: the standard client never sends want-iprops, it uses get-iprops. check-path params: ( path:string [ rev:number ] ) Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/fs-wrap.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/fs-wrap.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/fs-wrap.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/fs-wrap.c Wed Nov 19 14:37:04 2014 @@ -117,6 +117,8 @@ svn_repos_fs_begin_txn_for_commit2(svn_f const char *txn_name; svn_string_t *author = svn_hash_gets(revprop_table, SVN_PROP_REVISION_AUTHOR); apr_hash_t *hooks_env; + svn_error_t *err; + svn_fs_txn_t *txn; /* Parse the hooks-env file (if any). */ SVN_ERR(svn_repos__parse_hooks_env(&hooks_env, repos->hooks_env_path, @@ -124,21 +126,30 @@ svn_repos_fs_begin_txn_for_commit2(svn_f /* Begin the transaction, ask for the fs to do on-the-fly lock checks. We fetch its name, too, so the start-commit hook can use it. */ - SVN_ERR(svn_fs_begin_txn2(txn_p, repos->fs, rev, + SVN_ERR(svn_fs_begin_txn2(&txn, repos->fs, rev, SVN_FS_TXN_CHECK_LOCKS, pool)); - SVN_ERR(svn_fs_txn_name(&txn_name, *txn_p, pool)); + err = svn_fs_txn_name(&txn_name, txn, pool); + if (err) + return svn_error_compose_create(err, svn_fs_abort_txn(txn, pool)); /* We pass the revision properties to the filesystem by adding them as properties on the txn. Later, when we commit the txn, these properties will be copied into the newly created revision. */ revprops = svn_prop_hash_to_array(revprop_table, pool); - SVN_ERR(svn_repos_fs_change_txn_props(*txn_p, revprops, pool)); + err = svn_repos_fs_change_txn_props(txn, revprops, pool); + if (err) + return svn_error_compose_create(err, svn_fs_abort_txn(txn, pool)); /* Run start-commit hooks. */ - SVN_ERR(svn_repos__hooks_start_commit(repos, hooks_env, - author ? author->data : NULL, - repos->client_capabilities, txn_name, - pool)); + err = svn_repos__hooks_start_commit(repos, hooks_env, + author ? author->data : NULL, + repos->client_capabilities, txn_name, + pool); + if (err) + return svn_error_compose_create(err, svn_fs_abort_txn(txn, pool)); + + /* We have API promise that *TXN_P is unaffected on faulure. */ + *txn_p = txn; return SVN_NO_ERROR; } Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/load-fs-vtable.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/load-fs-vtable.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/load-fs-vtable.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_repos/load-fs-vtable.c Wed Nov 19 14:37:04 2014 @@ -61,7 +61,7 @@ struct parse_baton const char *parent_dir; /* repository relpath, or NULL */ svn_repos_notify_func_t notify_func; void *notify_baton; - svn_repos_notify_t *notify; + apr_pool_t *notify_pool; /* scratch pool for notifications */ apr_pool_t *pool; /* Start and end (inclusive) of revision range we'll pay attention @@ -502,9 +502,14 @@ new_revision_record(void **revision_bato if (pb->notify_func) { - pb->notify->action = svn_repos_notify_load_txn_start; - pb->notify->old_revision = rb->rev; - pb->notify_func(pb->notify_baton, pb->notify, rb->pool); + /* ### TODO: Use proper scratch pool instead of pb->notify_pool */ + svn_repos_notify_t *notify = svn_repos_notify_create( + svn_repos_notify_load_txn_start, + pb->notify_pool); + + notify->old_revision = rb->rev; + pb->notify_func(pb->notify_baton, notify, pb->notify_pool); + svn_pool_clear(pb->notify_pool); } /* Stash the oldest "old" revision committed from the load stream. */ @@ -515,9 +520,14 @@ new_revision_record(void **revision_bato /* If we're skipping this revision, try to notify someone. */ if (rb->skipped && pb->notify_func) { - pb->notify->action = svn_repos_notify_load_skipped_rev; - pb->notify->old_revision = rb->rev; - pb->notify_func(pb->notify_baton, pb->notify, rb->pool); + /* ### TODO: Use proper scratch pool instead of pb->notify_pool */ + svn_repos_notify_t *notify = svn_repos_notify_create( + svn_repos_notify_load_skipped_rev, + pb->notify_pool); + + notify->old_revision = rb->rev; + pb->notify_func(pb->notify_baton, notify, pb->notify_pool); + svn_pool_clear(pb->notify_pool); } /* If we're parsing revision 0, only the revision are (possibly) @@ -586,8 +596,13 @@ maybe_add_with_history(struct node_baton if (pb->notify_func) { - pb->notify->action = svn_repos_notify_load_copied_node; - pb->notify_func(pb->notify_baton, pb->notify, rb->pool); + /* ### TODO: Use proper scratch pool instead of pb->notify_pool */ + svn_repos_notify_t *notify = svn_repos_notify_create( + svn_repos_notify_load_copied_node, + pb->notify_pool); + + pb->notify_func(pb->notify_baton, notify, pb->notify_pool); + svn_pool_clear(pb->notify_pool); } } @@ -656,10 +671,14 @@ new_node_record(void **node_baton, if (pb->notify_func) { - pb->notify->action = svn_repos_notify_load_node_start; - pb->notify->node_action = nb->action; - pb->notify->path = nb->path; - pb->notify_func(pb->notify_baton, pb->notify, rb->pool); + /* ### TODO: Use proper scratch pool instead of pb->notify_pool */ + svn_repos_notify_t *notify = svn_repos_notify_create( + svn_repos_notify_load_node_start, + pb->notify_pool); + + notify->path = nb->path; + pb->notify_func(pb->notify_baton, notify, pb->notify_pool); + svn_pool_clear(pb->notify_pool); } switch (nb->action) @@ -767,8 +786,14 @@ set_node_property(void *baton, if (pb->notify_func) { - pb->notify->action = svn_repos_notify_load_normalized_mergeinfo; - pb->notify_func(pb->notify_baton, pb->notify, nb->pool); + /* ### TODO: Use proper scratch pool instead of pb->notify_pool */ + svn_repos_notify_t *notify + = svn_repos_notify_create( + svn_repos_notify_load_normalized_mergeinfo, + pb->notify_pool); + + pb->notify_func(pb->notify_baton, notify, pb->notify_pool); + svn_pool_clear(pb->notify_pool); } } @@ -896,8 +921,13 @@ close_node(void *baton) if (pb->notify_func) { - pb->notify->action = svn_repos_notify_load_node_done; - pb->notify_func(pb->notify_baton, pb->notify, rb->pool); + /* ### TODO: Use proper scratch pool instead of pb->notify_pool */ + svn_repos_notify_t *notify = svn_repos_notify_create( + svn_repos_notify_load_node_done, + pb->notify_pool); + + pb->notify_func(pb->notify_baton, notify, pb->notify_pool); + svn_pool_clear(pb->notify_pool); } return SVN_NO_ERROR; @@ -1016,12 +1046,17 @@ close_revision(void *baton) if (pb->notify_func) { - pb->notify->action = svn_repos_notify_load_txn_committed; - pb->notify->new_revision = committed_rev; - pb->notify->old_revision = ((committed_rev == rb->rev) + /* ### TODO: Use proper scratch pool instead of pb->notify_pool */ + svn_repos_notify_t *notify = svn_repos_notify_create( + svn_repos_notify_load_txn_committed, + pb->notify_pool); + + notify->new_revision = committed_rev; + notify->old_revision = ((committed_rev == rb->rev) ? SVN_INVALID_REVNUM : rb->rev); - pb->notify_func(pb->notify_baton, pb->notify, rb->pool); + pb->notify_func(pb->notify_baton, notify, pb->notify_pool); + svn_pool_clear(pb->notify_pool); } return SVN_NO_ERROR; @@ -1079,10 +1114,10 @@ svn_repos_get_fs_build_parser4(const svn pb->validate_props = validate_props; pb->notify_func = notify_func; pb->notify_baton = notify_baton; - pb->notify = svn_repos_notify_create(svn_repos_notify_load_txn_start, pool); pb->uuid_action = uuid_action; pb->parent_dir = parent_dir; pb->pool = pool; + pb->notify_pool = svn_pool_create(pool); pb->rev_map = apr_hash_make(pool); pb->oldest_old_rev = SVN_INVALID_REVNUM; pb->last_rev_mapped = SVN_INVALID_REVNUM; Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/cache-memcache.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/cache-memcache.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/cache-memcache.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/cache-memcache.c Wed Nov 19 14:37:04 2014 @@ -203,9 +203,10 @@ memcache_get(void **value_p, } else { - svn_string_t *value = apr_pcalloc(result_pool, sizeof(*value)); + svn_stringbuf_t *value = svn_stringbuf_create_empty(result_pool); value->data = data; - value->len = data_len; + value->blocksize = data_len; + value->len = data_len - 1; /* account for trailing NUL */ *value_p = value; } } @@ -263,7 +264,7 @@ memcache_set(void *cache_void, { svn_stringbuf_t *value_str = value; data = value_str->data; - data_len = value_str->len; + data_len = value_str->len + 1; /* copy trailing NUL */ } err = memcache_internal_set(cache_void, key, data, data_len, subpool); Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_auth.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_auth.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_auth.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_auth.c Wed Nov 19 14:37:04 2014 @@ -94,6 +94,7 @@ svn_config_read_auth_data(apr_hash_t **h if (kind == svn_node_file) { svn_stream_t *stream; + svn_string_t *stored_realm; SVN_ERR_W(svn_stream_open_readonly(&stream, auth_path, pool, pool), _("Unable to open auth file for reading")); @@ -104,6 +105,11 @@ svn_config_read_auth_data(apr_hash_t **h apr_psprintf(pool, _("Error parsing '%s'"), svn_dirent_local_style(auth_path, pool))); + stored_realm = svn_hash_gets(*hash, SVN_CONFIG_REALMSTRING_KEY); + + if (!stored_realm || strcmp(stored_realm->data, realmstring) != 0) + *hash = NULL; /* Hash collision, or somebody tampering with storage */ + SVN_ERR(svn_stream_close(stream)); } Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_file.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_file.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_file.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/config_file.c Wed Nov 19 14:37:04 2014 @@ -69,7 +69,7 @@ typedef struct parse_context_t /* Parser buffer for getc() to avoid call overhead into several libraries for every character */ - char parser_buffer[SVN_STREAM_CHUNK_SIZE]; /* Larger than most config files */ + char parser_buffer[SVN__STREAM_CHUNK_SIZE]; /* Larger than most config files */ size_t buffer_pos; /* Current position within parser_buffer */ size_t buffer_size; /* parser_buffer contains this many bytes */ } parse_context_t; Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/dirent_uri.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/dirent_uri.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/dirent_uri.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/dirent_uri.c Wed Nov 19 14:37:04 2014 @@ -38,6 +38,7 @@ #include "dirent_uri.h" #include "private/svn_fspath.h" +#include "private/svn_cert.h" /* The canonical empty path. Can this be changed? Well, change the empty test below and the path library will work, not so sure about the fs/wc @@ -2597,3 +2598,81 @@ svn_urlpath__canonicalize(const char *ur } return uri; } + + +/* -------------- The cert API (see private/svn_cert.h) ------------- */ + +svn_boolean_t +svn_cert__match_dns_identity(svn_string_t *pattern, svn_string_t *hostname) +{ + apr_size_t pattern_pos = 0, hostname_pos = 0; + + /* support leading wildcards that composed of the only character in the + * left-most label. */ + if (pattern->len >= 2 && + pattern->data[pattern_pos] == '*' && + pattern->data[pattern_pos + 1] == '.') + { + while (hostname_pos < hostname->len && + hostname->data[hostname_pos] != '.') + { + hostname_pos++; + } + /* Assume that the wildcard must match something. Rule 2 says + * that *.example.com should not match example.com. If the wildcard + * ends up not matching anything then it matches .example.com which + * seems to be essentially the same as just example.com */ + if (hostname_pos == 0) + return FALSE; + + pattern_pos++; + } + + while (pattern_pos < pattern->len && hostname_pos < hostname->len) + { + char pattern_c = pattern->data[pattern_pos]; + char hostname_c = hostname->data[hostname_pos]; + + /* fold case as described in RFC 4343. + * Note: We actually convert to lowercase, since our URI + * canonicalization code converts to lowercase and generally + * most certs are issued with lowercase DNS names, meaning + * this avoids the fold operation in most cases. The RFC + * suggests the opposite transformation, but doesn't require + * any specific implementation in any case. It is critical + * that this folding be locale independent so you can't use + * tolower(). */ + pattern_c = canonicalize_to_lower(pattern_c); + hostname_c = canonicalize_to_lower(hostname_c); + + if (pattern_c != hostname_c) + { + /* doesn't match */ + return FALSE; + } + else + { + /* characters match so skip both */ + pattern_pos++; + hostname_pos++; + } + } + + /* ignore a trailing period on the hostname since this has no effect on the + * security of the matching. See the following for the long explanation as + * to why: + * https://bugzilla.mozilla.org/show_bug.cgi?id=134402#c28 + */ + if (pattern_pos == pattern->len && + hostname_pos == hostname->len - 1 && + hostname->data[hostname_pos] == '.') + hostname_pos++; + + if (pattern_pos != pattern->len || hostname_pos != hostname->len) + { + /* end didn't match */ + return FALSE; + } + + return TRUE; +} Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/io.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/io.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/io.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/io.c Wed Nov 19 14:37:04 2014 @@ -1243,32 +1243,44 @@ svn_io_sleep_for_timestamps(const char * { /* Very simplistic but safe approach: If the filesystem has < sec mtime we can be reasonably sure - that the filesystem has <= millisecond precision. + that the filesystem has some sub-second resolution. On Windows + it is likely to be sub-millisecond; on Linux systems it depends + on the filesystem, ext4 is typically 1ms, 4ms or 10ms resolution. ## Perhaps find a better algorithm here. This will fail once - in every 1000 cases on a millisecond precision filesystem. + in every 1000 cases on a millisecond precision filesystem + if the mtime happens to be an exact second. But better to fail once in every thousand cases than every time, like we did before. - (All tested filesystems I know have at least microsecond precision.) Note for further research on algorithm: - FAT32 has < 1 sec precision on ctime, but 2 sec on mtime */ + FAT32 has < 1 sec precision on ctime, but 2 sec on mtime. - /* Sleep for at least 1 millisecond. - (t < 1000 will be round to 0 in apr) */ - apr_sleep(1000); + Linux/ext4 with CONFIG_HZ=250 has high resolution + apr_time_now and although the filesystem timestamps + have similar high precision they are only updated with + a coarser 4ms resolution. */ - return; + /* 10 milliseconds after now. */ +#ifndef SVN_HI_RES_SLEEP_MS +#define SVN_HI_RES_SLEEP_MS 10 +#endif + then = now + apr_time_from_msec(SVN_HI_RES_SLEEP_MS); } - now = apr_time_now(); /* Extract the time used for the path stat */ - - if (now >= then) - return; /* Passing negative values may suspend indefinitely (Windows) */ + /* Remove time taken to do stat() from sleep. */ + now = apr_time_now(); } - apr_sleep(then - now); + if (now >= then) + return; /* Passing negative values may suspend indefinitely (Windows) */ + + /* (t < 1000 will be round to 0 in apr) */ + if (then - now < 1000) + apr_sleep(1000); + else + apr_sleep(then - now); } @@ -4663,8 +4675,25 @@ svn_io_open_unique_file3(apr_file_t **fi * case, but only if the umask allows it. */ if (!using_system_temp_dir) { + svn_error_t *err; + SVN_ERR(merge_default_file_perms(tempfile, &perms, scratch_pool)); - SVN_ERR(file_perms_set2(tempfile, perms, scratch_pool)); + err = file_perms_set2(tempfile, perms, scratch_pool); + if (err) + { + if (APR_STATUS_IS_INCOMPLETE(err->apr_err) || + APR_STATUS_IS_ENOTIMPL(err->apr_err)) + svn_error_clear(err); + else + { + const char *message; + message = apr_psprintf(scratch_pool, + _("Can't set permissions on '%s'"), + svn_dirent_local_style(tempname, + scratch_pool)); + return svn_error_quick_wrap(err, message); + } + } } #endif Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/opt.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/opt.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/opt.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/opt.c Wed Nov 19 14:37:04 2014 @@ -417,7 +417,9 @@ svn_opt_subcommand_help3(const char *sub _("\"%s\": unknown command.\n\n"), subcommand); if (err) { - svn_handle_error2(err, stderr, FALSE, "svn: "); + /* Issue #3014: Don't print anything on broken pipes. */ + if (err->apr_err != SVN_ERR_IO_PIPE_WRITE_ERROR) + svn_handle_error2(err, stderr, FALSE, "svn: "); svn_error_clear(err); } } Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/prompt.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/prompt.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/prompt.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/prompt.c Wed Nov 19 14:37:04 2014 @@ -177,7 +177,7 @@ terminal_open(terminal_handle_t **termin and stderr for prompting. */ apr_file_t *tmpfd; status = apr_file_open(&tmpfd, "/dev/tty", - APR_FOPEN_READ | APR_FOPEN_WRITE, + APR_READ | APR_WRITE, APR_OS_DEFAULT, pool); *terminal = apr_palloc(pool, sizeof(terminal_handle_t)); if (!status) Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/version.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/version.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/version.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_subr/version.c Wed Nov 19 14:37:04 2014 @@ -136,7 +136,7 @@ svn_version_extended(svn_boolean_t verbo info->build_time = __TIME__; info->build_host = SVN_BUILD_HOST; info->copyright = apr_pstrdup - (pool, _("Copyright (C) 2013 The Apache Software Foundation.\n" + (pool, _("Copyright (C) 2014 The Apache Software Foundation.\n" "This software consists of contributions made by many people;\n" "see the NOTICE file for more information.\n" "Subversion is open source software, see " Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/status.c URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/status.c?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/status.c (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/status.c Wed Nov 19 14:37:04 2014 @@ -242,144 +242,7 @@ struct file_baton /** Code **/ -/* Fill in *INFO with the information it would contain if it were - obtained from svn_wc__db_read_children_info. */ -static svn_error_t * -read_info(const struct svn_wc__db_info_t **info, - const char *local_abspath, - svn_wc__db_t *db, - apr_pool_t *result_pool, - apr_pool_t *scratch_pool) -{ - struct svn_wc__db_info_t *mtb = apr_pcalloc(result_pool, sizeof(*mtb)); - const svn_checksum_t *checksum; - const char *original_repos_relpath; - - SVN_ERR(svn_wc__db_read_info(&mtb->status, &mtb->kind, - &mtb->revnum, &mtb->repos_relpath, - &mtb->repos_root_url, &mtb->repos_uuid, - &mtb->changed_rev, &mtb->changed_date, - &mtb->changed_author, &mtb->depth, - &checksum, NULL, &original_repos_relpath, NULL, - NULL, NULL, &mtb->lock, &mtb->recorded_size, - &mtb->recorded_time, &mtb->changelist, - &mtb->conflicted, &mtb->op_root, - &mtb->had_props, &mtb->props_mod, - &mtb->have_base, &mtb->have_more_work, NULL, - db, local_abspath, - result_pool, scratch_pool)); - - SVN_ERR(svn_wc__db_wclocked(&mtb->locked, db, local_abspath, scratch_pool)); - - /* Maybe we have to get some shadowed lock from BASE to make our test suite - happy... (It might be completely unrelated, but...) */ - if (mtb->have_base - && (mtb->status == svn_wc__db_status_added - || mtb->status == svn_wc__db_status_deleted - || mtb->kind == svn_node_file)) - { - svn_boolean_t update_root; - svn_wc__db_lock_t **lock_arg = NULL; - - if (mtb->status == svn_wc__db_status_added - || mtb->status == svn_wc__db_status_deleted) - lock_arg = &mtb->lock; - - SVN_ERR(svn_wc__db_base_get_info(NULL, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, NULL, NULL, - lock_arg, NULL, NULL, &update_root, - db, local_abspath, - result_pool, scratch_pool)); - - mtb->file_external = (update_root && mtb->kind == svn_node_file); - - if (mtb->status == svn_wc__db_status_deleted) - { - const char *moved_to_abspath; - const char *moved_to_op_root_abspath; - - /* NOTE: we can't use op-root-ness as a condition here since a base - * node can be the root of a move and still not be an explicit - * op-root (having a working node with op_depth == pathelements). - * - * Both these (almost identical) situations showcase this: - * svn mv a/b bb - * svn del a - * and - * svn mv a aa - * svn mv aa/b bb - * In both, 'bb' is moved from 'a/b', but 'a/b' has no op_depth>0 - * node at all, as its parent 'a' is locally deleted. */ - - SVN_ERR(svn_wc__db_scan_deletion(NULL, - &moved_to_abspath, - NULL, - &moved_to_op_root_abspath, - db, local_abspath, - scratch_pool, scratch_pool)); - if (moved_to_abspath != NULL - && moved_to_op_root_abspath != NULL - && strcmp(moved_to_abspath, moved_to_op_root_abspath) == 0) - { - mtb->moved_to_abspath = apr_pstrdup(result_pool, - moved_to_abspath); - } - /* ### ^^^ THIS SUCKS. For at least two reasons: - * 1) We scan the node deletion and that's technically not necessary. - * We'd be fine to know if this is an actual root of a move. - * 2) From the elaborately calculated results, we backwards-guess - * whether this is a root. - * It works ok, and this code only gets called when a node is an - * explicit target of a 'status'. But it would be better to do this - * differently. - * We could return moved-to via svn_wc__db_base_get_info() (called - * just above), but as moved-to is only intended to be returned for - * roots of a move, that doesn't fit too well. */ - } - } - - /* ### svn_wc__db_read_info() could easily return the moved-here flag. But - * for now... (The per-dir query for recursive status is far more optimal.) - * Note that this actually scans around to get the full path, for a bool. - * This bool then gets returned, later is evaluated, and if true leads to - * the same paths being scanned again. We'd want to obtain this bool here as - * cheaply as svn_wc__db_read_children_info() does. */ - if (mtb->status == svn_wc__db_status_added) - { - svn_wc__db_status_t status; - - SVN_ERR(svn_wc__db_scan_addition(&status, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, - db, local_abspath, - result_pool, scratch_pool)); - - mtb->moved_here = (status == svn_wc__db_status_moved_here); - mtb->incomplete = (status == svn_wc__db_status_incomplete); - } - - mtb->has_checksum = (checksum != NULL); - mtb->copied = (original_repos_relpath != NULL); - -#ifdef HAVE_SYMLINK - if (mtb->kind == svn_node_file - && (mtb->had_props || mtb->props_mod)) - { - apr_hash_t *properties; - - if (mtb->props_mod) - SVN_ERR(svn_wc__db_read_props(&properties, db, local_abspath, - scratch_pool, scratch_pool)); - else - SVN_ERR(svn_wc__db_read_pristine_props(&properties, db, local_abspath, - scratch_pool, scratch_pool)); - mtb->special = (NULL != svn_hash_gets(properties, SVN_PROP_SPECIAL)); - } -#endif - *info = mtb; - - return SVN_NO_ERROR; -} /* Return *REPOS_RELPATH and *REPOS_ROOT_URL for LOCAL_ABSPATH using information in INFO if available, falling back on @@ -421,13 +284,42 @@ get_repos_root_url_relpath(const char ** db, local_abspath, result_pool, scratch_pool)); } - else if (info->have_base) + else if (info->status == svn_wc__db_status_deleted + && !info->have_more_work + && info->have_base) { SVN_ERR(svn_wc__db_scan_base_repos(repos_relpath, repos_root_url, repos_uuid, db, local_abspath, result_pool, scratch_pool)); } + else if (info->status == svn_wc__db_status_deleted) + { + const char *work_del_abspath; + const char *add_abspath; + + /* Handles working DELETE and the special case where there is just + svn_wc__db_status_not_present in WORKING */ + + SVN_ERR(svn_wc__db_scan_deletion(NULL, NULL, &work_del_abspath, NULL, + db, local_abspath, + scratch_pool, scratch_pool)); + + /* The parent of what has been deleted must be added */ + add_abspath = svn_dirent_dirname(work_del_abspath, scratch_pool); + + SVN_ERR(svn_wc__db_scan_addition(NULL, NULL, repos_relpath, + repos_root_url, repos_uuid, NULL, + NULL, NULL, NULL, + db, add_abspath, + result_pool, scratch_pool)); + + *repos_relpath = svn_relpath_join(*repos_relpath, + svn_dirent_skip_ancestor( + add_abspath, + local_abspath), + result_pool); + } else { *repos_relpath = NULL; @@ -493,7 +385,8 @@ assemble_status(svn_wc_status3_t **statu if (!info) - SVN_ERR(read_info(&info, local_abspath, db, result_pool, scratch_pool)); + SVN_ERR(svn_wc__db_read_single_info(&info, db, local_abspath, + result_pool, scratch_pool)); if (!info->repos_relpath || !parent_repos_relpath) switched_p = FALSE; @@ -799,8 +692,11 @@ assemble_status(svn_wc_status3_t **statu stat->changelist = apr_pstrdup(result_pool, info->changelist); stat->moved_from_abspath = moved_from_abspath; - if (info->moved_to_abspath) - stat->moved_to_abspath = apr_pstrdup(result_pool, info->moved_to_abspath); + + /* ### TODO: Handle multiple moved_to values properly */ + if (info->moved_to) + stat->moved_to_abspath = apr_pstrdup(result_pool, + info->moved_to->moved_to_abspath); stat->file_external = info->file_external; @@ -1345,8 +1241,8 @@ get_dir_status(const struct walk_status_ SVN_ERR(err); if (!dir_info) - SVN_ERR(read_info(&dir_info, local_abspath, wb->db, - scratch_pool, iterpool)); + SVN_ERR(svn_wc__db_read_single_info(&dir_info, wb->db, local_abspath, + scratch_pool, iterpool)); SVN_ERR(get_repos_root_url_relpath(&dir_repos_relpath, &dir_repos_root_url, &dir_repos_uuid, dir_info, @@ -1506,8 +1402,9 @@ get_child_status(const struct walk_statu if (dirent->kind == svn_node_none) dirent = NULL; - SVN_ERR(read_info(&dir_info, parent_abspath, wb->db, - scratch_pool, scratch_pool)); + SVN_ERR(svn_wc__db_read_single_info(&dir_info, + wb->db, parent_abspath, + scratch_pool, scratch_pool)); SVN_ERR(get_repos_root_url_relpath(&dir_repos_relpath, &dir_repos_root_url, &dir_repos_uuid, dir_info, @@ -2710,7 +2607,8 @@ svn_wc__internal_walk_status(svn_wc__db_ ignore_patterns = ignores; } - err = read_info(&info, local_abspath, db, scratch_pool, scratch_pool); + err = svn_wc__db_read_single_info(&info, db, local_abspath, + scratch_pool, scratch_pool); if (err) { Modified: subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/wc-queries.sql URL: http://svn.apache.org/viewvc/subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/wc-queries.sql?rev=1640562&r1=1640561&r2=1640562&view=diff ============================================================================== --- subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/wc-queries.sql (original) +++ subversion/branches/1.8.x-r1536854/subversion/libsvn_wc/wc-queries.sql Wed Nov 19 14:37:04 2014 @@ -191,7 +191,7 @@ WHERE wc_id = ?1 -- STMT_DELETE_NODE DELETE FROM NODES -WHERE wc_id = ?1 AND local_relpath = ?2 +WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth = ?3 -- STMT_DELETE_ACTUAL_FOR_BASE_RECURSIVE /* The ACTUAL_NODE applies to BASE, unless there is in at least one op_depth @@ -417,6 +417,12 @@ LEFT OUTER JOIN nodes AS moved WHERE work.wc_id = ?1 AND work.local_relpath = ?2 AND work.op_depth > 0 LIMIT 1 +-- STMT_SELECT_MOVED_TO_NODE +SELECT op_depth, moved_to +FROM nodes +WHERE wc_id = ?1 AND local_relpath = ?2 AND moved_to IS NOT NULL +ORDER BY op_depth DESC + -- STMT_SELECT_OP_DEPTH_MOVED_TO SELECT op_depth, moved_to, repos_path, revision FROM nodes @@ -711,7 +717,7 @@ WHERE wc_id = ?1 AND local_relpath = ?2 WHERE wc_id = ?1 AND local_relpath = ?2 AND op_depth > ?3) AND presence = MAP_BASE_DELETED --- STMT_DELETE_ALL_LAYERS +-- STMT_DELETE_NODE_ALL_LAYERS DELETE FROM nodes WHERE wc_id = ?1 AND local_relpath = ?2 @@ -1503,7 +1509,6 @@ WHERE wc_id = ?1 AND presence=MAP_NORMAL AND file_external IS NULL -/* ### FIXME: op-depth? What about multiple moves? */ -- STMT_SELECT_MOVED_FROM_RELPATH SELECT local_relpath, op_depth FROM nodes WHERE wc_id = ?1 AND moved_to = ?2 AND op_depth > 0 @@ -1530,14 +1535,31 @@ SELECT moved_to, local_relpath FROM node WHERE wc_id = ?1 AND op_depth > 0 AND IS_STRICT_DESCENDANT_OF(moved_to, ?2) +/* If the node is moved here (r.moved_here = 1) we are really interested in + where the node was moved from. To obtain that we need the op_depth, but + this form of select only allows a single return value */ -- STMT_SELECT_MOVED_FOR_DELETE -SELECT local_relpath, moved_to, op_depth FROM nodes +SELECT local_relpath, moved_to, op_depth, + (SELECT CASE WHEN r.moved_here THEN r.op_depth END FROM nodes r + WHERE r.wc_id = ?1 + AND r.local_relpath = n.local_relpath + AND r.op_depth < n.op_depth + ORDER BY r.op_depth DESC LIMIT 1) AS moved_here_op_depth + FROM nodes n WHERE wc_id = ?1 AND (local_relpath = ?2 OR IS_STRICT_DESCENDANT_OF(local_relpath, ?2)) AND moved_to IS NOT NULL - AND op_depth >= (SELECT MAX(op_depth) FROM nodes o - WHERE o.wc_id = ?1 - AND o.local_relpath = ?2) + AND op_depth >= ?3 + +-- STMT_SELECT_MOVED_FROM_FOR_DELETE +SELECT local_relpath, op_depth, + (SELECT CASE WHEN r.moved_here THEN r.op_depth END FROM nodes r + WHERE r.wc_id = ?1 + AND r.local_relpath = n.local_relpath + AND r.op_depth < n.op_depth + ORDER BY r.op_depth DESC LIMIT 1) AS moved_here_op_depth + FROM nodes n +WHERE wc_id = ?1 AND moved_to = ?2 AND op_depth > 0 -- STMT_UPDATE_MOVED_TO_DESCENDANTS UPDATE nodes SET moved_to = RELPATH_SKIP_JOIN(?2, ?3, moved_to)
