Re: Merge to branch
If both main trunk and branch R18 are in sync till now, then you can merge the changes with following with branch as working copy. cvs update -j HEAD -j R18 your file names This also assumes that there are no commits to main trunk after your required changes. otherwise they will also be merged into the branch. HTH Rohan news wrote: Hello, I have a main trunk and a branch R18. Some changes (on 3 files) have been made by programmer on the main trunk but they should have been done in the R18 branch. I'd like the changes made on the three files to be merged (or just copied) to the R18 branch. Of course, the R18 branch should continue to live but with the changes (I hope my english is good enougth...). Thanks. Jean ___ Info-cvs mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/info-cvs ___ Info-cvs mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/info-cvs
RE: Merge to branch
news wrote: I have a main trunk and a branch R18. Some changes (on 3 files) have been made by programmer on the main trunk but they should have been done in the R18 branch. I'd like the changes made on the three files to be merged (or just copied) to the R18 branch. Of course, the R18 branch should continue to live but with the changes (I hope my english is good enougth...). First of all, your english was more than sufficient to communicate your problem. Fixing this will be quite simple. For simplicity, I will assume that there exist tags 'original' and 'incorrect', which refer to the trunk revisions immediately prior to the check in, and immediately after the check in. For example, if the developer had revision 1.2 checked out, modified it, and checked it in to become rev 1.3 then 'original' would be 1.2, and 'incorrect' would be 1.3. Since there are only three files involved, you could probably simply use the numeric revision instead of applying tags. On the trunk: cvs up -j incorrect -j original file1 file2 file3 #fix up any conflicts# cvs di file1 file2 file3 #examine the diff to ensure it looks reasonable# cvs ci -m Backing out changes incorrectly checked into the trunk file1 file2 file3 On the branch: cvs update -r R18 cvs up -j original -j incorrect file1 file2 file3 #fix up any conflicts# cvs di file1 file2 file3 #examine the diff to ensure it looks reasonable# cvs ci file1 file2 file3 Note that the order of the -j parameters is different between the two commands. The first one does a negative delta to back out the changes on the trunk. The second one does a positive delta to apply the changes to the branch. -- Jim Hyslop Senior Software Designer Leitch Technology International Inc. (http://www.leitch.com) Columnist, C/C++ Users Journal (http://www.cuj.com/experts) ___ Info-cvs mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/info-cvs
Re: Merge to branch
Hello, Rohan Nandode [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] If both main trunk and branch R18 are in sync till now, then you can merge the changes with following with branch as working copy. cvs update -j HEAD -j R18 your file names Thank you very much. It was the main trunk name (HEAD) I didn't know ! It worked. Jean ___ Info-cvs mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/info-cvs
Re: Merge to branch
Hello, Jim.Hyslop [EMAIL PROTECTED] a écrit dans le message de news:[EMAIL PROTECTED] Fixing this will be quite simple. For simplicity, I will assume that there ... Thank you very much for this method. I didn't know it was possible to merge 2 versions in the same branch. I have to read some docs to be more familiar with cvs (wincvs don't help, the help is a shame). Cordialement. Jean ___ Info-cvs mailing list [EMAIL PROTECTED] http://lists.gnu.org/mailman/listinfo/info-cvs
Re: merge or branch?
From: Christine Freight ([EMAIL PROTECTED]) I am having a dispute with a co-worker over how to do something in CVS. I was wondering if anyone out there can help? Here's the situation: A branch (let's call it branchA) gets created off the main line. Then, at some point in time, a branch (branchB) gets created off of branchA. Development continues down branchA, and a new directory, with new files, gets added and committed on branchA. This new directory is obviously not on branchB, since it was created after branchA was created. Question: how does one get the new directory from branchA onto branchB? I would merge the branchA changes into branchB cvs co -r branchB everything cd everything cvs update -d -j branchB_origin -j branchA new_directory cvs commit -m 'merged new_directory from branchA' You did create a tag (branchB_origin, above) to mark the beginning of branchB, right? Also, partial merges like this, (mergiing in _just_ the new_directory) instead of the whole branch, can make it difficult to keep track of what's merged and what's not later on, so be careful and use tags liberally to keep things straight.. So you'd probably want to tag branchA to indicate which portion was merged into branchB. Something like: cvs rtag -r branchB_origin branchA_merged_to_branchB everything cvs rtag -F -r branchA branchA_merged_to_branchB new_directory so that future merges from A to B could use this tag as a starting point and not have re-merge the same changes again. -- steve __ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: merge or branch?
Thanks Steve. Yep, I created a branch origin tag, so I know where the branch forked off. I appreciate the help! ~Christine Stephen Cameron [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED]... From: Christine Freight ([EMAIL PROTECTED]) I am having a dispute with a co-worker over how to do something in CVS. I was wondering if anyone out there can help? Here's the situation: A branch (let's call it branchA) gets created off the main line. Then, at some point in time, a branch (branchB) gets created off of branchA. Development continues down branchA, and a new directory, with new files, gets added and committed on branchA. This new directory is obviously not on branchB, since it was created after branchA was created. Question: how does one get the new directory from branchA onto branchB? I would merge the branchA changes into branchB cvs co -r branchB everything cd everything cvs update -d -j branchB_origin -j branchA new_directory cvs commit -m 'merged new_directory from branchA' You did create a tag (branchB_origin, above) to mark the beginning of branchB, right? Also, partial merges like this, (mergiing in _just_ the new_directory) instead of the whole branch, can make it difficult to keep track of what's merged and what's not later on, so be careful and use tags liberally to keep things straight.. So you'd probably want to tag branchA to indicate which portion was merged into branchB. Something like: cvs rtag -r branchB_origin branchA_merged_to_branchB everything cvs rtag -F -r branchA branchA_merged_to_branchB new_directory so that future merges from A to B could use this tag as a starting point and not have re-merge the same changes again. -- steve __ Do You Yahoo!? Listen to your Yahoo! Mail messages from any phone. http://phone.yahoo.com ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: merge or branch?
At 23:42 27/09/2001 +, you wrote: Development continues down branchA, and a new directory, with new files, gets added and committed on branchA. This new directory is obviously not on branchB, since it was created after branchA was created. I would suggest that you perform the new additions from the mainline (HEAD) whenever you add new directory and files. To get these files down the branch, you'll need to 'branch' these additions. Why? Well, firstly, files added in the branch would be stored in the Attic directory. Secondly, I experienced some problems in merging these type of files back to the HEAD branch. Question: how does one get the new directory from branchA onto branchB? 2. branch the new files in the new directory using the branchB branch tag. In other words: cvs tag -b branchB newfilename. My thoughts are option #2 will create another branch, with the same name (branchB) in cvs. I believe that option 2 will give my colleague what he wants, but I still believe two separate branches were created and merging would have been the better way to go as it would have brought the files over to the original branchB branch. I prefer your option #2. I think CVS does not differentiate between the two 'branch'. Your colleague will simply need to update his local work directory: cvs update -r branchB Rachman _ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: merge a branch which contains a name-changed file
Susie writes: On a specifie branch, I change a file's name from "old" to "new" (the file content is also changed). Next I am going to merge the branch into the HEAD. I hope to see the file "old" is replaced with "new" in the HEAD after the merge. Can I see it? ( I guess the case is: both files exist, and I have to remove the file "old" from HEAD) Assuming you did the rename by removing the old name and adding the new name and then committing those changes, the merge should try to remove the old name and add the new name. (But removing the old name will fail if there were changes on the trunk after the branchpoint which you will have to merge into the new file manually.) -Larry Jones I'm a genius. -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs
Re: merge a branch which contains a name-changed file
One more thing. I have another branch B which is forked off the HEAD before the merge (i.e. B still contains the file with old name). If the merge removes old name and add the new name, what will happen to the file when I merge B into HEAD? Your help is very valuable to me : -Susie - Original Message - From: "Larry Jones" [EMAIL PROTECTED] To: "Susie" [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Wednesday, April 11, 2001 10:21 AM Subject: Re: merge a branch which contains a name-changed file Susie writes: On a specifie branch, I change a file's name from "old" to "new" (the file content is also changed). Next I am going to merge the branch into the HEAD. I hope to see the file "old" is replaced with "new" in the HEAD after the merge. Can I see it? ( I guess the case is: both files exist, and I have to remove the file "old" from HEAD) Assuming you did the rename by removing the old name and adding the new name and then committing those changes, the merge should try to remove the old name and add the new name. (But removing the old name will fail if there were changes on the trunk after the branchpoint which you will have to merge into the new file manually.) -Larry Jones I'm a genius. -- Calvin ___ Info-cvs mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/info-cvs