Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
trunk
Description
While studying merge.c to fix issue 2821, I came across the following snippet of code which suggested a bug to me. <snip from calculate_requested_merges> if (added_mergeinfo) { const char *src_rel_path; SVN_ERR(svn_client__path_relative_to_root(&src_rel_path, entry->url, entry->repos, ra_session, adm_access, pool)); src_rangelist_for_tgt = apr_hash_get(added_mergeinfo, src_rel_path, APR_HASH_KEY_STRING); } </snip> The above logic is wrong, take the following usecase, 1)We branched /trunk as /fb at r51.(Now /fb has a mergeinfo of /trunk: 1-50) 2)We did changes to /fb at r52 and r53 3)Synched up the changes from /trunk to /fb via a merge and committed the merge at r60(Now /fb has a mergeinfo of /trunk: 1-59) 4)Did some changes to /fb at r61, r62 5)Merge -r51:62 $URL_to/fb to $WC_of_trunk Now our above reflective logic code removes '51:59' from '51:62' and hence just merges '60:62' and hence does a bogus possible conflict and never merges the commits '/fb' prior to synch up from the '/trunk' to '/fb'. Attaching simple shell script to prove the problem.
Original issue reported by kameshj