subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rhuij...@apache.org
Subject svn commit: r1102064 - in /subversion/trunk/subversion: include/private/ libsvn_client/ libsvn_wc/ svn/ tests/cmdline/ tests/cmdline/svntest/
Date Wed, 11 May 2011 20:13:17 GMT
Author: rhuijben
Date: Wed May 11 20:13:16 2011
New Revision: 1102064

URL: http://svn.apache.org/viewvc?rev=1102064&view=rev
Log:
Replace the temporary svn_wc__node_is_file_external api, with a more advanced
api that should allow access to the most important external information later
while we are slowly moving towards the EXTERNALS store.

* subversion/include/private/svn_wc_private.h
  (svn_wc__read_external_info): New function.
  (svn_wc__node_is_file_external): Remove function.

* subversion/libsvn_client/commit_util.c
  (harvest_committables): Remove ignored call.

* subversion/libsvn_client/copy.c
  (try_copy): Update caller. Improve error message.

* subversion/libsvn_client/delete.c
  (svn_client__can_delete): Update caller. Improve error message.

* subversion/libsvn_client/externals.c
  (switch_file_external): Update caller. Remove obsolete comment.

* subversion/libsvn_client/merge.c
  (pre_merge_status_cb): Update caller. Mark as to be removed.

* subversion/libsvn_client/status.c
  (create_client_status): Keep status behavior mostly stable while moving
    to the new storage.

* subversion/libsvn_wc/externals.c
  (svn_wc__read_external_info): New function.

* subversion/libsvn_wc/node.c
  (svn_wc__internal_is_file_external): Remove function.
  (svn_wc__node_is_file_external): Remove function.

* subversion/libsvn_wc/util.c
  (svn_wc__status2_from_3): Update caller; expect new status report.

* subversion/libsvn_wc/wc.h
  (svn_wc__internal_is_file_external): Remove function.

* subversion/svn/status.c
  (svn_cl__print_status): Don't filter externals as unrecognized.

* subversion/tests/cmdline/externals_tests.py
  (cannot_move_or_remove_file_externals): Allow more error messages. Expect
    status item from external directories.
  (relegate_external): Expect status from external directory.

* subversion/tests/cmdline/svntest/wc.py
  (_re_parse_status): Don't skip externals as invalid.

Modified:
    subversion/trunk/subversion/include/private/svn_wc_private.h
    subversion/trunk/subversion/libsvn_client/commit_util.c
    subversion/trunk/subversion/libsvn_client/copy.c
    subversion/trunk/subversion/libsvn_client/delete.c
    subversion/trunk/subversion/libsvn_client/externals.c
    subversion/trunk/subversion/libsvn_client/merge.c
    subversion/trunk/subversion/libsvn_client/status.c
    subversion/trunk/subversion/libsvn_wc/externals.c
    subversion/trunk/subversion/libsvn_wc/node.c
    subversion/trunk/subversion/libsvn_wc/util.c
    subversion/trunk/subversion/libsvn_wc/wc.h
    subversion/trunk/subversion/svn/status.c
    subversion/trunk/subversion/tests/cmdline/externals_tests.py
    subversion/trunk/subversion/tests/cmdline/svntest/wc.py

Modified: subversion/trunk/subversion/include/private/svn_wc_private.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/private/svn_wc_private.h?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/include/private/svn_wc_private.h (original)
+++ subversion/trunk/subversion/include/private/svn_wc_private.h Wed May 11 20:13:16 2011
@@ -98,6 +98,31 @@ svn_wc__crawl_file_external(svn_wc_conte
                             void *notify_baton,
                             apr_pool_t *scratch_pool);
 
+/* Check if LOCAL_ABSPATH is an external in the working copy identified
+   by WRI_ABSPATH. If not return SVN_ERR_WC_PATH_NOT_FOUND.
+
+   If it is an external return more information on this external.
+
+   If IGNORE_ENOENT, then set *external_kind to svn_node_none, when
+   LOCAL_ABSPATH is not an external instead of returning an error.
+
+   ### While we are not at the SVN_WC__HAS_EXTERNALS_STORE format, roots
+   ### of working copies will be identified as directory externals. The
+   ### recorded information will be NULL for directory externals.
+*/
+svn_error_t *
+svn_wc__read_external_info(svn_node_kind_t *external_kind,
+                           const char **defining_abspath,
+                           const char **defining_url,
+                           svn_revnum_t *defining_operational_revision,
+                           svn_revnum_t *defining_revision,
+                           svn_wc_context_t *wc_ctx,
+                           const char *wri_abspath,
+                           const char *local_abspath,
+                           svn_boolean_t ignore_enoent,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool);
+
 
 /** Set @a *tree_conflict to a newly allocated @c
  * svn_wc_conflict_description_t structure describing the tree
@@ -534,18 +559,6 @@ svn_wc__node_get_lock_info(const char **
                            apr_pool_t *result_pool,
                            apr_pool_t *scratch_pool);
 
-
-/* Return TRUE in *FILE_EXTERNAL if the node LOCAL_ABSPATH is a file
-   external.
-
-   If the node does not exist in BASE, then SVN_ERR_WC_PATH_NOT_FOUND
-   will be returned.  */
-svn_error_t *
-svn_wc__node_is_file_external(svn_boolean_t *file_external,
-                              svn_wc_context_t *wc_ctx,
-                              const char *local_abspath,
-                              apr_pool_t *scratch_pool);
-
 /**
  * A hack to remove the last entry from libsvn_client.  This simply fetches an
  * some values from WC-NG, and puts the needed bits into the output parameters,

Modified: subversion/trunk/subversion/libsvn_client/commit_util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/commit_util.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/commit_util.c (original)
+++ subversion/trunk/subversion/libsvn_client/commit_util.c Wed May 11 20:13:16 2011
@@ -414,11 +414,6 @@ harvest_committables(svn_wc_context_t *w
       && is_update_root
       && db_kind == svn_node_file)
     {
-      svn_boolean_t is_file_external;
-
-      SVN_ERR(svn_wc__node_is_file_external(&is_file_external, wc_ctx,
-                                            local_abspath, scratch_pool));
-
       if (copy_mode)
         return SVN_NO_ERROR;
     }

Modified: subversion/trunk/subversion/libsvn_client/copy.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/copy.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/copy.c (original)
+++ subversion/trunk/subversion/libsvn_client/copy.c Wed May 11 20:13:16 2011
@@ -2078,21 +2078,26 @@ try_copy(const apr_array_header_t *sourc
           svn_client__copy_pair_t *pair =
             APR_ARRAY_IDX(copy_pairs, i, svn_client__copy_pair_t *);
           svn_boolean_t is_file_external;
+          svn_node_kind_t external_kind;
+          const char *defining_abspath;
 
           svn_pool_clear(iterpool);
 
           SVN_ERR_ASSERT(svn_dirent_is_absolute(pair->src_abspath_or_url));
-          SVN_ERR(svn_wc__node_is_file_external(&is_file_external, ctx->wc_ctx,
-                                                pair->src_abspath_or_url,
-                                                iterpool));
-          if (is_file_external)
+          SVN_ERR(svn_wc__read_external_info(&external_kind, &defining_abspath,
+                                             NULL, NULL, NULL, ctx->wc_ctx,
+                                             pair->src_abspath_or_url,
+                                             pair->src_abspath_or_url, TRUE,
+                                             iterpool, iterpool));
+
+          if (external_kind != svn_node_none)
             return svn_error_createf(
                      SVN_ERR_WC_CANNOT_MOVE_FILE_EXTERNAL,
                      NULL,
-                     _("Cannot move the file external at '%s'; please "
-                       "propedit the svn:externals description that "
-                       "created it"),
-                     svn_dirent_local_style(pair->src_abspath_or_url, pool));
+                     _("Cannot move the external at '%s'; please "
+                       "edit the svn:externals property on '%s'."),
+                     svn_dirent_local_style(pair->src_abspath_or_url, pool),
+                     svn_dirent_local_style(defining_abspath, pool));
         }
       svn_pool_destroy(iterpool);
     }

Modified: subversion/trunk/subversion/libsvn_client/delete.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/delete.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/delete.c (original)
+++ subversion/trunk/subversion/libsvn_client/delete.c Wed May 11 20:13:16 2011
@@ -86,7 +86,8 @@ svn_client__can_delete(const char *path,
                        apr_pool_t *scratch_pool)
 {
   svn_opt_revision_t revision;
-  svn_boolean_t file_external;
+  svn_node_kind_t external_kind;
+  const char *defining_abspath;
   const char* local_abspath;
 
   revision.kind = svn_opt_revision_unspecified;
@@ -97,15 +98,20 @@ svn_client__can_delete(const char *path,
      implemented as a switched file and it would delete the file the
      file external is switched to, which is not the behavior the user
      would probably want. */
-  SVN_ERR(svn_wc__node_is_file_external(&file_external, ctx->wc_ctx,
-                                        local_abspath, scratch_pool));
+  SVN_ERR(svn_wc__read_external_info(&external_kind, &defining_abspath, NULL,
+                                     NULL, NULL,
+                                     ctx->wc_ctx, local_abspath,
+                                     local_abspath, TRUE,
+                                     scratch_pool, scratch_pool));
 
-  if (file_external)
+  if (external_kind != svn_node_none)
     return svn_error_createf(SVN_ERR_WC_CANNOT_DELETE_FILE_EXTERNAL, NULL,
-                             _("Cannot remove the file external at '%s'; "
-                               "please propedit or propdel the svn:externals "
-                               "description that created it"),
+                             _("Cannot remove the external at '%s'; "
+                               "please edit or delete the svn:externals "
+                               "property on '%s'"),
                              svn_dirent_local_style(local_abspath,
+                                                    scratch_pool),
+                             svn_dirent_local_style(defining_abspath,
                                                     scratch_pool));
 
 

Modified: subversion/trunk/subversion/libsvn_client/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/externals.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/externals.c (original)
+++ subversion/trunk/subversion/libsvn_client/externals.c Wed May 11 20:13:16 2011
@@ -296,7 +296,7 @@ switch_file_external(const char *local_a
   const apr_array_header_t *preserved_exts;
   svn_boolean_t locked_here;
   svn_error_t *err = NULL;
-  svn_node_kind_t kind;
+  svn_node_kind_t kind, external_kind;
 
   SVN_ERR_ASSERT(svn_dirent_is_absolute(local_abspath));
 
@@ -305,8 +305,6 @@ switch_file_external(const char *local_a
                               SVN_CONFIG_SECTION_MISCELLANY,
                               SVN_CONFIG_OPTION_USE_COMMIT_TIMES, FALSE));
 
-  
-
   /* Get the external diff3, if any. */
   svn_config_get(cfg, &diff3_cmd, SVN_CONFIG_SECTION_HELPERS,
                  SVN_CONFIG_OPTION_DIFF3_CMD, NULL);
@@ -355,10 +353,12 @@ switch_file_external(const char *local_a
   if (err)
     goto cleanup;
 
+  err = svn_wc__read_external_info(&external_kind, NULL, NULL, NULL, NULL,
+                                   ctx->wc_ctx, local_abspath, local_abspath,
+                                   TRUE, scratch_pool, scratch_pool);
 
-  /* Only one notification is done for the external, so don't notify
-     for any following steps.  Use the following trick to add the file
-     then switch it to the external URL. */
+  if (err)
+    goto cleanup;
 
   /* If there is a versioned item with this name, ensure it's a file
      external before working with it.  If there is no entry in the
@@ -366,13 +366,7 @@ switch_file_external(const char *local_a
      copy. */
   if (kind != svn_node_none && kind != svn_node_unknown)
     {
-      svn_boolean_t file_external;
-      err = svn_wc__node_is_file_external(&file_external, ctx->wc_ctx,
-                                          local_abspath, subpool);
-      if (err)
-        goto cleanup;
-
-      if (! file_external)
+      if (external_kind != svn_node_file)
         {
           if (!locked_here)
             SVN_ERR(svn_wc__release_write_lock(ctx->wc_ctx, dir_abspath,

Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Wed May 11 20:13:16 2011
@@ -5460,12 +5460,19 @@ pre_merge_status_cb(void *baton,
   /* ### Probably needed: Calculate file external status */
   svn_boolean_t is_file_external = FALSE;
 
+  /* ### This block can go once we bumped to the EXTERNALS store */
   if (status->versioned
       && status->switched
       && status->kind == svn_node_file)
     {
-      SVN_ERR(svn_wc__node_is_file_external(&is_file_external, pmsb->wc_ctx,
-                                            local_abspath, pool));
+      svn_node_kind_t external_kind;
+
+      SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
+                                         NULL,
+                                         pmsb->wc_ctx, local_abspath,
+                                         local_abspath, TRUE, pool, pool));
+
+      is_file_external = (external_kind == svn_node_file);
     }
 
   if (status->switched && !is_file_external)

Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Wed May 11 20:13:16 2011
@@ -630,18 +630,25 @@ create_client_status(svn_client_status_t
   (*cst)->switched = status->switched;
   (*cst)->file_external = FALSE;
 
-  if (status->versioned
-      && status->switched
-      && status->kind == svn_node_file)
+  if (((*cst)->node_status == svn_wc_status_external)
+      /* Old style file-externals */
+      || (status->versioned
+          && status->switched
+          && status->kind == svn_node_file))
     {
-      svn_boolean_t is_file_external;
-      SVN_ERR(svn_wc__node_is_file_external(&is_file_external, wc_ctx,
-                                            local_abspath, scratch_pool));
+      svn_node_kind_t external_kind;
 
-      if (is_file_external)
+      SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
+                                         NULL, wc_ctx,
+                                         local_abspath /* wri_abspath */,
+                                         local_abspath, TRUE,
+                                         scratch_pool, scratch_pool));
+
+      if (external_kind == svn_node_file)
         {
-          (*cst)->file_external = is_file_external;
-          (*cst)->switched = FALSE; /* ### Keep switched true now? */
+          (*cst)->file_external = TRUE;
+          (*cst)->switched = FALSE;
+          (*cst)->node_status = (*cst)->text_status;
         }
     }
 

Modified: subversion/trunk/subversion/libsvn_wc/externals.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/externals.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/externals.c (original)
+++ subversion/trunk/subversion/libsvn_wc/externals.c Wed May 11 20:13:16 2011
@@ -1061,3 +1061,102 @@ svn_wc__crawl_file_external(svn_wc_conte
 
   return svn_error_return(reporter->finish_report(report_baton, scratch_pool));
 }
+
+svn_error_t *
+svn_wc__read_external_info(svn_node_kind_t *external_kind,
+                           const char **defining_abspath,
+                           const char **defining_url,
+                           svn_revnum_t *defining_operational_revision,
+                           svn_revnum_t *defining_revision,
+                           svn_wc_context_t *wc_ctx,
+                           const char *wri_abspath,
+                           const char *local_abspath,
+                           svn_boolean_t ignore_enoent,
+                           apr_pool_t *result_pool,
+                           apr_pool_t *scratch_pool)
+{
+  const char *repos_root_url;
+  svn_wc__db_kind_t kind;
+  svn_error_t *err;
+
+  err = svn_wc__db_external_read(&kind, NULL, NULL,
+                                 defining_url ? &repos_root_url : NULL,
+                                 NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                                 NULL, NULL, defining_abspath, defining_url,
+                                 defining_operational_revision,
+                                 defining_revision,
+                                 NULL, NULL, NULL,
+                                 wc_ctx->db, local_abspath, wri_abspath,
+                                 result_pool, scratch_pool);
+
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+        return svn_error_return(err);
+
+      svn_error_clear(err);
+
+      if (external_kind)
+        *external_kind = svn_node_none;
+
+      if (defining_abspath)
+        *defining_abspath = NULL;
+
+      if (defining_url)
+        *defining_url = NULL;
+
+      if (defining_operational_revision)
+        *defining_operational_revision = SVN_INVALID_REVNUM;
+
+      if (defining_revision)
+        *defining_revision = SVN_INVALID_REVNUM;
+
+#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
+      {
+        svn_boolean_t is_wcroot;
+        err = svn_wc__db_is_wcroot(&is_wcroot, wc_ctx->db, local_abspath,
+                                   scratch_pool);
+
+        if (err && err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+          return svn_error_return(err);
+
+        svn_error_clear(err);
+
+        if (is_wcroot && external_kind)
+          {
+            *external_kind = svn_node_dir;
+          }
+      }
+
+      if (defining_abspath && !*defining_abspath)
+        *defining_abspath = svn_dirent_dirname(local_abspath, result_pool);
+#endif
+
+      return SVN_NO_ERROR;
+    }
+
+  if (external_kind)
+    switch(kind)
+      {
+        case svn_wc__db_kind_file:
+        case svn_wc__db_kind_symlink:
+          *external_kind = svn_node_file;
+          break;
+        case svn_wc__db_kind_dir:
+          *external_kind = svn_node_dir;
+          break;
+        default:
+          *external_kind = svn_node_none;
+      }
+
+#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
+  if (defining_abspath && !*defining_abspath)
+        *defining_abspath = svn_dirent_dirname(local_abspath, result_pool);
+#endif
+
+  if (defining_url && *defining_url)
+    *defining_url = svn_path_url_add_component2(repos_root_url, *defining_url,
+                                                result_pool);
+
+  return SVN_NO_ERROR;
+}
\ No newline at end of file

Modified: subversion/trunk/subversion/libsvn_wc/node.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/node.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/node.c (original)
+++ subversion/trunk/subversion/libsvn_wc/node.c Wed May 11 20:13:16 2011
@@ -1067,36 +1067,6 @@ svn_wc__node_get_lock_info(const char **
   return SVN_NO_ERROR;
 }
 
-
-svn_error_t *
-svn_wc__internal_is_file_external(svn_boolean_t *file_external,
-                                  svn_wc__db_t *db,
-                                  const char *local_abspath,
-                                  apr_pool_t *scratch_pool)
-{
-  const char *serialized;
-
-  SVN_ERR(svn_wc__db_temp_get_file_external(&serialized,
-                                            db, local_abspath,
-                                            scratch_pool, scratch_pool));
-  *file_external = (serialized != NULL);
-
-  return SVN_NO_ERROR;
-}
-
-
-svn_error_t *
-svn_wc__node_is_file_external(svn_boolean_t *file_external,
-                              svn_wc_context_t *wc_ctx,
-                              const char *local_abspath,
-                              apr_pool_t *scratch_pool)
-{
-  return svn_error_return(svn_wc__internal_is_file_external(file_external,
-                                                            wc_ctx->db,
-                                                            local_abspath,
-                                                            scratch_pool));
-}
-
 svn_error_t *
 svn_wc__internal_node_get_schedule(svn_wc_schedule_t *schedule,
                                    svn_boolean_t *copied,

Modified: subversion/trunk/subversion/libsvn_wc/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/util.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/util.c (original)
+++ subversion/trunk/subversion/libsvn_wc/util.c Wed May 11 20:13:16 2011
@@ -572,19 +572,27 @@ svn_wc__status2_from_3(svn_wc_status2_t 
 
   (*status)->switched = old_status->switched;
 
+#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
   if (old_status->versioned
       && old_status->switched
       && old_status->kind == svn_node_file)
+#else
+  if (old_status->node_status == svn_wc_status_external)
+#endif
     {
-      svn_boolean_t file_external;
+      svn_node_kind_t external_kind;
 
-      SVN_ERR(svn_wc__internal_is_file_external(&file_external,
-                                            wc_ctx->db, local_abspath,
-                                            scratch_pool));
+      SVN_ERR(svn_wc__read_external_info(&external_kind, NULL, NULL, NULL,
+                                         NULL, wc_ctx,
+                                         local_abspath /* wri_abspath */,
+                                         local_abspath, TRUE,
+                                         scratch_pool, scratch_pool));
 
-      if (file_external)
+      if (external_kind == svn_node_file)
         {
+#if SVN_WC__VERSION < SVN_WC__HAS_EXTERNALS_STORE
           (*status)->switched = FALSE;
+#endif
           (*status)->file_external = TRUE;
         }
     }

Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Wed May 11 20:13:16 2011
@@ -594,14 +594,6 @@ svn_wc__internal_remove_from_revision_co
                                               void *cancel_baton,
                                               apr_pool_t *scratch_pool);
 
-
-/* Library-internal version of svn_wc__node_is_file_external(). */
-svn_error_t *
-svn_wc__internal_is_file_external(svn_boolean_t *file_external,
-                                  svn_wc__db_t *db,
-                                  const char *local_abspath,
-                                  apr_pool_t *scratch_pool);
-
 /* Library-internal version of svn_wc__node_get_schedule(). */
 svn_error_t *
 svn_wc__internal_node_get_schedule(svn_wc_schedule_t *schedule,

Modified: subversion/trunk/subversion/svn/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/status.c?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/status.c (original)
+++ subversion/trunk/subversion/svn/status.c Wed May 11 20:13:16 2011
@@ -440,7 +440,10 @@ svn_cl__print_status(const char *path,
                      apr_pool_t *pool)
 {
   if (! status
-      || (skip_unrecognized && !(status->versioned || status->conflicted))
+      || (skip_unrecognized
+          && !(status->versioned
+               || status->conflicted
+               || status->node_status == svn_wc_status_external))
       || (status->node_status == svn_wc_status_none
           && status->repos_node_status == svn_wc_status_none))
     return SVN_NO_ERROR;

Modified: subversion/trunk/subversion/tests/cmdline/externals_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/externals_tests.py?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/externals_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/externals_tests.py Wed May 11 20:13:16 2011
@@ -973,18 +973,18 @@ def cannot_move_or_remove_file_externals
   # Should not be able to delete the file external.
   svntest.actions.run_and_verify_svn("Able to delete file external",
                                      None,
-                                     ".*Cannot remove the file external at "
-                                     ".*gamma.*; please propedit or propdel "
-                                     "the svn:externals description",
+                                     ".*Cannot remove the external at "
+                                     ".*gamma.*; please .* "
+                                     "the svn:externals .*",
                                      'rm',
                                      os.path.join(wc_dir, 'A', 'B', 'gamma'))
 
   # Should not be able to move the file external.
   svntest.actions.run_and_verify_svn("Able to move file external",
                                      None,
-                                     ".*Cannot move the file external at "
-                                     ".*gamma.*; please propedit the "
-                                     "svn:externals description",
+                                     ".*Cannot move the external at "
+                                     ".*gamma.*; please .*edit.*"
+                                     "svn:externals.*",
                                      'mv',
                                      os.path.join(wc_dir, 'A', 'B', 'gamma'),
                                      os.path.join(wc_dir, 'A', 'B', 'gamma1'))
@@ -1004,6 +1004,13 @@ def cannot_move_or_remove_file_externals
   expected_status.remove('A/B', 'A/B/E', 'A/B/E/alpha', 'A/B/E/beta',
                          'A/B/F', 'A/B/lambda')
 
+  expected_status.add({
+    'A/D/exdir_A'       : Item(status='X '),
+    'A/D/x'             : Item(status='X '),
+    'A/C/exdir_H'       : Item(status='X '),
+    'A/C/exdir_G'       : Item(status='X '),
+  })
+
   svntest.actions.run_and_verify_commit(wc_dir,
                                         expected_output, expected_status,
                                         None, wc_dir)
@@ -1365,6 +1372,9 @@ def relegate_external(sbox):
       'A/external/beta'  : Item('This is the file \'beta\'.\n'),
       })
   expected_status = svntest.actions.get_virginal_state(wc_dir, 3)
+  expected_status.add({
+    'A/external'        : Item(status='X '),
+  })
   svntest.actions.run_and_verify_update(wc_dir,
                                         expected_output,
                                         expected_disk,

Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=1102064&r1=1102063&r2=1102064&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Wed May 11 20:13:16 2011
@@ -73,7 +73,7 @@ import svntest
 # Working revision, last-changed revision, and last author are whitespace
 # only if the item is missing.
 #
-_re_parse_status = re.compile('^([?!MACDRUGI_~ ][MACDRUG_ ])'
+_re_parse_status = re.compile('^([?!MACDRUGXI_~ ][MACDRUG_ ])'
                               '([L ])'
                               '([+ ])'
                               '([SX ])'



Mime
View raw message