You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by hw...@apache.org on 2010/08/12 21:26:59 UTC
svn commit: r984925 -
/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/diff.c
Author: hwright
Date: Thu Aug 12 19:26:59 2010
New Revision: 984925
URL: http://svn.apache.org/viewvc?rev=984925&view=rev
Log:
On the ignore-mergeinfo branch:
Fix a few test failures resulting from collision with the git-extensions
to 'svn diff'.
* subversion/libsvn_client/diff.c
(display_prop_diffs): Generate the prop diff header in advance, and then
just display it lazily.
Modified:
subversion/branches/ignore-mergeinfo/subversion/libsvn_client/diff.c
Modified: subversion/branches/ignore-mergeinfo/subversion/libsvn_client/diff.c
URL: http://svn.apache.org/viewvc/subversion/branches/ignore-mergeinfo/subversion/libsvn_client/diff.c?rev=984925&r1=984924&r2=984925&view=diff
==============================================================================
--- subversion/branches/ignore-mergeinfo/subversion/libsvn_client/diff.c (original)
+++ subversion/branches/ignore-mergeinfo/subversion/libsvn_client/diff.c Thu Aug 12 19:26:59 2010
@@ -322,6 +322,10 @@ display_prop_diffs(const apr_array_heade
{
int i;
svn_boolean_t header_printed = FALSE;
+ svn_stringbuf_t *propdiff_header = svn_stringbuf_create("", pool);
+ svn_stringbuf_t *append_buf;
+
+ /* First construct the prop diff header. */
/* If we're creating a diff on the wc root, path would be empty. */
if (path[0] == '\0')
@@ -343,27 +347,29 @@ display_prop_diffs(const apr_array_heade
/* ### Should we show the paths in platform specific format,
* ### diff_content_changed() does not! */
- SVN_ERR(file_printf_from_utf8 (file, encoding,
- "Index: %s" APR_EOL_STR
- "%s" APR_EOL_STR,
- path,
- equal_string));
-
- SVN_ERR(file_printf_from_utf8(file, encoding,
- "--- %s" APR_EOL_STR
- "+++ %s" APR_EOL_STR,
- label1,
- label2));
+ propdiff_header = svn_stringbuf_createf(pool,
+ "Index: %s" APR_EOL_STR
+ "%s" APR_EOL_STR,
+ path,
+ equal_string);
+
+ append_buf = svn_stringbuf_createf(pool,
+ "--- %s" APR_EOL_STR
+ "+++ %s" APR_EOL_STR,
+ label1,
+ label2);
+ svn_stringbuf_appendstr(propdiff_header, append_buf);
}
- SVN_ERR(file_printf_from_utf8(file, encoding,
- _("%sProperty changes on: %s%s"),
- APR_EOL_STR,
- path,
- APR_EOL_STR));
+ append_buf = svn_stringbuf_createf(pool,
+ _("%sProperty changes on: %s%s"),
+ APR_EOL_STR,
+ path,
+ APR_EOL_STR);
+ svn_stringbuf_appendstr(propdiff_header, append_buf);
- SVN_ERR(file_printf_from_utf8(file, encoding, "%s" APR_EOL_STR,
- under_string));
+ append_buf = svn_stringbuf_createf(pool, "%s" APR_EOL_STR, under_string);
+ svn_stringbuf_appendstr(propdiff_header, append_buf);
for (i = 0; i < propchanges->nelts; i++)
{
@@ -401,13 +407,7 @@ display_prop_diffs(const apr_array_heade
if (!header_printed)
{
SVN_ERR(file_printf_from_utf8(file, encoding,
- _("%sProperty changes on: %s%s"),
- APR_EOL_STR,
- svn_dirent_local_style(path, pool),
- APR_EOL_STR));
-
- SVN_ERR(file_printf_from_utf8(file, encoding, "%s" APR_EOL_STR,
- under_string));
+ propdiff_header->data));
header_printed = TRUE;
}