From 0e57ab96f1e55ead53896e468746aec871d8ddbb Mon Sep 17 00:00:00 2001 From: mhagger Date: Mon, 4 Apr 2011 12:08:32 +0000 Subject: [PATCH] Also consider trunk a possible parent of tags rooted in NTDBRs. git-svn-id: http://cvs2svn.tigris.org/svn/cvs2svn/trunk@5337 be7e6eca-30d4-0310-a8e5-ac0d63af7087 --- cvs2svn_lib/symbol_statistics.py | 7 +++++++ run-tests.py | 21 ++++++++++++++------- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/cvs2svn_lib/symbol_statistics.py b/cvs2svn_lib/symbol_statistics.py index f6ca28a6..05670c15 100644 --- a/cvs2svn_lib/symbol_statistics.py +++ b/cvs2svn_lib/symbol_statistics.py @@ -181,6 +181,13 @@ class _Stats: # revision where the branch is rooted: register(parent_cvs_rev.lod) + # If the parent revision is a non-trunk default (vendor) branch + # revision, then count trunk as a possible parent. See the + # comment by the analogous code in + # register_branch_possible_parents() for more details. + if parent_cvs_rev.ntdbr: + register(cvs_file_items.trunk) + # Branches that are rooted at the same revision are also # possible parents: for branch_id in parent_cvs_rev.branch_ids: diff --git a/run-tests.py b/run-tests.py index 19a3d4b4..1ea203c9 100755 --- a/run-tests.py +++ b/run-tests.py @@ -1177,10 +1177,8 @@ class SimpleTags(Cvs2SvnTestCase): ('/%(trunk)s/proj/sub3/default', 'A'), )) - fromstr = ' (from /%(branches)s/B_FROM_INITIALS:14)' - # Tag on rev 1.1.1.1 of all files in proj - conv.logs[14].check(sym_log_msg('B_FROM_INITIALS'), ( + conv.logs[16].check(sym_log_msg('B_FROM_INITIALS'), ( ('/%(branches)s/B_FROM_INITIALS (from /%(trunk)s:13)', 'A'), ('/%(branches)s/B_FROM_INITIALS/single-files', 'D'), ('/%(branches)s/B_FROM_INITIALS/partial-prune', 'D'), @@ -1189,13 +1187,17 @@ class SimpleTags(Cvs2SvnTestCase): # The same, as a tag log = conv.find_tag_log('T_ALL_INITIAL_FILES') log.check(sym_log_msg('T_ALL_INITIAL_FILES',1), ( - ('/%(tags)s/T_ALL_INITIAL_FILES'+fromstr, 'A'), + ('/%(tags)s/T_ALL_INITIAL_FILES (from /%(trunk)s:13)', 'A'), + ('/%(tags)s/T_ALL_INITIAL_FILES/single-files', 'D'), + ('/%(tags)s/T_ALL_INITIAL_FILES/partial-prune', 'D'), )) # Tag on rev 1.1.1.1 of all files in proj, except one log = conv.find_tag_log('T_ALL_INITIAL_FILES_BUT_ONE') log.check(sym_log_msg('T_ALL_INITIAL_FILES_BUT_ONE',1), ( - ('/%(tags)s/T_ALL_INITIAL_FILES_BUT_ONE'+fromstr, 'A'), + ('/%(tags)s/T_ALL_INITIAL_FILES_BUT_ONE (from /%(trunk)s:13)', 'A'), + ('/%(tags)s/T_ALL_INITIAL_FILES_BUT_ONE/single-files', 'D'), + ('/%(tags)s/T_ALL_INITIAL_FILES_BUT_ONE/partial-prune', 'D'), ('/%(tags)s/T_ALL_INITIAL_FILES_BUT_ONE/proj/sub1/subsubB', 'D'), )) @@ -1229,7 +1231,12 @@ def mixed_time_tag(): log = conv.find_tag_log('T_MIXED') log.check_changes(( - ('/%(tags)s/T_MIXED (from /%(branches)s/B_MIXED:20)', 'A'), + ('/%(tags)s/T_MIXED (from /%(trunk)s:19)', 'A'), + ('/%(tags)s/T_MIXED/single-files', 'D'), + ('/%(tags)s/T_MIXED/partial-prune', 'D'), + ('/%(tags)s/T_MIXED/proj/sub2/subsubA ' + '(from /%(trunk)s/proj/sub2/subsubA:13)', 'R'), + ('/%(tags)s/T_MIXED/proj/sub3 (from /%(trunk)s/proj/sub3:18)', 'R'), )) @@ -1241,7 +1248,7 @@ def mixed_time_branch_with_added_file(): # A branch from the same place as T_MIXED in the previous test, # plus a file added directly to the branch - conv.logs[20].check(sym_log_msg('B_MIXED'), ( + conv.logs[21].check(sym_log_msg('B_MIXED'), ( ('/%(branches)s/B_MIXED (from /%(trunk)s:19)', 'A'), ('/%(branches)s/B_MIXED/partial-prune', 'D'), ('/%(branches)s/B_MIXED/single-files', 'D'), -- 2.11.4.GIT