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 2011/07/27 15:36:47 UTC
svn commit: r1151463 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_wc/conflicts.c
Author: hwright
Date: Wed Jul 27 13:36:47 2011
New Revision: 1151463
URL: http://svn.apache.org/viewvc?rev=1151463&view=rev
Log:
Merge r1150372 from trunk:
* r1150372
When resolving to conflict-*, close the generated file before using it
Justification:
Copying unclosed/unflushed files is not nice and might cause all kinds
of problems.
Votes:
+1: rhuijben, danielsh, philip
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_wc/conflicts.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 27 13:36:47 2011
@@ -54,4 +54,4 @@
/subversion/branches/tree-conflicts:868291-873154
/subversion/branches/tree-conflicts-notify:873926-874008
/subversion/branches/uris-as-urls:1060426-1064427
-/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1151036
+/subversion/trunk:1146013,1146121,1146219,1146222,1146274,1146492,1146555,1146606,1146620,1146684,1146781,1146832,1146834,1146870,1146899,1146904,1147293,1147309,1147882,1148071,1148131,1148374,1148424,1148566,1148588,1148853,1148877,1148882,1148936,1149105,1149141,1149160,1149228,1149240,1149343,1149371-1149372,1149377,1149398,1149572,1149675,1149701,1149713,1150372,1151036
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1151463&r1=1151462&r2=1151463&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Wed Jul 27 13:36:47 2011
@@ -197,11 +197,3 @@ Approved changes:
this revision depends for a clean merge).
Votes:
+1: rhuijben, danielsh, cmpilato
-
- * r1150372
- When resolving to conflict-*, close the generated file before using it
- Justification:
- Copying unclosed/unflushed files is not nice and might cause all kinds
- of problems.
- Votes:
- +1: rhuijben, danielsh, philip
Modified: subversion/branches/1.7.x/subversion/libsvn_wc/conflicts.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_wc/conflicts.c?rev=1151463&r1=1151462&r2=1151463&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_wc/conflicts.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_wc/conflicts.c Wed Jul 27 13:36:47 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. */