Author: rhuijben
Date: Thu Jan 17 20:05:38 2013
New Revision: 1434883
URL: http://svn.apache.org/viewvc?rev=1434883&view=rev
Log:
* subversion/libsvn_wc/questions.c
(compare_and_verify): Remove unsafe (disabled) code, and make sure the in-wc
file is always closed on return, even on an invalid eol setting.
Modified:
subversion/trunk/subversion/libsvn_wc/questions.c
Modified: subversion/trunk/subversion/libsvn_wc/questions.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/questions.c?rev=1434883&r1=1434882&r2=1434883&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/questions.c (original)
+++ subversion/trunk/subversion/libsvn_wc/questions.c Thu Jan 17 20:05:38 2013
@@ -148,26 +148,6 @@ compare_and_verify(svn_boolean_t *modifi
return svn_error_trace(svn_stream_close(pristine_stream));
}
-#if 0
- /* ### On second thought, I think this needs more review before enabling
- ### This case might break when we have a fixed "\r\n" EOL, because
- ### we use a repair mode in the compare itself. */
- if (need_translation
- && !special
- && !props_mod
- && (keywords == NULL)
- && (versioned_file_size < pristine_file_size))
- {
- *modified_p = TRUE; /* The file is < its repository normal form
- and the properties didn't change.
-
- That must be a change. */
-
- /* ### Why did we open the pristine? */
- return svn_error_trace(svn_stream_close(pristine_stream));
- }
-#endif
-
/* ### Other checks possible? */
if (need_translation)
@@ -191,7 +171,8 @@ compare_and_verify(svn_boolean_t *modifi
eol_str = SVN_SUBST_NATIVE_EOL_STR;
else if (eol_style != svn_subst_eol_style_fixed
&& eol_style != svn_subst_eol_style_none)
- return svn_error_create(SVN_ERR_IO_UNKNOWN_EOL, NULL, NULL);
+ return svn_error_create(SVN_ERR_IO_UNKNOWN_EOL,
+ svn_stream_close(v_stream), NULL);
/* Wrap file stream to detranslate into normal form,
* "repairing" the EOL style if it is inconsistent. */
|