You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2013/01/21 22:41:50 UTC
svn commit: r1436636 - in /subversion/trunk/subversion: include/svn_client.h
libsvn_client/merge.c
Author: julianfoad
Date: Mon Jan 21 21:41:50 2013
New Revision: 1436636
URL: http://svn.apache.org/viewvc?rev=1436636&view=rev
Log:
Document the two meanings of 'ignore_ancestry' in libsvn_client merge code.
* subversion/include/svn_client.h
(svn_client_merge4): Document both meanings. (This doc string also applies,
by reference, to svn_client_merge_peg4().)
* subversion/libsvn_client/merge.c
(merge_cmd_baton_t): Document both meanings, briefly.
(do_file_merge): Update a comment.
(do_merge): Document both meanings, more fully.
(merge_locked, merge_peg_locked): Refer to the doc string of do_merge().
Modified:
subversion/trunk/subversion/include/svn_client.h
subversion/trunk/subversion/libsvn_client/merge.c
Modified: subversion/trunk/subversion/include/svn_client.h
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_client.h?rev=1436636&r1=1436635&r2=1436636&view=diff
==============================================================================
--- subversion/trunk/subversion/include/svn_client.h (original)
+++ subversion/trunk/subversion/include/svn_client.h Mon Jan 21 21:41:50 2013
@@ -3588,11 +3588,16 @@ svn_client_automatic_merge_get_locations
*
* If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath.
*
- * Use @a ignore_ancestry to control whether or not items being
- * diffed will be checked for relatedness first. Unrelated items
- * are typically transmitted to the editor as a deletion of one thing
- * and the addition of another, but if this flag is TRUE, unrelated
- * items will be diffed as if they were related.
+ * @a ignore_ancestry has both of the following meanings:
+ *
+ * (1) Disable merge tracking, by treating the two sources as unrelated
+ * even if they actually have a common ancestor.
+ *
+ * (2) Diff unrelated nodes as if related. If @a ignore_ancestry is true,
+ * the 'left' and 'right' versions of a node (if they are the same kind)
+ * will be diffed as if they were related even if they are not related.
+ * Otherwise, unrelated items will be diffed as a deletion of one thing
+ * and the addition of another.
*
* If @a force_delete is false and the merge involves deleting a file whose
* content differs from the source-left version, or a locally modified
Modified: subversion/trunk/subversion/libsvn_client/merge.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/merge.c?rev=1436636&r1=1436635&r2=1436636&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/merge.c (original)
+++ subversion/trunk/subversion/libsvn_client/merge.c Mon Jan 21 21:41:50 2013
@@ -255,8 +255,9 @@ typedef struct merge_cmd_baton_t {
is TRUE.*/
svn_boolean_t mergeinfo_capable; /* Whether the merge source server
is capable of Merge Tracking. */
- svn_boolean_t ignore_ancestry; /* Are we ignoring ancestry (and by
- extension, mergeinfo)? FALSE if
+ svn_boolean_t ignore_ancestry; /* Two meanings: don't honor mergeinfo;
+ diff unrelated nodes as if related.
+ See do_merge() doc string. FALSE if
MERGE_SOURCE->ancestral is FALSE. */
svn_boolean_t reintegrate_merge; /* Whether this is a --reintegrate
merge or not. */
@@ -6866,11 +6867,8 @@ do_file_merge(svn_mergeinfo_catalog_t re
/* Deduce property diffs. */
SVN_ERR(svn_prop_diffs(&propchanges, props2, props1, iterpool));
- /* If we aren't ignoring ancestry, then we've already done
- ancestry relatedness checks. If we are ignoring ancestry, or
- our sources are known to be related, then we can do
- text-n-props merge; otherwise, we have to do a delete-n-add
- merge. */
+ /* If the sources are related or we're ignoring ancestry in diffs,
+ do a text-n-props merge; otherwise, do a delete-n-add merge. */
if (! (merge_b->ignore_ancestry || sources_related))
{
/* Delete... */
@@ -8870,9 +8868,23 @@ ensure_ra_session_url(svn_ra_session_t *
paths and the values are the new mergeinfos for each. Allocate additions
to RESULT_CATALOG in pool which RESULT_CATALOG was created in.
- FORCE_DELETE, DRY_RUN, RECORD_ONLY, IGNORE_ANCESTRY, DEPTH, MERGE_OPTIONS,
+ FORCE_DELETE, DRY_RUN, RECORD_ONLY, DEPTH, MERGE_OPTIONS,
and CTX are as described in the docstring for svn_client_merge_peg3().
+ IGNORE_ANCESTRY has both of the following meanings:
+
+ (1) Disable merge tracking, by treating the two sources as unrelated
+ even if they actually have a common ancestor. See the macro
+ HONOR_MERGEINFO().
+
+ (2) Diff unrelated nodes as if related. If IGNORE_ANCESTRY is true,
+ the 'left' and 'right' versions of a node (if they are the same kind)
+ will be diffed as if they were related even if they are not related.
+ Otherwise, unrelated items will be diffed as a deletion of one thing
+ and the addition of another.
+
+ ### TODO: Use separate flags for the two meanings.
+
If not NULL, RECORD_ONLY_PATHS is a hash of (const char *) paths mapped
to the same. If RECORD_ONLY is true and RECORD_ONLY_PATHS is not NULL,
then record mergeinfo describing the merge only on subtrees which contain
@@ -9133,6 +9145,9 @@ do_merge(apr_hash_t **modified_subtrees,
repository as the target working copy. Other arguments are as in
all of the public merge APIs.
+ IGNORE_ANCESTRY has two meanings: see do_merge().
+ ### TODO: Use separate flags for the two meanings.
+
*USE_SLEEP will be set TRUE if a sleep is required to ensure timestamp
integrity, *USE_SLEEP will be unchanged if no sleep is required.
@@ -9428,7 +9443,15 @@ open_target_wc(merge_target_t **target_p
/*** Public APIs ***/
-/* The body of svn_client_merge4(), which see for details. */
+/* The body of svn_client_merge4(), which see for details.
+ *
+ * If SOURCE1 @ REVISION1 is related to SOURCE2 @ REVISION2 then use merge
+ * tracking (subject to other constraints -- see HONOR_MERGEINFO());
+ * otherwise disable merge tracking.
+ *
+ * IGNORE_ANCESTRY has two meanings: see do_merge().
+ * ### TODO: Use separate flags for the two meanings.
+ */
static svn_error_t *
merge_locked(const char *source1,
const svn_opt_revision_t *revision1,
@@ -10841,6 +10864,11 @@ svn_client_merge_reintegrate(const char
}
+/* The body of svn_client_merge_peg4(), which see for details.
+ *
+ * IGNORE_ANCESTRY has two meanings: see do_merge().
+ * ### TODO: Use separate flags for the two meanings.
+ */
static svn_error_t *
merge_peg_locked(const char *source_path_or_url,
const svn_opt_revision_t *source_peg_revision,