You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2011/07/24 16:01:05 UTC
svn commit: r1150372 - /subversion/trunk/subversion/libsvn_wc/conflicts.c
Author: rhuijben
Date: Sun Jul 24 14:01:04 2011
New Revision: 1150372
URL: http://svn.apache.org/viewvc?rev=1150372&view=rev
Log:
* subversion/libsvn_wc/conflicts.c
(resolve_conflict_on_node): Close file before performing operations on it.
Do this by moving the file removal to pool cleanup. (And reduce variable
scope)
Modified:
subversion/trunk/subversion/libsvn_wc/conflicts.c
Modified: subversion/trunk/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/conflicts.c?rev=1150372&r1=1150371&r2=1150372&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/trunk/subversion/libsvn_wc/conflicts.c Sun Jul 24 14:01:04 2011
@@ -215,7 +215,6 @@ resolve_conflict_on_node(svn_wc__db_t *d
if (resolve_text)
{
- svn_stream_t *tmp_stream = NULL;
const char *auto_resolve_src;
/* Handle automatic conflict resolution before the temporary files are
@@ -240,6 +239,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
if (conflict_old && conflict_working && conflict_new)
{
const char *temp_dir;
+ svn_stream_t *tmp_stream = NULL;
svn_diff_t *diff;
svn_diff_conflict_display_style_t style =
conflict_choice == svn_wc_conflict_choose_theirs_conflict
@@ -252,7 +252,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
SVN_ERR(svn_stream_open_unique(&tmp_stream,
&auto_resolve_src,
temp_dir,
- svn_io_file_del_on_close,
+ svn_io_file_del_on_pool_cleanup,
pool, pool));
SVN_ERR(svn_diff_file_diff3_2(&diff,
@@ -269,6 +269,7 @@ resolve_conflict_on_node(svn_wc__db_t *d
NULL, NULL, NULL, NULL,
style,
pool));
+ SVN_ERR(svn_stream_close(tmp_stream));
}
else
auto_resolve_src = NULL;
@@ -283,9 +284,6 @@ resolve_conflict_on_node(svn_wc__db_t *d
SVN_ERR(svn_io_copy_file(
svn_dirent_join(conflict_dir_abspath, auto_resolve_src, pool),
local_abspath, TRUE, pool));
-
- if (tmp_stream)
- SVN_ERR(svn_stream_close(tmp_stream));
}
/* Records whether we found any of the conflict files. */