[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] no mergeinfo on 'mergeinfo NON-affecting' wc-to-wc copy

From: Danil Shopyrin <danil_at_visualsvn.com>
Date: Mon, 22 Sep 2008 15:25:36 +0400

Here is the updated patch.

There are only the following changes:

1)
>> The word "effective" does not convey the meaning of "original (not
>> adjusted)". "original" might be better.
>
> Agreed. I'll update the patch.

I've renamed effective_mergeinfo to original_mergeinfo and
effective_url to original_mergeinfo_url. All dependent entities are
renamed too.

2)
>>> + Set *EFFECTIVE_URL to the last url scanned for mergeinfo. It can be the
>>> + url of WCPATH (in the case of explicit mergeinfo) or one of its ancestors
>>> + (in the case of inherited mergeinfo).
>>> +
>>> + Don't climb through mixed revision working copy if ALLOW_MIXED_REVISIONS
>>> + is FALSE.
>>
>> If it does climb through a mixed-revision working copy, that contradicts
>> a paragraph higher up in the doc string (not visible in this diff). If
>> it doesn't climb through a mixed-revision working copy, what does it do?
>
> I agreed that the updated docstring is inconsistent. I'll fix that.

This docstring is fixed.

3)

The logic of propagate_mergeinfo_within_wc() is changed. Now this
function makes no difference between copying of added and copied
files. The generic algorithm handles both cases universally. The new
test is added.

The new version of the patch works like the originally posted version.
The logic was broken in the second version of the patch.

4)
Some minor formatting changes.

The log message is as follows:
[[[
Don't create any explicit (including empty) mergeinfo record during WC-to-WC
copy if it's a 'mergeinfo NON-affecting' copy. WC-to-WC copy can be
considered as 'megeinfo NON-affecting' if and only if the following
conditions are satisfied:
a) src and dst are located below the same URL
b) mergeinfo (if any) for src and dst is inherited from this URL
c) inherited mergeinfos (if any) for src and dst are equal.

* subversion/libsvn_client/copy.c
 (calculate_target_mergeinfo): svn_client__get_wc_mergeinfo() signature is
  changed.
 (propagate_mergeinfo_within_wc): a) Heuristic algorihthm that checks is the
  copy operation 'mergeinfo affectiong' or not is added. Mergeinfo isn't
  propagated if it's 'mergeinfo NON-affecting' copy. b) Now this function makes
  no difference between copying of added and copied files. The generic
  algorithm handles both cases universally.

* subversion/libsvn_client/merge.c
 (update_wc_mergeinfo,
  get_mergeinfo_paths,
  process_children_with_new_mergeinfo,
  do_directory_merge): svn_client__get_wc_mergeinfo() signature is changed.

* subversion/libsvn_client/mergeinfo.c
 (svn_client__get_wc_mergeinfo): Signature is changed. Now returns
  original_mergeinfo and original_mergeinfo_url and accepts additional
  allow_mixed_revisions flag.
 (svn_client__get_wc_or_repos_mergeinfo,
  svn_client__elide_mergeinfo): svn_client__get_wc_mergeinfo() signature is
  changed.

* subversion/libsvn_client/mergeinfo.h
 (svn_client__get_wc_mergeinfo): Signature is changed. Now returns
  original_mergeinfo and original_mergeinfo_url and accepts additional
  allow_mixed_revisions flag.

* subversion/tests/cmdline/copy_tests.py
 (copy_replace_with_props,
  copy_added_paths_with_props,
  copy_peg_rev_local_files,
  copy_peg_rev_local_dirs): New copy behavior is considered: empty
  mergeinfo isn't generated during mergeinfo non-affecting copy.
 (no_empty_mergeinfo_on_local_copy_file,
  no_empty_mergeinfo_on_local_copy_dir,
  local_copy_with_explicit_mergeinfo,
  local_mergeinfo_non_affecting_copy,
  non_local_copy_between_wc,
  non_local_copy_into_switched,
  non_local_copy_into_nested,
  no_empty_mergeinfo_in_mixed_revision_wc,
  copy_src_explicit_mergeinfo,
  copy_added_file_with_empty_explicit_mergeinfo): New tests.
 (branch_change_and_merge_back): Helper for the new tests.
 (test_list): Run the new tests.
]]]

The new version of the patch is attached.

--
Danil


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe_at_subversion.tigris.org
For additional commands, e-mail: dev-help_at_subversion.tigris.org

Received on 2008-09-22 13:26:08 CEST

This is an archived mail posted to the Subversion Dev mailing list.