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

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

From: Danil Shopyrin <danil_at_visualsvn.com>
Date: Wed, 10 Sep 2008 14:37:21 +0400

Hi!

Here is the patch that is trying to fix on of the problem discussed at
http://svn.haxx.se/dev/archive-2008-08/0793.shtml
[[
2) Mergeinfo produced during WC-to-WC copy differs from equivalent
REPO-to-REPO copy. If you copy file in working copy and there is no
mergeinfo in the working copy then the new file will get an empty
mergeinfo record. Similar REPO-to-REPO copy operation doesn't produce
empty mergeinfo record.
]]

The general idea of the patch is as follows: we don't produce any
mergeinfo record if we [definitely] know that it's unnecessary. The
patch should ease the pain in the most cases. For example, it's not
needed to worry about mergeinfo in the cases when:
a. copy is performed within a working copy (it's just a 'local file
rename because of refactoring')
b. there is no merges except ones on the trunk/branches level (or
there is no merges at all)

The log messages 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.
  (check_mergeinfo_affecting): Heuristic algorihthm that checks is the copy
   operation 'mergeinfo affectiong' or not.
  (propagate_mergeinfo_within_wc): Mergeinfo isn't propagated if
   check_mergeinfo_affecting() returns FALSE.

* 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
   effective_mergeinfo and effective_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
   effective_mergeinfo and effective_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): New tests.
  (branch_change_and_merge_back): Helper for the new tests.
  (test_list): Run the new tests.
]]]

The patch itself is in attachment.

-- 
With best regards,
Danil Shopyrin
VisualSVN Team


---------------------------------------------------------------------
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-10 12:37:47 CEST

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.