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 2013/01/28 17:32:11 UTC
svn commit: r1439480 - /subversion/trunk/subversion/svn/update-cmd.c
Author: cmpilato
Date: Mon Jan 28 16:32:11 2013
New Revision: 1439480
URL: http://svn.apache.org/viewvc?rev=1439480&view=rev
Log:
Fix a UI niggle: don't print an update summary header with no content
when excluding WC items:
$ svn update --set-depth exclude wc/A/*
D wc/A/B
D wc/A/C
D wc/A/D
D wc/A/mu
Summary of updates: <<< This line removed by this commit
$
* subversion/svn/update-cmd.c
(print_update_summary): Delay the printing of the update summary
header until we're sure there's a summary item to report.
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=1439480&r1=1439479&r2=1439480&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/update-cmd.c (original)
+++ subversion/trunk/subversion/svn/update-cmd.c Mon Jan 28 16:32:11 2013
@@ -51,12 +51,12 @@ print_update_summary(apr_array_header_t
int i;
const char *path_prefix;
apr_pool_t *iterpool;
+ svn_boolean_t printed_header = FALSE;
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")));
iterpool = svn_pool_create(scratch_pool);
@@ -87,6 +87,13 @@ print_update_summary(apr_array_header_t
/* Print an update summary for this target, removing the current
working directory prefix from PATH (if PATH is at or under
$CWD), and converting the path to local style for display. */
+ if (! printed_header)
+ {
+ SVN_ERR(svn_cmdline_printf(scratch_pool,
+ _("Summary of updates:\n")));
+ printed_header = TRUE;
+ }
+
SVN_ERR(svn_cmdline_printf(iterpool, _(" Updated '%s' to r%ld.\n"),
svn_cl__local_style_skip_ancestor(
path_prefix, path, iterpool),