Author: julianfoad
Date: Mon Jul 5 15:14:50 2010
New Revision: 960620
URL: http://svn.apache.org/viewvc?rev=960620&view=rev
Log:
Make svn_wc__internal_versioned_file_modcheck() take a stream rather than a
path to a file, and use this to avoid referencing a pristine text by path in
one more place.
* subversion/libsvn_wc/wc.h,
subversion/libsvn_wc/questions.c
(svn_wc__internal_versioned_file_modcheck): Take a stream rather than a
file path.
(svn_wc__versioned_file_modcheck): Open a stream on the given path before
calling svn_wc__internal_versioned_file_modcheck().
* subversion/libsvn_wc/update_editor.c
(merge_file): Open the pristine text as a stream before calling
svn_wc__internal_versioned_file_modcheck().
Modified:
subversion/trunk/subversion/libsvn_wc/questions.c
subversion/trunk/subversion/libsvn_wc/update_editor.c
subversion/trunk/subversion/libsvn_wc/wc.h
Modified: subversion/trunk/subversion/libsvn_wc/questions.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/questions.c?rev=960620&r1=960619&r2=960620&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/questions.c (original)
+++ subversion/trunk/subversion/libsvn_wc/questions.c Mon Jul 5 15:14:50 2010
@@ -233,16 +233,10 @@ svn_error_t *
svn_wc__internal_versioned_file_modcheck(svn_boolean_t *modified_p,
svn_wc__db_t *db,
const char *versioned_file_abspath,
- const char *base_file_abspath,
+ svn_stream_t *pristine_stream,
svn_boolean_t compare_textbases,
apr_pool_t *scratch_pool)
{
- svn_stream_t *pristine_stream;
-
- SVN_ERR_ASSERT(svn_dirent_is_absolute(base_file_abspath));
- SVN_ERR(svn_stream_open_readonly(&pristine_stream, base_file_abspath,
- scratch_pool, scratch_pool));
-
return svn_error_return(compare_and_verify(modified_p, db,
versioned_file_abspath,
pristine_stream,
@@ -258,9 +252,15 @@ svn_wc__versioned_file_modcheck(svn_bool
const char *base_file_abspath,
apr_pool_t *scratch_pool)
{
+ svn_stream_t *pristine_stream;
+
+ SVN_ERR_ASSERT(svn_dirent_is_absolute(base_file_abspath));
+ SVN_ERR(svn_stream_open_readonly(&pristine_stream, base_file_abspath,
+ scratch_pool, scratch_pool));
+
return svn_error_return(svn_wc__internal_versioned_file_modcheck(
modified_p, wc_ctx->db, versioned_file_abspath,
- base_file_abspath,
+ pristine_stream,
TRUE /* compare_textbases */,
scratch_pool));
}
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=960620&r1=960619&r2=960620&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Mon Jul 5 15:14:50
2010
@@ -4490,12 +4490,18 @@ merge_file(svn_skel_t **work_items,
}
else if (new_text_base_sha1_checksum)
{
+ svn_stream_t *pristine_stream;
+
/* We have a new pristine to install. Is the file modified relative
to this new pristine? */
+ SVN_ERR(svn_wc__db_pristine_read(&pristine_stream,
+ eb->db, fb->local_abspath,
+ new_text_base_sha1_checksum,
+ pool, pool));
SVN_ERR(svn_wc__internal_versioned_file_modcheck(&is_locally_modified,
eb->db,
fb->local_abspath,
-
new_text_base_tmp_abspath,
+ pristine_stream,
FALSE, pool));
}
else
Modified: subversion/trunk/subversion/libsvn_wc/wc.h
URL:
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=960620&r1=960619&r2=960620&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/wc.h (original)
+++ subversion/trunk/subversion/libsvn_wc/wc.h Mon Jul 5 15:14:50 2010
@@ -495,8 +495,8 @@ svn_wc__internal_conflicted_p(svn_boolea
*
* If COMPARE_TEXTBASES is true, translate VERSIONED_FILE_ABSPATH's EOL
* style and keywords to repository-normal form according to its properties,
- * and compare the result with BASE_FILE_ABSPATH. If COMPARE_TEXTBASES is
- * false, translate BASE_FILE_ABSPATH's EOL style and keywords to working-copy
+ * and compare the result with PRISTINE_STREAM. If COMPARE_TEXTBASES is
+ * false, translate PRISTINE_STREAM's EOL style and keywords to working-copy
* form according to VERSIONED_FILE_ABSPATH's properties, and compare the
* result with VERSIONED_FILE_ABSPATH.
*/
@@ -504,7 +504,7 @@ svn_error_t *
svn_wc__internal_versioned_file_modcheck(svn_boolean_t *modified_p,
svn_wc__db_t *db,
const char *versioned_file_abspath,
- const char *base_file_abspath,
+ svn_stream_t *pristine_stream,
svn_boolean_t compare_textbases,
apr_pool_t *scratch_pool);