Author: julianfoad Date: Fri Jan 11 18:33:28 2013 New Revision: 1432216 URL: http://svn.apache.org/viewvc?rev=1432216&view=rev Log: Improve doc strings.
* subversion/libsvn_wc/merge.c (merge_text_file): Document the results better. (merge_binary_file): Fix an inverted sense in a to-do note. (svn_wc__internal_merge): Remove an unhelpful comment. * subversion/libsvn_wc/wc.h (svn_wc__internal_merge): State that this does not change working file directly on disk. Modified: subversion/trunk/subversion/libsvn_wc/merge.c subversion/trunk/subversion/libsvn_wc/wc.h Modified: subversion/trunk/subversion/libsvn_wc/merge.c URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/merge.c?rev=1432216&r1=1432215&r2=1432216&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/merge.c (original) +++ subversion/trunk/subversion/libsvn_wc/merge.c Fri Jan 11 18:33:28 2013 @@ -779,15 +779,22 @@ merge_file_trivial(svn_skel_t **work_ite /* Handle a non-trivial merge of 'text' files. (Assume that a trivial * merge was not possible.) * - * If a conflict occurs, preserve copies of the pre-merge files in the - * working copy, generate a conflict description in *CONFLICT_SKEL, and - * set *MERGE_OUTCOME to 'conflicted'. See preserve_pre_merge_files(). + * Set *WORK_ITEMS, *CONFLICT_SKEL and *MERGE_OUTCOME according to the + * result -- to install the merged file, or to indicate a conflict. + * + * On successful merge, leave the result in a temporary file and set + * *WORK_ITEMS to hold work items that will translate and install that + * file into its proper form and place (unless DRY_RUN) and delete the + * temporary file (in any case). Set *MERGE_OUTCOME to 'merged' or + * 'unchanged'. + * + * If a conflict occurs, set *MERGE_OUTCOME to 'conflicted', and (unless + * DRY_RUN) set *WORK_ITEMS and *CONFLICT_SKEL to record the conflict + * and copies of the pre-merge files. See preserve_pre_merge_files() + * for details. * * On entry, all of the output pointers must be non-null and *CONFLICT_SKEL * must either point to an existing conflict skel or be NULL. - * - * Set *WORK_ITEMS, *CONFLICT_SKEL and *MERGE_OUTCOME according to the - * result -- to install the merged file, or to indicate a conflict. */ static svn_error_t* merge_text_file(svn_skel_t **work_items, @@ -854,6 +861,7 @@ merge_text_file(svn_skel_t **work_items, SVN_ERR(svn_io_file_close(result_f, pool)); + /* Determine the MERGE_OUTCOME, and record any conflict. */ if (contains_conflicts && ! dry_run) { *merge_outcome = svn_wc_merge_conflict; @@ -957,7 +965,7 @@ done: * ### Why do we not use preserve_pre_merge_files() in here? The * behaviour would be slightly different, more consistent: the * preserved 'left' and 'right' files would be translated to working - * copy form, which may make a difference except when a binary file + * copy form, which may make a difference when a binary file * contains keyword expansions or when some versions of the file are * not 'binary' even though we're merging in 'binary files' mode. */ @@ -1053,7 +1061,6 @@ merge_binary_file(svn_skel_t **work_item return SVN_NO_ERROR; } -/* XXX Insane amount of parameters... */ svn_error_t * svn_wc__internal_merge(svn_skel_t **work_items, svn_skel_t **conflict_skel, Modified: subversion/trunk/subversion/libsvn_wc/wc.h URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc.h?rev=1432216&r1=1432215&r2=1432216&view=diff ============================================================================== --- subversion/trunk/subversion/libsvn_wc/wc.h (original) +++ subversion/trunk/subversion/libsvn_wc/wc.h Fri Jan 11 18:33:28 2013 @@ -390,8 +390,8 @@ svn_wc__internal_file_modified_p(svn_boo /* Prepare to merge a file content change into the working copy. This does not merge properties; see svn_wc__merge_props() for that. This - ### [does | does not] - change the working file on disk as well as returning work items. + does not change the working file on disk; it returns work items that + will replace the working file on disk when they are run. Merge the difference between LEFT_ABSPATH and RIGHT_ABSPATH into TARGET_ABSPATH.