You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2010/11/24 16:42:01 UTC

svn commit: r1038650 - /subversion/trunk/subversion/svn/update-cmd.c

Author: cmpilato
Date: Wed Nov 24 15:42:01 2010
New Revision: 1038650

URL: http://svn.apache.org/viewvc?rev=1038650&view=rev
Log:
Fix some inconsistency in the paths printed in the update summary.

* subversion/svn/update-cmd.c
  (print_update_summary): Calculate a relative path to display, if
    possible, and convert to local style.  This should make the paths
    used in the summary section match those used in the "Updating ..."
    header lines.

Reported by: julianfoad

Modified:
    subversion/trunk/subversion/svn/update-cmd.c

Modified: subversion/trunk/subversion/svn/update-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/update-cmd.c?rev=1038650&r1=1038649&r2=1038650&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/update-cmd.c (original)
+++ subversion/trunk/subversion/svn/update-cmd.c Wed Nov 24 15:42:01 2010
@@ -47,15 +47,21 @@ print_update_summary(apr_array_header_t 
                      apr_pool_t *scratch_pool)
 {
   int i;
+  const char *path_prefix;
 
   if (targets->nelts < 2)
     return SVN_NO_ERROR;
 
+  SVN_ERR(svn_dirent_get_absolute(&path_prefix, "", scratch_pool));
   SVN_ERR(svn_cmdline_printf(scratch_pool, _("Summary of updates:\n")));
 
   for (i = 0; i < targets->nelts; i++)
     {
       const char *path = APR_ARRAY_IDX(targets, i, const char *);
+      const char *path_local;
+
+      path_local = svn_dirent_skip_ancestor(path_prefix, path);
+      path_local = svn_dirent_local_style(path_local, scratch_pool);
       
       if (i < result_revs->nelts)
         {
@@ -64,7 +70,7 @@ print_update_summary(apr_array_header_t 
           if (SVN_IS_VALID_REVNUM(rev))
             SVN_ERR(svn_cmdline_printf(scratch_pool,
                                        _("  Updated '%s' to r%ld.\n"),
-                                       path, rev));
+                                       path_local, rev));
         }
       else
         {