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/09 12:54:13 UTC
svn commit: r1336074 - in /subversion/branches/1.7.x: ./
subversion/include/private/ subversion/libsvn_client/
subversion/libsvn_fs_fs/ subversion/libsvn_subr/ subversion/tests/cmdline/
Author: svn-role
Date: Wed May 9 10:54:12 2012
New Revision: 1336074
URL: http://svn.apache.org/viewvc?rev=1336074&view=rev
Log:
Reintegrate the 1.7.x-issue4087 branch:
* r1164929, r1200277, r1243694, r1243840, r1243920, r1244466, r1244551, r1295372
Workaround for issue #4087, "bogus repos_id in wc.db for file externals"
Justification:
Regression from 1.6. Some repositories with file externals cannot be
checked out with 1.7. Users complained.
See http://svn.haxx.se/users/archive-2011-12/0299.shtml
Branch:
^/subversion/branches/1.7.x-issue4087
Notes:
r1164929 and r1200277 were merged to simplify conflict resolution
r1243694 implements the workaround
r1243840 is a cosmetic follow-up treak
r1243920 was merged for conflict resolution for r1244466
r1244466 eliminates an unneccesary RA round-trip from r1243694
r1244551 uses a better API to query the local repos root and uuid
r1295372 improves test coverage
Votes:
+1: stsp, neels
+1: rhuijben (Fix is good, but a very noisy merge)
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/CHANGES (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/include/private/svn_adler32.h (props changed)
subversion/branches/1.7.x/subversion/include/private/svn_string_private.h (props changed)
subversion/branches/1.7.x/subversion/include/private/svn_temp_serializer.h (props changed)
subversion/branches/1.7.x/subversion/libsvn_client/checkout.c
subversion/branches/1.7.x/subversion/libsvn_client/client.h
subversion/branches/1.7.x/subversion/libsvn_client/copy.c
subversion/branches/1.7.x/subversion/libsvn_client/externals.c
subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.c (props changed)
subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.h (props changed)
subversion/branches/1.7.x/subversion/libsvn_subr/adler32.c (props changed)
subversion/branches/1.7.x/subversion/libsvn_subr/hash.c (props changed)
subversion/branches/1.7.x/subversion/libsvn_subr/svn_base64.c (props changed)
subversion/branches/1.7.x/subversion/libsvn_subr/svn_temp_serializer.c (props changed)
subversion/branches/1.7.x/subversion/tests/cmdline/basic_tests.py (props changed)
subversion/branches/1.7.x/subversion/tests/cmdline/externals_tests.py
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4087:r1243707-1336073
Merged /subversion/trunk:r1164929,1200277,1243694,1243840,1243920,1244466,1244551,1295372
Propchange: subversion/branches/1.7.x/CHANGES
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4087/CHANGES:r1243707-1336073
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1336074&r1=1336073&r2=1336074&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed May 9 10:54:12 2012
@@ -76,23 +76,3 @@ Approved changes:
^/subversion/branches/1.7.x-issue4169
Votes:
+1: pburba, rhuijben, stsp
-
- * r1164929, r1200277, r1243694, r1243840, r1243920, r1244466, r1244551, r1295372
- Workaround for issue #4087, "bogus repos_id in wc.db for file externals"
- Justification:
- Regression from 1.6. Some repositories with file externals cannot be
- checked out with 1.7. Users complained.
- See http://svn.haxx.se/users/archive-2011-12/0299.shtml
- Branch:
- ^/subversion/branches/1.7.x-issue4087
- Notes:
- r1164929 and r1200277 were merged to simplify conflict resolution
- r1243694 implements the workaround
- r1243840 is a cosmetic follow-up treak
- r1243920 was merged for conflict resolution for r1244466
- r1244466 eliminates an unneccesary RA round-trip from r1243694
- r1244551 uses a better API to query the local repos root and uuid
- r1295372 improves test coverage
- Votes:
- +1: stsp, neels
- +1: rhuijben (Fix is good, but a very noisy merge)
Propchange: subversion/branches/1.7.x/subversion/include/private/svn_adler32.h
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4087/subversion/include/private/svn_adler32.h:r1243707-1336073
Merged /subversion/trunk/subversion/include/private/svn_adler32.h:r1164929
Propchange: subversion/branches/1.7.x/subversion/include/private/svn_string_private.h
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4087/subversion/include/private/svn_string_private.h:r1243707-1336073
Merged /subversion/trunk/subversion/include/private/svn_string_private.h:r1164929
Propchange: subversion/branches/1.7.x/subversion/include/private/svn_temp_serializer.h
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/include/private/svn_temp_serializer.h:r1164929
Merged /subversion/branches/1.7.x-issue4087/subversion/include/private/svn_temp_serializer.h:r1243707-1336073
Modified: subversion/branches/1.7.x/subversion/libsvn_client/checkout.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/checkout.c?rev=1336074&r1=1336073&r2=1336074&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/checkout.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/checkout.c Wed May 9 10:54:12 2012
@@ -73,7 +73,6 @@ svn_client__checkout_internal(svn_revnum
const char *local_abspath,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
- const svn_client__ra_session_from_path_results *ra_cache,
svn_depth_t depth,
svn_boolean_t ignore_externals,
svn_boolean_t allow_unver_obstructions,
@@ -88,6 +87,10 @@ svn_client__checkout_internal(svn_revnum
const char *session_url;
svn_node_kind_t kind;
const char *uuid, *repos_root;
+ apr_pool_t *session_pool = svn_pool_create(pool);
+ svn_ra_session_t *ra_session;
+ svn_revnum_t tmp_revnum;
+ const char *tmp_session_url;
/* Sanity check. Without these, the checkout is meaningless. */
SVN_ERR_ASSERT(local_abspath != NULL);
@@ -100,60 +103,19 @@ svn_client__checkout_internal(svn_revnum
&& (revision->kind != svn_opt_revision_head))
return svn_error_create(SVN_ERR_CLIENT_BAD_REVISION, NULL, NULL);
- {
- svn_boolean_t have_repos_root_url;
- svn_boolean_t have_repos_uuid;
- svn_boolean_t have_session_url;
- svn_boolean_t have_revnum;
- svn_boolean_t have_kind;
-
- if ((have_repos_root_url = (ra_cache && ra_cache->repos_root_url)))
- repos_root = ra_cache->repos_root_url;
-
- if ((have_repos_uuid = (ra_cache && ra_cache->repos_uuid)))
- uuid = ra_cache->repos_uuid;
-
- if ((have_session_url = (ra_cache && ra_cache->ra_session_url)))
- session_url = ra_cache->ra_session_url;
-
- if ((have_revnum = (ra_cache && SVN_IS_VALID_REVNUM(ra_cache->ra_revnum))))
- revnum = ra_cache->ra_revnum;
-
- if ((have_kind = (ra_cache && ra_cache->kind != svn_node_unknown)))
- kind = ra_cache->kind;
-
- if (! have_repos_root_url || ! have_repos_uuid || ! have_session_url ||
- ! have_revnum || ! have_kind)
- {
- apr_pool_t *session_pool = svn_pool_create(pool);
- svn_ra_session_t *ra_session;
- svn_revnum_t tmp_revnum;
- const char *tmp_session_url;
-
- /* Get the RA connection. */
- SVN_ERR(svn_client__ra_session_from_path(&ra_session, &tmp_revnum,
- &tmp_session_url, url, NULL,
- peg_revision, revision, ctx,
- session_pool));
-
- if (! have_repos_root_url)
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
-
- if (! have_repos_uuid)
- SVN_ERR(svn_ra_get_uuid2(ra_session, &uuid, pool));
-
- if (! have_session_url)
- session_url = apr_pstrdup(pool, tmp_session_url);
-
- if (! have_revnum)
- revnum = tmp_revnum;
-
- if (! have_kind)
- SVN_ERR(svn_ra_check_path(ra_session, "", revnum, &kind, pool));
-
- svn_pool_destroy(session_pool);
- }
- }
+ /* Get the RA connection. */
+ SVN_ERR(svn_client__ra_session_from_path(&ra_session, &tmp_revnum,
+ &tmp_session_url, url, NULL,
+ peg_revision, revision, ctx,
+ session_pool));
+
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root, pool));
+ SVN_ERR(svn_ra_get_uuid2(ra_session, &uuid, pool));
+ session_url = apr_pstrdup(pool, tmp_session_url);
+ revnum = tmp_revnum;
+ SVN_ERR(svn_ra_check_path(ra_session, "", revnum, &kind, pool));
+
+ svn_pool_destroy(session_pool);
if (kind == svn_node_none)
return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
@@ -253,7 +215,7 @@ svn_client_checkout3(svn_revnum_t *resul
SVN_ERR(svn_dirent_get_absolute(&local_abspath, path, pool));
return svn_client__checkout_internal(result_rev, URL, local_abspath,
- peg_revision, revision, NULL, depth,
+ peg_revision, revision, depth,
ignore_externals,
allow_unver_obstructions, NULL,
ctx, pool);
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=1336074&r1=1336073&r2=1336074&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/client.h (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/client.h Wed May 9 10:54:12 2012
@@ -451,36 +451,6 @@ svn_client__update_internal(svn_revnum_t
svn_client_ctx_t *ctx,
apr_pool_t *pool);
-/* Structure holding the results of svn_client__ra_session_from_path()
- plus the repository root URL and UUID and the node kind for the
- input URL, REVISION and PEG_REVISION . See
- svn_client__ra_session_from_path() for the meaning of these fields.
- This structure is used by svn_client__checkout_internal() to save
- one or more round-trips if the client already gathered some of this
- information. Not all the fields need to be filled in. */
-typedef struct svn_client__ra_session_from_path_results
-{
- /* The repository root URL. A NULL value means the root URL is
- unknown.*/
- const char *repos_root_url;
-
- /* The repository UUID. A NULL value means the UUID is unknown. */
- const char *repos_uuid;
-
- /* The actual final resulting URL for the input URL. This may be
- different because of copy history. A NULL value means the
- resulting URL is unknown. */
- const char *ra_session_url;
-
- /* The actual final resulting revision for the input URL. An
- invalid revnum as determined by SVN_IS_VALID_REVNUM() means the
- revnum is unknown. */
- svn_revnum_t ra_revnum;
-
- /* An optional node kind for the URL. svn_node_unknown if unknown */
- svn_node_kind_t kind;
-} svn_client__ra_session_from_path_results;
-
/* Checkout into LOCAL_ABSPATH a working copy of URL at REVISION, and (if not
NULL) set RESULT_REV to the checked out revision.
@@ -517,7 +487,6 @@ svn_client__checkout_internal(svn_revnum
const char *local_abspath,
const svn_opt_revision_t *peg_revision,
const svn_opt_revision_t *revision,
- const svn_client__ra_session_from_path_results *ra_cache,
svn_depth_t depth,
svn_boolean_t ignore_externals,
svn_boolean_t allow_unver_obstructions,
Modified: subversion/branches/1.7.x/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/copy.c?rev=1336074&r1=1336073&r2=1336074&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/copy.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/copy.c Wed May 9 10:54:12 2012
@@ -1547,7 +1547,7 @@ repos_to_wc_copy_single(svn_client__copy
pair->src_original,
tmp_abspath,
&pair->src_peg_revision,
- &pair->src_op_revision, NULL,
+ &pair->src_op_revision,
svn_depth_infinity,
ignore_externals, FALSE,
&sleep_needed, ctx, pool);
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=1336074&r1=1336073&r2=1336074&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/externals.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/externals.c Wed May 9 10:54:12 2012
@@ -273,7 +273,7 @@ switch_dir_external(const char *local_ab
/* ... Hello, new hotness. */
SVN_ERR(svn_client__checkout_internal(NULL, url, local_abspath, peg_revision,
- revision, NULL, svn_depth_infinity,
+ revision, svn_depth_infinity,
FALSE, FALSE, timestamp_sleep,
ctx, pool));
@@ -816,10 +816,15 @@ handle_external_item_change(const struct
apr_pool_t *scratch_pool)
{
svn_ra_session_t *ra_session;
- svn_client__ra_session_from_path_results ra_cache = { 0 };
+ svn_revnum_t ra_revnum;
+ const char *ra_session_url;
+ const char *repos_root_url;
+ const char *repos_uuid;
const char *new_url;
+ svn_node_kind_t ext_kind;
+ svn_node_kind_t local_kind;
- ra_cache.kind = svn_node_unknown;
+ local_kind = svn_node_unknown;
SVN_ERR_ASSERT(eb->repos_root_url && parent_dir_url);
SVN_ERR_ASSERT(new_item != NULL);
@@ -836,140 +841,130 @@ handle_external_item_change(const struct
parent_dir_url,
scratch_pool, scratch_pool));
- /* If the external is being checked out, exported or updated,
- determine if the external is a file or directory. */
- if (new_item)
- {
- svn_node_kind_t kind;
-
- /* Get the RA connection. */
- SVN_ERR(svn_client__ra_session_from_path(&ra_session,
- &ra_cache.ra_revnum,
- &ra_cache.ra_session_url,
- new_url, NULL,
- &(new_item->peg_revision),
- &(new_item->revision), eb->ctx,
- scratch_pool));
-
- SVN_ERR(svn_ra_get_uuid2(ra_session, &ra_cache.repos_uuid,
- scratch_pool));
- SVN_ERR(svn_ra_get_repos_root2(ra_session, &ra_cache.repos_root_url,
- scratch_pool));
- SVN_ERR(svn_ra_check_path(ra_session, "", ra_cache.ra_revnum, &kind,
- scratch_pool));
+ /* Determine if the external is a file or directory. */
+ /* Get the RA connection. */
+ SVN_ERR(svn_client__ra_session_from_path(&ra_session,
+ &ra_revnum,
+ &ra_session_url,
+ new_url, NULL,
+ &(new_item->peg_revision),
+ &(new_item->revision), eb->ctx,
+ scratch_pool));
+
+ SVN_ERR(svn_ra_get_uuid2(ra_session, &repos_uuid, scratch_pool));
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url, scratch_pool));
+ SVN_ERR(svn_ra_check_path(ra_session, "", ra_revnum, &ext_kind,
+ scratch_pool));
+
+ if (svn_node_none == ext_kind)
+ return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+ _("URL '%s' at revision %ld doesn't exist"),
+ ra_session_url, ra_revnum);
+
+ if (svn_node_dir != ext_kind && svn_node_file != ext_kind)
+ return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
+ _("URL '%s' at revision %ld is not a file "
+ "or a directory"),
+ ra_session_url, ra_revnum);
- if (svn_node_none == kind)
- return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
- _("URL '%s' at revision %ld doesn't exist"),
- ra_cache.ra_session_url,
- ra_cache.ra_revnum);
-
- if (svn_node_dir != kind && svn_node_file != kind)
- return svn_error_createf(SVN_ERR_RA_ILLEGAL_URL, NULL,
- _("URL '%s' at revision %ld is not a file "
- "or a directory"),
- ra_cache.ra_session_url,
- ra_cache.ra_revnum);
+ local_kind = ext_kind;
- ra_cache.kind = kind;
- }
/* Not protecting against recursive externals. Detecting them in
the global case is hard, and it should be pretty obvious to a
user when it happens. Worst case: your disk fills up :-). */
- if (! old_defining_abspath)
+ /* First notify that we're about to handle an external. */
+ if (eb->ctx->notify_func2)
{
- /* This branch is only used during a checkout or an export. */
-
- /* First notify that we're about to handle an external. */
- if (eb->ctx->notify_func2)
- (*eb->ctx->notify_func2)(
- eb->ctx->notify_baton2,
- svn_wc_create_notify(local_abspath, svn_wc_notify_update_external,
- scratch_pool), scratch_pool);
-
- switch (ra_cache.kind)
- {
- case svn_node_dir:
- /* The target dir might have multiple components. Guarantee
- the path leading down to the last component. */
- SVN_ERR(svn_io_make_dir_recursively(svn_dirent_dirname(local_abspath,
- scratch_pool),
- scratch_pool));
-
- SVN_ERR(switch_dir_external(
- local_abspath, new_url,
- &(new_item->peg_revision), &(new_item->revision),
- parent_dir_abspath, eb->timestamp_sleep, eb->ctx,
- scratch_pool));
- break;
- case svn_node_file:
- SVN_ERR(switch_file_external(local_abspath,
- new_url,
- &new_item->peg_revision,
- &new_item->revision,
- parent_dir_abspath,
- ra_session,
- ra_cache.ra_session_url,
- ra_cache.ra_revnum,
- ra_cache.repos_root_url,
- eb->timestamp_sleep, eb->ctx,
- scratch_pool));
- break;
- default:
- SVN_ERR_MALFUNCTION();
- break;
- }
+ (*eb->ctx->notify_func2)(
+ eb->ctx->notify_baton2,
+ svn_wc_create_notify(local_abspath,
+ svn_wc_notify_update_external,
+ scratch_pool),
+ scratch_pool);
}
- else
- {
- /* This branch handles a definition change or simple update. */
-
- /* First notify that we're about to handle an external. */
- if (eb->ctx->notify_func2)
- {
- svn_wc_notify_t *nt;
- nt = svn_wc_create_notify(local_abspath,
- svn_wc_notify_update_external,
- scratch_pool);
-
- eb->ctx->notify_func2(eb->ctx->notify_baton2, nt, scratch_pool);
- }
+ if (! old_defining_abspath)
+ {
+ /* The target dir might have multiple components. Guarantee the path
+ leading down to the last component. */
+ SVN_ERR(svn_io_make_dir_recursively(svn_dirent_dirname(local_abspath,
+ scratch_pool),
+ scratch_pool));
+ }
+
+ switch (local_kind)
+ {
+ case svn_node_dir:
+ SVN_ERR(switch_dir_external(local_abspath, new_url,
+ &(new_item->peg_revision),
+ &(new_item->revision),
+ parent_dir_abspath,
+ eb->timestamp_sleep, eb->ctx,
+ scratch_pool));
+ break;
+ case svn_node_file:
+ if (strcmp(eb->repos_root_url, repos_root_url))
+ {
+ const char *local_repos_root_url;
+ const char *local_repos_uuid;
+ const char *ext_repos_relpath;
+
+ /*
+ * The working copy library currently requires that all files
+ * in the working copy have the same repository root URL.
+ * The URL from the file external's definition differs from the
+ * one used by the working copy. As a workaround, replace the
+ * root URL portion of the file external's URL, after making
+ * sure both URLs point to the same repository. See issue #4087.
+ */
+
+ SVN_ERR(svn_wc__node_get_repos_info(&local_repos_root_url,
+ &local_repos_uuid,
+ eb->ctx->wc_ctx,
+ parent_dir_abspath,
+ scratch_pool, scratch_pool));
+ ext_repos_relpath = svn_uri_skip_ancestor(repos_root_url,
+ new_url, scratch_pool);
+ if (local_repos_uuid == NULL || local_repos_root_url == NULL ||
+ ext_repos_relpath == NULL ||
+ strcmp(local_repos_uuid, repos_uuid) != 0)
+ return svn_error_createf(SVN_ERR_UNSUPPORTED_FEATURE, NULL,
+ _("Unsupported external: url of file external '%s' "
+ "is not in repository '%s'"),
+ new_url, eb->repos_root_url);
+
+ new_url = svn_path_url_add_component2(local_repos_root_url,
+ ext_repos_relpath,
+ scratch_pool);
+ SVN_ERR(svn_client__ra_session_from_path(&ra_session,
+ &ra_revnum,
+ &ra_session_url,
+ new_url,
+ NULL,
+ &(new_item->peg_revision),
+ &(new_item->revision),
+ eb->ctx, scratch_pool));
+ SVN_ERR(svn_ra_get_repos_root2(ra_session, &repos_root_url,
+ scratch_pool));
+ }
- /* Either the URL changed, or the exact same item is present in
- both hashes, and caller wants to update such unchanged items.
- In the latter case, the call below will try to make sure that
- the external really is a WC pointing to the correct
- URL/revision. */
- switch (ra_cache.kind)
- {
- case svn_node_dir:
- SVN_ERR(switch_dir_external(local_abspath, new_url,
- &(new_item->peg_revision),
- &(new_item->revision),
- parent_dir_abspath,
- eb->timestamp_sleep, eb->ctx,
- scratch_pool));
- break;
- case svn_node_file:
- SVN_ERR(switch_file_external(local_abspath,
- new_url,
- &new_item->peg_revision,
- &new_item->revision,
- parent_dir_abspath,
- ra_session,
- ra_cache.ra_session_url,
- ra_cache.ra_revnum,
- ra_cache.repos_root_url,
- eb->timestamp_sleep, eb->ctx,
- scratch_pool));
- break;
- default:
- SVN_ERR_MALFUNCTION();
- break;
- }
+ SVN_ERR(switch_file_external(local_abspath,
+ new_url,
+ &new_item->peg_revision,
+ &new_item->revision,
+ parent_dir_abspath,
+ ra_session,
+ ra_session_url,
+ ra_revnum,
+ repos_root_url,
+ eb->timestamp_sleep, eb->ctx,
+ scratch_pool));
+ break;
+ default:
+ SVN_ERR_MALFUNCTION();
+ break;
}
return SVN_NO_ERROR;
Propchange: subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.c
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.c:r1164929
Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_fs_fs/temp_serializer.c:r1243707-1336073
Propchange: subversion/branches/1.7.x/subversion/libsvn_fs_fs/temp_serializer.h
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_fs_fs/temp_serializer.h:r1243707-1336073
Merged /subversion/trunk/subversion/libsvn_fs_fs/temp_serializer.h:r1164929
Propchange: subversion/branches/1.7.x/subversion/libsvn_subr/adler32.c
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/libsvn_subr/adler32.c:r1164929
Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/adler32.c:r1243707-1336073
Propchange: subversion/branches/1.7.x/subversion/libsvn_subr/hash.c
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/libsvn_subr/hash.c:r1164929
Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/hash.c:r1243707-1336073
Propchange: subversion/branches/1.7.x/subversion/libsvn_subr/svn_base64.c
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/svn_base64.c:r1243707-1336073
Merged /subversion/trunk/subversion/libsvn_subr/svn_base64.c:r1164929
Propchange: subversion/branches/1.7.x/subversion/libsvn_subr/svn_temp_serializer.c
------------------------------------------------------------------------------
Merged /subversion/trunk/subversion/libsvn_subr/svn_temp_serializer.c:r1164929
Merged /subversion/branches/1.7.x-issue4087/subversion/libsvn_subr/svn_temp_serializer.c:r1243707-1336073
Propchange: subversion/branches/1.7.x/subversion/tests/cmdline/basic_tests.py
------------------------------------------------------------------------------
Merged /subversion/branches/1.7.x-issue4087/subversion/tests/cmdline/basic_tests.py:r1243707-1336073
Merged /subversion/trunk/subversion/tests/cmdline/basic_tests.py:r1164929
Modified: subversion/branches/1.7.x/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/externals_tests.py?rev=1336074&r1=1336073&r2=1336074&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/branches/1.7.x/subversion/tests/cmdline/externals_tests.py Wed May 9 10:54:12 2012
@@ -1895,6 +1895,72 @@ def exclude_externals(sbox):
None, None, None, None, False,
'--set-depth', 'infinity', wc_dir)
+def file_externals_different_url(sbox):
+ "update file externals via different url"
+
+ sbox.build()
+
+ wc_dir = sbox.wc_dir
+ r1_url = sbox.repo_url
+
+ r2_dir, r2_url = sbox.add_repo_path('2')
+ svntest.main.copy_repos(sbox.repo_dir, r2_dir, 1, 0)
+
+
+ sbox.simple_propset('svn:externals',
+ 'r1-e-1 ' + r1_url + '/iota\n' +
+ r1_url + '/iota r1-e-2\n' +
+ 'r2-e-1 ' + r2_url + '/iota\n' +
+ r2_url + '/iota r2-e-2\n' +
+ '^/iota rr-e-1\n', '')
+
+ # All file externals appear in the working copy, with normalised URLs.
+ expected_output = svntest.wc.State(wc_dir, {
+ 'r1-e-1' : Item(status='A '),
+ 'r1-e-2' : Item(status='A '),
+ 'r2-e-1' : Item(status='A '),
+ 'r2-e-2' : Item(status='A '),
+ 'rr-e-1' : Item(status='A '),
+ })
+
+ expected_status = actions.get_virginal_state(wc_dir, 1)
+ expected_status.tweak('', status=' M')
+ expected_status.add({
+ 'r2-e-1' : Item(status=' ', wc_rev='1', switched='X'),
+ 'r1-e-1' : Item(status=' ', wc_rev='1', switched='X'),
+ 'r1-e-2' : Item(status=' ', wc_rev='1', switched='X'),
+ 'rr-e-1' : Item(status=' ', wc_rev='1', switched='X'),
+ 'r2-e-2' : Item(status=' ', wc_rev='1', switched='X'),
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output, None,
+ expected_status, None)
+
+ # Verify that all file external URLs are descendants of r1_url
+ for e in ['r1-e-1', 'r1-e-2', 'r2-e-1', 'r2-e-2', 'rr-e-1']:
+ actions.run_and_verify_info([{'Repository Root' : r1_url}],
+ os.path.join(sbox.wc_dir, e))
+
+
+ svntest.actions.run_and_verify_svn(None, None, [],
+ 'relocate', r1_url, r2_url, wc_dir)
+
+
+ # URLs of existing file externals are silently rewritten
+ expected_output = svntest.wc.State(wc_dir, {
+ })
+
+ svntest.actions.run_and_verify_update(wc_dir,
+ expected_output, None,
+ expected_status, None)
+
+ # Verify that all file external URLs are descendants of r2_url
+ for e in ['r1-e-1', 'r1-e-2', 'r2-e-1', 'r2-e-2', 'rr-e-1']:
+ actions.run_and_verify_info([{'Repository Root' : r2_url}],
+ os.path.join(sbox.wc_dir, e))
+
+
def file_external_in_unversioned(sbox):
"file external in unversioned dir"
@@ -2281,6 +2347,7 @@ test_list = [ None,
incoming_file_on_file_external,
incoming_file_external_on_file,
exclude_externals,
+ file_externals_different_url,
file_external_in_unversioned,
copy_file_externals,
remap_file_external_with_prop_del,