On Sun, 2010-03-07, rhuij...@apache.org wrote: > Author: rhuijben > Date: Sun Mar 7 13:37:09 2010 > New Revision: 919992 > > URL: http://svn.apache.org/viewvc?rev=919992&view=rev > Log: > Replace the loggy_tweak_entry() function in the update editor by two more > specific functions. One for updating BASE_NODE from the update editor and > one for updating WORKING_NODE from svn_wc_add_repos_file4(). > > * subversion/libsvn_wc/update_editor.c > (loggy_tweak_entry): Rename to ... > (loggy_tweak_base_node): ... this. Remove dir_abspath argument and > get parent directory internally. > (merge_file): Update to use loggy_tweak_base_node. > > (loggy_tweak_working_node): New function, based on the old > loggy_tweak_entry() function. Remove updating of deleted, absent, > url and revnum, which only apply to updating base nodes. > (svn_wc_add_repos_file4): Update to use loggy_tweak_working_node.
[...] > +/* Append, to LOG_ACCUM, log commands to update the entry for LOCAL_ABSPATH > + with a NEW_REVISION and a NEW_URL (if non-NULL), making sure > + the entry refers to a file and has no absent or deleted state. > + Use POOL for temporary allocations. */ > +static svn_error_t * > +loggy_tweak_working_node(svn_stringbuf_t *log_accum, > + const char *local_abspath, > + apr_pool_t *pool) Oops - the doc string was for the previous incarnation of this function. - Julian > +{ > + /* Write log entry which will bump the revision number. Also, just > + in case we're overwriting an existing phantom 'deleted' or > + 'absent' entry, be sure to remove the hiddenness. */ > + svn_wc_entry_t tmp_entry; > + apr_uint64_t modify_flags = SVN_WC__ENTRY_MODIFY_KIND > + | SVN_WC__ENTRY_MODIFY_TEXT_TIME > + | SVN_WC__ENTRY_MODIFY_WORKING_SIZE; > + > + tmp_entry.kind = svn_node_file; > + /* Indicate the file was locally modified and we didn't get to > + calculate the true value, but we can't set it to UNKNOWN (-1), > + because that would indicate absense of this value. > + If it isn't locally modified, > + we'll overwrite with the actual value later. */ > + tmp_entry.working_size = SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN; > + /* The same is true for the TEXT_TIME field, except that that doesn't > + have an explicid 'changed' value, so we set the value to 'undefined'. */ > + tmp_entry.text_time = 0; > + > + return svn_error_return( > + svn_wc__loggy_entry_modify(&log_accum, > + svn_dirent_dirname(local_abspath, pool), > + local_abspath, &tmp_entry, modify_flags, > + pool, pool)); > +} [...] > - /* Set the new revision number and URL in the entry and clean up some other > - fields. This clears DELETED from any prior versioned file with the > - same name (needed before attempting to install props). */ > - SVN_ERR(loggy_tweak_entry(pre_props_accum, local_abspath, dir_abspath, > - dst_entry ? dst_entry->revision : ent->revision, > - new_URL, pool)); > + /* ### Clear working node status in preparation for writing a new node. */ > + SVN_ERR(loggy_tweak_working_node(pre_props_accum, local_abspath, pool));