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/05/03 22:56:33 UTC
svn commit: r1099240 - /subversion/trunk/subversion/libsvn_wc/update_editor.c
Author: rhuijben
Date: Tue May 3 20:56:32 2011
New Revision: 1099240
URL: http://svn.apache.org/viewvc?rev=1099240&view=rev
Log:
* subversion/libsvn_wc/update_editor.c
(merge_file): Fix issue #3842, by installing from the pristine store instead
of from a temporary copy when the file is unmodified.
Modified:
subversion/trunk/subversion/libsvn_wc/update_editor.c
Modified: subversion/trunk/subversion/libsvn_wc/update_editor.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/update_editor.c?rev=1099240&r1=1099239&r2=1099240&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/update_editor.c (original)
+++ subversion/trunk/subversion/libsvn_wc/update_editor.c Tue May 3 20:56:32 2011
@@ -3477,26 +3477,38 @@ merge_file(svn_skel_t **work_items,
require retranslation, but receiving a change bumps the revision
number which requires re-expansion of keywords... */
- const char *tmptext;
+ if (is_locally_modified)
+ {
+ const char *tmptext;
- /* Copy and DEtranslate the working file to a temp text-base.
- Note that detranslation is done according to the old props. */
- SVN_ERR(svn_wc__internal_translated_file(
- &tmptext, fb->local_abspath, eb->db, fb->local_abspath,
- SVN_WC_TRANSLATE_TO_NF
- | SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
- eb->cancel_func, eb->cancel_baton,
- result_pool, scratch_pool));
-
- /* We always want to reinstall the working file if the magic
- properties have changed, or there are any keywords present.
- Note that TMPTEXT might actually refer to the working file
- itself (the above function skips a detranslate when not
- required). This is acceptable, as we will (re)translate
- according to the new properties into a temporary file (from
- the working file), and then rename the temp into place. Magic! */
- *install_pristine = TRUE;
- *install_from = tmptext;
+ /* Copy and DEtranslate the working file to a temp text-base.
+ Note that detranslation is done according to the old props. */
+ SVN_ERR(svn_wc__internal_translated_file(
+ &tmptext, fb->local_abspath, eb->db, fb->local_abspath,
+ SVN_WC_TRANSLATE_TO_NF
+ | SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP,
+ eb->cancel_func, eb->cancel_baton,
+ result_pool, scratch_pool));
+
+ /* We always want to reinstall the working file if the magic
+ properties have changed, or there are any keywords present.
+ Note that TMPTEXT might actually refer to the working file
+ itself (the above function skips a detranslate when not
+ required). This is acceptable, as we will (re)translate
+ according to the new properties into a temporary file (from
+ the working file), and then rename the temp into place. Magic!
+ */
+ *install_pristine = TRUE;
+ *install_from = tmptext;
+ }
+ else
+ {
+ /* Use our existing 'copy' from the pristine store instead
+ of making a new copy. This way we can use the standard code
+ to update the recorded size and modification time.
+ (Issue #3842) */
+ *install_pristine = TRUE;
+ }
}
}