[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1026105 - /subversion/trunk/subversion/libsvn_wc/merge.c

From: Erik Huelsmann <ehuels_at_gmail.com>
Date: Thu, 21 Oct 2010 23:09:59 +0200

Hi Stefan,

I see you're not on irc, so you may have missed it: This commit, or
the next, turned the buildslaves red.

Bye,

Erik.

On Thu, Oct 21, 2010 at 9:07 PM, <stsp_at_apache.org> wrote:
> Author: stsp
> Date: Thu Oct 21 19:07:54 2010
> New Revision: 1026105
>
> URL: http://svn.apache.org/viewvc?rev=1026105&view=rev
> Log:
> * subversion/libsvn_wc/merge.c
>  (merge_text_file): Don't leak temporary file RESULT_TARGET.
>   E.g. when a text conflict happened during an update, and the user
>   chose 'theirs-full', a file containing the diff3 merge result with
>   conflict markers was left over in .svn/tmp/ directory.
>
> Found by: someone on the #svn IRC channel, some time ago
>
> Modified:
>    subversion/trunk/subversion/libsvn_wc/merge.c
>
> Modified: subversion/trunk/subversion/libsvn_wc/merge.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1026105&r1=1026104&r2=1026105&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/merge.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/merge.c Thu Oct 21 19:07:54 2010
> @@ -1039,7 +1039,10 @@ merge_text_file(svn_skel_t **work_items,
>         }
>
>       if (*merge_outcome == svn_wc_merge_merged)
> -        return SVN_NO_ERROR;
> +        {
> +          SVN_ERR(svn_io_remove_file2(result_target, TRUE, scratch_pool));
> +          return SVN_NO_ERROR;
> +        }
>     }
>   else if (contains_conflicts && dry_run)
>       *merge_outcome = svn_wc_merge_conflict;
> @@ -1078,6 +1081,8 @@ merge_text_file(svn_skel_t **work_items,
>                                             result_pool, scratch_pool));
>       *work_items = svn_wc__wq_merge(*work_items, work_item, result_pool);
>     }
> +  else
> +    SVN_ERR(svn_io_remove_file2(result_target, TRUE, scratch_pool));
>
>   return SVN_NO_ERROR;
>  }
>
>
>
Received on 2010-10-21 23:10:37 CEST

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.