Posts: 208
Registered: Oct 31, 2006 04:24:09 PM
Merge Manager question
Posted: Oct 06, 2010 06:06:09 PM Hi guys,
When performing an ordinary merge from a development branch to the main branch, Merge Manager skips the merge of directory versions that are identical to those on the main branch, which is of course perfectly normal.
cleartool findmerge . -fversion
-c "Comment" -merge -abort -nzeroHowever, when a new directory element was created on the development branch, and no file elements were added to it, the version that you're left with for future development is the zero version on the main branch. Merge Manager does not merge the 1 version on the development branch back to the main branch since they're identical.
This does not create any problems at all, apart from being stuck with a dangling branch that was never merged. Also, I don't like zero versions. I would prefer to merge these 1 versions from the development branch anyway, so that we'd have a 1 version on the main branch also, and a merge arrow to boot. Is there a way to accomplish this automatically? I currently resort to merging them manually when this happens (fortunately it doesn't happen all that often).
Thanks,
Jozef
Posts: 2 Registered: Oct 08, 2010 09:22:33 AM Re: Merge Manager question Posted: Oct 08, 2010 02:06:42 PM in response to: Jozef's post if it bothers you that much you could write a script and run it after you run the merge. Have the script find the most recent directory version on the branch and see if it has a merge hyperlink. If it doesn't you can either print it out or have the script run a merge. Posts: 208 Registered: Oct 31, 2006 04:24:09 PM Re: Merge Manager question Posted: Nov 08, 2010 05:05:58 PM in response to: DanEngland's post Thanks - actually, it does create a problem because the main branch is set up here as the Production branch. The production labels are moved down from the development branch. I only move down labels from versions that have a merge arrow, which those empty directories do not have. This results in the directory becoming invisible when work starts on the next development branch. The same problem happens when a developer forces an identical checkin by the way, because Merge Manager does not merge those either. Here's the commands that merge these "problem" versions. They're located in BuildForge steps, which explains all those additional %s and "s.
:: check out the version on the main branchcleartool find . -version "version(\main\${BRANCH_TO_BE_MERGED}\${LABEL_TO_BE_MERGED}) && !merge(\main\${BRANCH_TO_BE_MERGED},\main)" -exec "cleartool checkout -comment """Merge $LABEL_TO_BE_MERGED to main""" "%%%CLEARCASE_PN%%%"":: merge the versionscleartool find . -version "version(\main\${BRANCH_TO_BE_MERGED}\${LABEL_TO_BE_MERGED}) && !merge(\main\${BRANCH_TO_BE_MERGED},\main)" -exec "cleartool merge -to "%%%CLEARCASE_PN%%%" "%%%CLEARCASE_XPN%%%"":: checkin all checkedout versions on the main branch that have a merge arrow from the development branch that was mergedcleartool find . -version merge(\main\$BRANCH_TO_BE_MERGED,\main) -print | find "\main\CHECKEDOUT" >temp.txtFOR /f "delims=@@" %%D IN (temp.txt) DO cleartool checkin -identical -ptime -nc "%%D" Use the search field to find all types of content in My developerWorks with that tag.
Use the slider bar to see more or fewer tags.
Popular tags shows the top tags for this particular type of content or application that you're viewing.
My tags shows your tags for this particular type of content or application that you're viewing.
Use the search field to find all types of content in My developerWorks with that tag. Use the slider bar to see more or fewer tags. Popular tags shows the top tags for this particular type of content or application that you're viewing. My tags shows your tags for this particular type of content or application that you're viewing. More Less View the original article here
No comments:
Post a Comment