subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1485364 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_client/client.h subversion/libsvn_client/externals.c subversion/libsvn_client/status.c
Date Wed, 22 May 2013 19:33:17 GMT
Author: svn-role
Date: Wed May 22 19:33:17 2013
New Revision: 1485364

URL: http://svn.apache.org/r1485364
Log:
Merge r1434750 from trunk:

 * r1434750
   Resolve regression in 'svn status -u' output when running on externals.
   Without this patch the paths in directory externals are shown as absolute
   while all others are shown relative/as provided by the user.
   Justification:
     Consistent api behavior is good
   Votes:
     +1: rhuijben, stsp, breser

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:r1434750

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1485364&r1=1485363&r2=1485364&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed May 22 19:33:17 2013
@@ -176,15 +176,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1434750
-   Resolve regression in 'svn status -u' output when running on externals.
-   Without this patch the paths in directory externals are shown as absolute
-   while all others are shown relative/as provided by the user.
-   Justification:
-     Consistent api behavior is good
-   Votes:
-     +1: rhuijben, stsp, breser
-
  * r1445753
    Fix issue #3741, 'externals not removed when working copy is made shallow'.
    Justification:

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=1485364&r1=1485363&r2=1485364&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 22 19:33:17 2013
@@ -929,7 +929,11 @@ svn_client__export_externals(apr_hash_t 
 
 /* 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(). */
+   All other options are the same as those passed to svn_client_status().
+
+   If ANCHOR_ABSPATH and ANCHOR-RELPATH are not null, use them to provide
+   properly formatted relative paths
+ */
 svn_error_t *
 svn_client__do_external_status(svn_client_ctx_t *ctx,
                                apr_hash_t *external_map,
@@ -937,9 +941,11 @@ svn_client__do_external_status(svn_clien
                                svn_boolean_t get_all,
                                svn_boolean_t update,
                                svn_boolean_t no_ignore,
+                               const char *anchor_abspath,
+                               const char *anchor_relpath,
                                svn_client_status_func_t status_func,
                                void *status_baton,
-                               apr_pool_t *pool);
+                               apr_pool_t *scratch_pool);
 
 /* Baton type for svn_wc__external_info_gatherer(). */
 typedef struct svn_client__external_func_baton_t

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=1485364&r1=1485363&r2=1485364&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 22 19:33:17 2013
@@ -1302,17 +1302,19 @@ svn_client__do_external_status(svn_clien
                                svn_boolean_t get_all,
                                svn_boolean_t update,
                                svn_boolean_t no_ignore,
+                               const char *anchor_abspath,
+                               const char *anchor_relpath,
                                svn_client_status_func_t status_func,
                                void *status_baton,
-                               apr_pool_t *pool)
+                               apr_pool_t *scratch_pool)
 {
   apr_hash_index_t *hi;
-  apr_pool_t *iterpool = svn_pool_create(pool);
+  apr_pool_t *iterpool = svn_pool_create(scratch_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, external_map);
+  for (hi = apr_hash_first(scratch_pool, external_map);
        hi;
        hi = apr_hash_next(hi))
     {
@@ -1321,6 +1323,7 @@ svn_client__do_external_status(svn_clien
       const char *defining_abspath = svn__apr_hash_index_val(hi);
       svn_node_kind_t kind;
       svn_opt_revision_t opt_rev;
+      const char *status_path;
 
       svn_pool_clear(iterpool);
 
@@ -1351,8 +1354,17 @@ svn_client__do_external_status(svn_clien
                                     svn_wc_notify_status_external,
                                     iterpool), iterpool);
 
+      status_path = local_abspath;
+      if (anchor_abspath)
+        {
+          status_path = svn_dirent_join(anchor_relpath,
+                           svn_dirent_skip_ancestor(anchor_abspath,
+                                                    status_path),
+                           iterpool);
+        }
+
       /* And then do the status. */
-      SVN_ERR(svn_client_status5(NULL, ctx, local_abspath, &opt_rev, depth,
+      SVN_ERR(svn_client_status5(NULL, ctx, status_path, &opt_rev, depth,
                                  get_all, update, no_ignore, FALSE, FALSE,
                                  NULL, status_func, status_baton,
                                  iterpool));

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=1485364&r1=1485363&r2=1485364&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/status.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/status.c Wed May 22 19:33:17 2013
@@ -519,6 +519,7 @@ svn_client_status5(svn_revnum_t *result_
       SVN_ERR(svn_client__do_external_status(ctx, external_map,
                                              depth, get_all,
                                              update, no_ignore,
+                                             sb.anchor_abspath, sb.anchor_relpath,
                                              status_func, status_baton, pool));
     }
 



Mime
View raw message