-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Arno Schuring <[EMAIL PROTECTED]> writes:
> > Venkatesh, Vijay <[EMAIL PROTECTED]> writes: > > > >> I guess this is a fairly often asked question > >> but just wanted to run this by everyone to get > >> some feedback first. (am referring to the > >> essential cvs guidebook) > >> > >> Have two branches app4 and app4_test, which I > >> need to merge (and have done so already into the > >> app4 branch, so merged from app4_test into app4) > > > >> question1 : > > > >> should i now tag app4 to signify the point at > >> which the merge was made? > > > > It would be prudent to do this if you ever wish to > > do subsequent merges of the app4_test into the app4 > > branch in the future. However, if app4_test is to be > > left dorment, then the tag is not really useful. > > I haven't done much merging myself lately, but I always believed a > branch-to-branch merge needed two states (tags) of the source branch, > and the current state of the target branch. Or is both possible? If you are to continue doing branch merges in the future, it is usually desirable to tag the source branch so that you will know where to start the next time you do a merge to the destination branch (for purposes of discussion call this tag the 'merge-point'). Some people find it desirable to create a tag on the destination branch just before doing the merge to facilitate backing out all of the changes should it be determined that the branch was ill done (for purposes of discussion call this tag the 'pre-sync-point'). Some people find it desirable to create a tag on the destination branch just after the merge is complete so that they may be able to compare the tag on the source branch with the post-merge tag to determine the drift between the two branches (for purposes of discussion call this tag the 'post-sync-tag'). > My question more clearly: why tag the target branch instead of the > source branch? Does it really matter which one you choose? Typically, when one creates a new (child) branch, one will also create a branch-point tag (for purposts of discussion call this tag 'branch-point') on the parent branch. Consider the following work... It is time to create the child-branch from the parent-branch cvs checkout -r parent-branch -d parent module cvs tag child-branch-point cvs tag -b child-branch ... It is time to merge the changes of the parent into the child cvs checkout -r parent-branch -d parent module cd parent cvs tag parent-merge-point-1 cvs checkout -r child-branch -d child module cd child cvs tag child-pre-sync-point cvs update -jchild-branch-point -jparent-merge-point-1 ...resolve conflicts cvs commit cvs tag child-post-sync-point At some later time, if it is desirable to merge the changes of the parent into the child again, one does: cvs checkout -r parent-branch -d parent module cd parent cvs tag parent-merge-point-2 cvs checkout -r child-branch -d child module cd child cvs tag child-pre-sync-point-2 cvs update -jparent-merge-point-1 -jparent-merge-point-2 ...resolve conflicts cvs commit cvs tag child-post-sync-point-2 If at this time it is desirable to move all of the changes developed on the child-branch into the parent-branch, then something like: cvs checkout -r child-branch -d child module cd child cvs tag child-merge-point-1 cvs checkout -r parent-branch -d parent module cd parent cvs tag parent-pre-sync-point-1 cvs update -jchild-merge-point-1 ...the above command is the same as 'cvs update -jchild-branch-point .. -jchild-merge-point-1' ...resolve conflicts... cvs commit cvs tag parent-pst-sync-point-1 In the general case, the pre-* and post-* tags are not necessary. I urge you to one of the fine books on cvs (cf, https://cvsbook.red-bean.com/) to help you understand the subtle points... Good luck, -- Mark -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQFCgml73x41pRYZE/gRArtIAJ0S3hx1+hK5z2FH+RJAyHrmrTnkVgCg2Kjl PBPF+wRAwthbeXa8ObuUaUY= =4Vaq -----END PGP SIGNATURE----- _______________________________________________ Info-cvs mailing list Info-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/info-cvs