Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:fsirl:SLE15-DevTools
subversion
fix-issue4711.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-issue4711.patch of Package subversion
Index: subversion-1.14.x/subversion/svn/log-cmd.c =================================================================== --- subversion-1.14.x/subversion/svn/log-cmd.c (revision 1921239) +++ subversion-1.14.x/subversion/svn/log-cmd.c (working copy) @@ -45,6 +45,12 @@ #include "svn_private_config.h" +typedef struct merge_stack { + svn_revnum_t rev; + svn_boolean_t emitted; + svn_boolean_t subtractive_merge; +} merge_stack_t; + /*** Code. ***/ @@ -355,10 +361,16 @@ { if (log_entry->has_children) { + merge_stack_t ms; + if (! lb->merge_stack) - lb->merge_stack = apr_array_make(lb->pool, 1, sizeof(svn_revnum_t)); + lb->merge_stack = apr_array_make(lb->pool, 1, + sizeof(merge_stack_t)); - APR_ARRAY_PUSH(lb->merge_stack, svn_revnum_t) = log_entry->revision; + ms.rev = log_entry->revision; + ms.emitted = FALSE; + ms.subtractive_merge = log_entry->subtractive_merge; + APR_ARRAY_PUSH(lb->merge_stack, merge_stack_t) = ms; } return SVN_NO_ERROR; @@ -435,10 +447,10 @@ iterpool = svn_pool_create(pool); for (i = 0; i < lb->merge_stack->nelts; i++) { - svn_revnum_t rev = APR_ARRAY_IDX(lb->merge_stack, i, svn_revnum_t); + merge_stack_t ms = APR_ARRAY_IDX(lb->merge_stack, i, merge_stack_t); svn_pool_clear(iterpool); - SVN_ERR(svn_cmdline_printf(iterpool, " r%ld%c", rev, + SVN_ERR(svn_cmdline_printf(iterpool, " r%ld%c", ms.rev, i == lb->merge_stack->nelts - 1 ? '\n' : ',')); } @@ -475,10 +487,15 @@ if (log_entry->has_children) { + merge_stack_t ms; + if (! lb->merge_stack) - lb->merge_stack = apr_array_make(lb->pool, 1, sizeof(svn_revnum_t)); + lb->merge_stack = apr_array_make(lb->pool, 1, sizeof(merge_stack_t)); - APR_ARRAY_PUSH(lb->merge_stack, svn_revnum_t) = log_entry->revision; + ms.rev = log_entry->revision; + ms.emitted = FALSE; + ms.subtractive_merge = log_entry->subtractive_merge; + APR_ARRAY_PUSH(lb->merge_stack, merge_stack_t) = ms; } return SVN_NO_ERROR; @@ -544,11 +561,17 @@ if (! SVN_IS_VALID_REVNUM(log_entry->revision)) { - svn_xml_make_close_tag(&sb, pool, "logentry"); - SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout)); if (lb->merge_stack) - apr_array_pop(lb->merge_stack); - + { + if (lb->merge_stack->nelts > 0 && + APR_ARRAY_IDX(lb->merge_stack, lb->merge_stack->nelts-1, + merge_stack_t).emitted) + { + svn_xml_make_close_tag(&sb, pool, "logentry"); + SVN_ERR(svn_cl__error_checked_fputs(sb->data, stdout)); + } + apr_array_pop(lb->merge_stack); + } return SVN_NO_ERROR; } @@ -559,15 +582,48 @@ { if (log_entry->has_children) { + merge_stack_t ms; + if (! lb->merge_stack) - lb->merge_stack = apr_array_make(lb->pool, 1, sizeof(svn_revnum_t)); + lb->merge_stack = apr_array_make(lb->pool, 1, + sizeof(merge_stack_t)); - APR_ARRAY_PUSH(lb->merge_stack, svn_revnum_t) = log_entry->revision; + ms.rev = log_entry->revision; + ms.emitted = FALSE; + ms.subtractive_merge = log_entry->subtractive_merge; + APR_ARRAY_PUSH(lb->merge_stack, merge_stack_t) = ms; } return SVN_NO_ERROR; } + else if (lb->search_patterns && lb->merge_stack) + { + /* match_search_patterns returned true */ + int i; + for (i = 0; i < lb->merge_stack->nelts; i++) + { + merge_stack_t ms = APR_ARRAY_IDX(lb->merge_stack, i, merge_stack_t); + if (!ms.emitted) + { + revstr = apr_psprintf(pool, "%ld", ms.rev); + if (i == 0) + { + svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "logentry", + "revision", revstr, SVN_VA_NULL); + } + else + { + svn_xml_make_open_tag(&sb, pool, svn_xml_normal, "logentry", + "revision", revstr, "reverse-merge", + ms.subtractive_merge ? "true" : "false", + SVN_VA_NULL); + } + APR_ARRAY_IDX(lb->merge_stack, i, merge_stack_t).emitted = TRUE; + } + } + } + if (author) author = svn_xml_fuzzy_escape(author, pool); if (date) @@ -684,10 +740,15 @@ if (log_entry->has_children) { + merge_stack_t ms; + if (! lb->merge_stack) - lb->merge_stack = apr_array_make(lb->pool, 1, sizeof(svn_revnum_t)); + lb->merge_stack = apr_array_make(lb->pool, 1, sizeof(merge_stack_t)); - APR_ARRAY_PUSH(lb->merge_stack, svn_revnum_t) = log_entry->revision; + ms.rev = log_entry->revision; + ms.emitted = TRUE; + ms.subtractive_merge = log_entry->subtractive_merge; + APR_ARRAY_PUSH(lb->merge_stack, merge_stack_t) = ms; } else svn_xml_make_close_tag(&sb, pool, "logentry");
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor