You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by sv...@apache.org on 2012/05/10 06:02:53 UTC
svn commit: r1336475 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_client/client.h subversion/libsvn_client/externals.c
subversion/libsvn_client/status.c
Author: svn-role
Date: Thu May 10 04:02:53 2012
New Revision: 1336475
URL: http://svn.apache.org/viewvc?rev=1336475&view=rev
Log:
Merge r1335104 from trunk:
* r1335104
Avoid a sometimes very expensive operation in svn status' external
processing. (issue #4178)
Justification:
See the "svn status <file> is slow under a large check-out" on
users{_AT_}subversion.apache.org
Votes:
+1: rhuijben, stsp, philip
>>>>>>> .r1336474
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_client/client.h
subversion/branches/1.7.x/subversion/libsvn_client/externals.c
subversion/branches/1.7.x/subversion/libsvn_client/status.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/trunk:r1335104
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1336475&r1=1336474&r2=1336475&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Thu May 10 04:02:53 2012
@@ -57,12 +57,3 @@ Veto-blocked changes:
Approved changes:
=================
-
- * r1335104
- Avoid a sometimes very expensive operation in svn status' external
- processing. (issue #4178)
- Justification:
- See the "svn status <file> is slow under a large check-out" on
- users{_AT_}subversion.apache.org
- Votes:
- +1: rhuijben, stsp, philip
Modified: subversion/branches/1.7.x/subversion/libsvn_client/client.h
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/client.h?rev=1336475&r1=1336474&r2=1336475&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/client.h (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/client.h Thu May 10 04:02:53 2012
@@ -927,11 +927,12 @@ svn_client__export_externals(apr_hash_t
apr_pool_t *pool);
-/* Perform status operations on each external in TRAVERSAL_INFO. All
- other options are the same as those passed to svn_client_status(). */
+/* Perform status operations on each external in EXTERNAL_MAP, a const char *
+ local_abspath of all externals mapping to the const char* defining_abspath.
+ All other options are the same as those passed to svn_client_status(). */
svn_error_t *
svn_client__do_external_status(svn_client_ctx_t *ctx,
- apr_hash_t *external_defs,
+ apr_hash_t *external_map,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t update,
Modified: subversion/branches/1.7.x/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/externals.c?rev=1336475&r1=1336474&r2=1336475&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/externals.c Thu May 10 04:02:53 2012
@@ -24,7 +24,7 @@
/* ==================================================================== */
-
+
/*** Includes. ***/
#include <apr_uri.h>
@@ -41,7 +41,7 @@
#include "svn_private_config.h"
#include "private/svn_wc_private.h"
-
+
/* Closure for handle_external_item_change. */
struct external_change_baton_t
{
@@ -1278,7 +1278,7 @@ svn_client__export_externals(apr_hash_t
svn_error_t *
svn_client__do_external_status(svn_client_ctx_t *ctx,
- apr_hash_t *externals_new,
+ apr_hash_t *external_map,
svn_depth_t depth,
svn_boolean_t get_all,
svn_boolean_t update,
@@ -1288,69 +1288,59 @@ svn_client__do_external_status(svn_clien
apr_pool_t *pool)
{
apr_hash_index_t *hi;
- apr_pool_t *subpool = svn_pool_create(pool);
+ apr_pool_t *iterpool = svn_pool_create(pool);
/* Loop over the hash of new values (we don't care about the old
ones). This is a mapping of versioned directories to property
values. */
- for (hi = apr_hash_first(pool, externals_new);
+ for (hi = apr_hash_first(pool, external_map);
hi;
hi = apr_hash_next(hi))
{
- apr_array_header_t *exts;
- const char *path = svn__apr_hash_index_key(hi);
- const char *propval = svn__apr_hash_index_val(hi);
- apr_pool_t *iterpool;
- int i;
+ svn_node_kind_t external_kind;
+ const char *local_abspath = svn__apr_hash_index_key(hi);
+ const char *defining_abspath = svn__apr_hash_index_val(hi);
+ svn_node_kind_t kind;
+ svn_opt_revision_t opt_rev;
- /* Clear the subpool. */
- svn_pool_clear(subpool);
+ svn_pool_clear(iterpool);
- /* Parse the svn:externals property value. This results in a
- hash mapping subdirectories to externals structures. */
- SVN_ERR(svn_wc_parse_externals_description3(&exts, path, propval,
- FALSE, subpool));
+ /* Obtain information on the expected external. */
+ SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
+ &opt_rev.value.number,
+ ctx->wc_ctx, defining_abspath,
+ local_abspath, FALSE,
+ iterpool, iterpool));
- /* Make a sub-pool of SUBPOOL. */
- iterpool = svn_pool_create(subpool);
+ if (external_kind != svn_node_dir)
+ continue;
- /* Loop over the subdir array. */
- for (i = 0; exts && (i < exts->nelts); i++)
- {
- const char *fullpath;
- svn_wc_external_item2_t *external;
- svn_node_kind_t kind;
-
- svn_pool_clear(iterpool);
-
- external = APR_ARRAY_IDX(exts, i, svn_wc_external_item2_t *);
- fullpath = svn_dirent_join(path, external->target_dir, iterpool);
-
- /* If the external target directory doesn't exist on disk,
- just skip it. */
- SVN_ERR(svn_io_check_path(fullpath, &kind, iterpool));
- if (kind != svn_node_dir)
- continue;
-
- /* Tell the client we're starting an external status set. */
- if (ctx->notify_func2)
- (ctx->notify_func2)(
+ SVN_ERR(svn_io_check_path(local_abspath, &kind, iterpool));
+ if (kind != svn_node_dir)
+ continue;
+
+ if (SVN_IS_VALID_REVNUM(opt_rev.value.number))
+ opt_rev.kind = svn_opt_revision_number;
+ else
+ opt_rev.kind = svn_opt_revision_unspecified;
+
+ /* Tell the client we're starting an external status set. */
+ if (ctx->notify_func2)
+ ctx->notify_func2(
ctx->notify_baton2,
- svn_wc_create_notify(fullpath, svn_wc_notify_status_external,
+ svn_wc_create_notify(local_abspath,
+ svn_wc_notify_status_external,
iterpool), iterpool);
- /* And then do the status. */
- SVN_ERR(svn_client_status5(NULL, ctx, fullpath,
- &(external->revision),
- depth, get_all, update,
- no_ignore, FALSE, FALSE, NULL,
- status_func, status_baton,
- iterpool));
- }
+ /* And then do the status. */
+ SVN_ERR(svn_client_status5(NULL, ctx, local_abspath, &opt_rev, depth,
+ get_all, update, no_ignore, FALSE, FALSE,
+ NULL, status_func, status_baton,
+ iterpool));
}
/* Destroy SUBPOOL and (implicitly) ITERPOOL. */
- svn_pool_destroy(subpool);
+ svn_pool_destroy(iterpool);
return SVN_NO_ERROR;
}
Modified: subversion/branches/1.7.x/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/status.c?rev=1336475&r1=1336474&r2=1336475&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/status.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/status.c Thu May 10 04:02:53 2012
@@ -505,13 +505,13 @@ svn_client_status5(svn_revnum_t *result_
*/
if (SVN_DEPTH_IS_RECURSIVE(depth) && (! ignore_externals))
{
- apr_hash_t *externals_new;
- SVN_ERR(svn_wc__externals_gather_definitions(&externals_new, NULL,
- ctx->wc_ctx, target_abspath,
- depth, pool, pool));
+ apr_hash_t *external_map;
+ SVN_ERR(svn_wc__externals_defined_below(&external_map,
+ ctx->wc_ctx, target_abspath,
+ pool, pool));
- SVN_ERR(svn_client__do_external_status(ctx, externals_new,
+ SVN_ERR(svn_client__do_external_status(ctx, external_map,
depth, get_all,
update, no_ignore,
status_func, status_baton, pool));
Re: svn commit: r1336475 - in /subversion/branches/1.7.x: ./
STATUS subversion/libsvn_client/client.h
subversion/libsvn_client/externals.c subversion/libsvn_client/status.c
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Bert Huijben wrote on Thu, May 10, 2012 at 10:26:18 +0200:
>
>
> > -----Original Message-----
> > From: svn-role@apache.org [mailto:svn-role@apache.org]
> > Sent: donderdag 10 mei 2012 6:03
> > To: commits@subversion.apache.org
> > Subject: svn commit: r1336475 - in /subversion/branches/1.7.x: ./ STATUS
> > subversion/libsvn_client/client.h subversion/libsvn_client/externals.c
> > subversion/libsvn_client/status.c
> >
> > Author: svn-role
> > Date: Thu May 10 04:02:53 2012
> > New Revision: 1336475
> >
> > URL: http://svn.apache.org/viewvc?rev=1336475&view=rev
> > Log:
> > Merge r1335104 from trunk:
> >
> > * r1335104
> > Avoid a sometimes very expensive operation in svn status' external
> > processing. (issue #4178)
> > Justification:
> > See the "svn status <file> is slow under a large check-out" on
> > users{_AT_}subversion.apache.org
> > Votes:
> > +1: rhuijben, stsp, philip
> > >>>>>>> .r1336474
>
>
> ^^^ This doesn't look right.
>
Note: the merge itself is correct.
> What happened?
>
Given that this is r1336475 and the problem is a conflict marker of
r1336474, I assume the conflict marker was generated during 'svn up'.
I don't understand how the commit succeeded if the update had conflicted.
> Bert
>
>
RE: svn commit: r1336475 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_client/client.h subversion/libsvn_client/externals.c subversion/libsvn_client/status.c
Posted by Bert Huijben <be...@qqmail.nl>.
> -----Original Message-----
> From: svn-role@apache.org [mailto:svn-role@apache.org]
> Sent: donderdag 10 mei 2012 6:03
> To: commits@subversion.apache.org
> Subject: svn commit: r1336475 - in /subversion/branches/1.7.x: ./ STATUS
> subversion/libsvn_client/client.h subversion/libsvn_client/externals.c
> subversion/libsvn_client/status.c
>
> Author: svn-role
> Date: Thu May 10 04:02:53 2012
> New Revision: 1336475
>
> URL: http://svn.apache.org/viewvc?rev=1336475&view=rev
> Log:
> Merge r1335104 from trunk:
>
> * r1335104
> Avoid a sometimes very expensive operation in svn status' external
> processing. (issue #4178)
> Justification:
> See the "svn status <file> is slow under a large check-out" on
> users{_AT_}subversion.apache.org
> Votes:
> +1: rhuijben, stsp, philip
> >>>>>>> .r1336474
^^^ This doesn't look right.
What happened?
Bert