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/29 19:22:34 UTC
svn commit: r1152307 - in /subversion/branches/1.7.x: ./ STATUS
subversion/libsvn_client/blame.c
Author: hwright
Date: Fri Jul 29 17:22:33 2011
New Revision: 1152307
URL: http://svn.apache.org/viewvc?rev=1152307&view=rev
Log:
Merge r1150242 from trunk:
* r1150242
Make blame close its temporary files before deleting them.
Justification:
Hitting the io retry loop on windows is very painfull.
Votes:
+1: rhuijben, philip, hwright
Modified:
subversion/branches/1.7.x/ (props changed)
subversion/branches/1.7.x/STATUS
subversion/branches/1.7.x/subversion/libsvn_client/blame.c
Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Fri Jul 29 17:22:33 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,1150372,1150812,1151036,1152129
+/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,1150242,1150372,1150812,1151036,1152129
Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1152307&r1=1152306&r2=1152307&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Fri Jul 29 17:22:33 2011
@@ -213,10 +213,3 @@ Approved changes:
close, like with checksum streams)
Votes:
+1: rhuijben, danielsh, hwright
-
- * r1150242
- Make blame close its temporary files before deleting them.
- Justification:
- Hitting the io retry loop on windows is very painfull.
- Votes:
- +1: rhuijben, philip, hwright
Modified: subversion/branches/1.7.x/subversion/libsvn_client/blame.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/blame.c?rev=1152307&r1=1152306&r2=1152307&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/blame.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/blame.c Fri Jul 29 17:22:33 2011
@@ -107,6 +107,7 @@ struct delta_baton {
svn_txdelta_window_handler_t wrapped_handler;
void *wrapped_baton;
struct file_rev_baton *file_rev_baton;
+ svn_stream_t *source_stream; /* the delta source */
const char *filename;
};
@@ -319,6 +320,13 @@ window_handler(svn_txdelta_window_t *win
if (window)
return SVN_NO_ERROR;
+ /* Close the source file used for the delta.
+ It is important to do this early, since otherwise, they will be deleted
+ before all handles are closed, which leads to failures on some platforms
+ when new tempfiles are to be created. */
+ if (dbaton->source_stream)
+ SVN_ERR(svn_stream_close(dbaton->source_stream));
+
/* If we are including merged revisions, we need to add each rev to the
merged chain. */
if (frb->include_merged_revisions)
@@ -445,11 +453,12 @@ file_rev_handler(void *baton, const char
/* Prepare the text delta window handler. */
if (frb->last_filename)
- SVN_ERR(svn_stream_open_readonly(&last_stream, frb->last_filename,
+ SVN_ERR(svn_stream_open_readonly(&delta_baton->source_stream, frb->last_filename,
frb->currpool, pool));
else
/* Means empty stream below. */
- last_stream = NULL;
+ delta_baton->source_stream = NULL;
+ last_stream = svn_stream_disown(delta_baton->source_stream, pool);
if (frb->include_merged_revisions && !frb->merged_revision)
filepool = frb->filepool;