Index: subversion/libsvn_wc/adm_crawler.c =================================================================== --- subversion/libsvn_wc/adm_crawler.c (revision 18897) +++ subversion/libsvn_wc/adm_crawler.c (working copy) @@ -716,7 +716,11 @@ const char *base_digest_hex = NULL; unsigned char *local_digest; svn_stream_t *local_stream; + apr_time_t wf_time; + /* Get timestamp of working file, to check for modifications during + commit. */ + SVN_ERR(svn_io_file_affected_time(&wf_time, path, pool)); /* Make an untranslated copy of the working file in the administrative tmp area because a) we want this to work even if someone changes the working file while we're generating the @@ -736,6 +740,10 @@ else SVN_ERR(svn_io_file_rename(tmpf, tmp_base, pool)); + /* Set timestamp to tmp_base. It will be used in log_do_commited() for + fast check modifications of working file during commit. */ + SVN_ERR(svn_io_set_file_affected_time(wf_time, tmp_base, pool)); + /* If we're not sending fulltext, we'll be sending diffs against the text-base. */ if (! fulltext) Index: subversion/libsvn_wc/log.c =================================================================== --- subversion/libsvn_wc/log.c (revision 18897) +++ subversion/libsvn_wc/log.c (working copy) @@ -1111,28 +1111,37 @@ _("Error checking existence of '%s'"), name); if (kind == svn_node_file) { - svn_boolean_t modified; - const char *chosen; + svn_boolean_t modified = FALSE; + apr_time_t wf_time, tmpf_time; + /* Get the timestamp from working and temporary base file. */ + if ((err = svn_io_file_affected_time(&wf_time, wf, pool))) + return svn_error_createf + (pick_error_code(loggy), err, + _("Error getting 'affected time' for '%s'"), + svn_path_local_style(wf, pool)); + + if ((err = svn_io_file_affected_time(&tmpf_time, tmpf, pool))) + return svn_error_createf + (pick_error_code(loggy), err, + _("Error getting 'affected time' for '%s'"), + svn_path_local_style(tmpf, pool)); + /* Verify that the working file is the same as the tmpf file. */ - if ((err = svn_wc__versioned_file_modcheck(&modified, wf, - loggy->adm_access, - tmpf, TRUE, pool))) - return svn_error_createf(pick_error_code(loggy), err, - _("Error comparing '%s' and '%s'"), - svn_path_local_style(wf, pool), - svn_path_local_style(tmpf, pool)); + if (wf_time != tmpf_time) + { + if ((err = svn_wc__versioned_file_modcheck(&modified, wf, + loggy->adm_access, + tmpf, TRUE, pool))) + return svn_error_createf(pick_error_code(loggy), err, + _("Error comparing '%s' and '%s'"), + svn_path_local_style(wf, pool), + svn_path_local_style(tmpf, pool)); + } /* If they are the same, use the working file's timestamp, else use the tmpf file's timestamp. */ - chosen = modified ? tmpf : wf; - - /* Get the timestamp from our chosen file. */ - if ((err = svn_io_file_affected_time(&text_time, chosen, pool))) - return svn_error_createf - (pick_error_code(loggy), err, - _("Error getting 'affected time' for '%s'"), - svn_path_local_style(chosen, pool)); + text_time = modified ? tmpf_time : wf_time; } }