[drupal-devel] CVS question: Multiple branch tags on a module
Hi, all This time I'm asking before I screw something up. Dries has kindly wiped out the mangled mess I made in CVS, and I have successfully re-added my files and tagged them with DRUPAL-4-6 and DRUPAL-4-5 branches (the one code version works with both Drupal cores, because my code is fairly loosely-coupled). Now, when I modify a file and do a CVS commit of the new version, my understanding of the documentation on drupal.org is that I: 1. From a checked out local copy of HEAD, do a "cvs update -dP" to make sure I have the latest version of everything relevant. 2. Do whatever changes are needed to the file(s) of my module. 3. Do a "cvs commit", which will update HEAD only and not 4.6 or 4.5 branches. 4. Do a "cvs tag -b DRUPAL-4-6 {filenames}" and repeat for DRUPAL-4-5. Have I missed anything? Did I misunderstand any of this? Now that I've got things correct, I don't want to mess it up again. :-) Scott -- ------------------------------------------------------------------------------- Scott Courtney Drupal user name: "syscrusher" http://drupal.org/user/9184 scott@4th.com Drupal projects: http://drupal.org/project/user/9184 Sandbox: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/syscrusher
On 12 Apr, 2005, at 14:19, Syscrusher wrote:
Now, when I modify a file and do a CVS commit of the new version, my understanding of the documentation on drupal.org is that I:
1. From a checked out local copy of HEAD, do a "cvs update -dP" to make sure I have the latest version of everything relevant. 2. Do whatever changes are needed to the file(s) of my module. 3. Do a "cvs commit", which will update HEAD only and not 4.6 or 4.5 branches. 4. Do a "cvs tag -b DRUPAL-4-6 {filenames}" and repeat for DRUPAL-4-5.
NO!!! :-) You will never tag again. You only tag files once. Keep a copy checked out for the versions on which you are working: cvs co -d hof-HEAD contributions/modules/hof cvs co -d hof-4.6 -r DRUPAL-4-6 contributions/modules/hof cvs co -d hof-4.5 -r DRUPAL-4-5 contributions/modules/hof Make changes as needed to each version. When you check in, the checkin will happen on that branch: cd hof-4.6 [make changes] cvs ci -m '4.6 changes' hof.module # changes made on 4.6 branch cd ../hof-HEAD [make different changes] cvs ci -m 'HEAD changes' hof.module # changes made on HEAD branch ...etc... Now you can get more sophisticated with merging, but it's often not worth the headache. Make changes in the various places independently (copy and paste are your friends ;-) and then commit on each branch. Don't try to tag again, though. It's already a done deal. - Jim
On Tuesday 12 April 2005 15:46, Jim Riggs wrote:
You will never tag again. You only tag files once. Keep a copy checked out for the versions on which you are working:
cvs co -d hof-HEAD contributions/modules/hof cvs co -d hof-4.6 -r DRUPAL-4-6 contributions/modules/hof cvs co -d hof-4.5 -r DRUPAL-4-5 contributions/modules/hof
Make changes as needed to each version. When you check in, the checkin will happen on that branch:
cd hof-4.6 [make changes] cvs ci -m '4.6 changes' hof.module # changes made on 4.6 branch
I thought this is what got me in trouble before -- trying to commit changes to a tagged branch. What is different here than what I did yesterday that got me messed up? Scott -- ------------------------------------------------------------------------------- Scott Courtney Drupal user name: "syscrusher" http://drupal.org/user/9184 scott@4th.com Drupal projects: http://drupal.org/project/user/9184 Sandbox: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/syscrusher
On Apr 12, 2005 4:45 PM, Syscrusher <scott@4th.com> wrote:
On Tuesday 12 April 2005 15:46, Jim Riggs wrote:
You will never tag again. You only tag files once. Keep a copy checked out for the versions on which you are working:
cvs co -d hof-HEAD contributions/modules/hof cvs co -d hof-4.6 -r DRUPAL-4-6 contributions/modules/hof cvs co -d hof-4.5 -r DRUPAL-4-5 contributions/modules/hof
Make changes as needed to each version. When you check in, the checkin will happen on that branch:
cd hof-4.6 [make changes] cvs ci -m '4.6 changes' hof.module # changes made on 4.6 branch
I thought this is what got me in trouble before -- trying to commit changes to a tagged branch. What is different here than what I did yesterday that got me messed up?
I found jchaffer's "Drupal Contrib Branches Made Simple" to a very nice quick guide to this. Works for me: http://lists.drupal.org/archives/drupal-devel/2005-04/msg00260.html -- e
On Tuesday 12 April 2005 16:52, eric Farris wrote:
I found jchaffer's "Drupal Contrib Branches Made Simple" to a very nice quick guide to this. Works for me: http://lists.drupal.org/archives/drupal-devel/2005-04/msg00260.html
That, and the other comments on this list, worked for me, too. I've just updated my module's three branches....successfully! Life is good. Thanks, everyone. Scott -- ------------------------------------------------------------------------------- Scott Courtney Drupal user name: "syscrusher" http://drupal.org/user/9184 scott@4th.com Drupal projects: http://drupal.org/project/user/9184 Sandbox: http://cvs.drupal.org/viewcvs/drupal/contributions/sandbox/syscrusher
On 12 Apr, 2005, at 15:45, Syscrusher wrote:
On Tuesday 12 April 2005 15:46, Jim Riggs wrote:
You will never tag again. You only tag files once. Keep a copy checked out for the versions on which you are working:
cvs co -d hof-HEAD contributions/modules/hof cvs co -d hof-4.6 -r DRUPAL-4-6 contributions/modules/hof cvs co -d hof-4.5 -r DRUPAL-4-5 contributions/modules/hof
Make changes as needed to each version. When you check in, the checkin will happen on that branch:
cd hof-4.6 [make changes] cvs ci -m '4.6 changes' hof.module # changes made on 4.6 branch
I thought this is what got me in trouble before -- trying to commit changes to a tagged branch. What is different here than what I did yesterday that got me messed up?
That's the beauty of branches: that you /can/ commit changes on them. Just like core where currently the bug fixes are committed to both the HEAD and DRUPAL-4-6 branches. Nothing you did yesterday was fatal. I think you were just more confused than anything. With a bit of work things could have gotten righted. From what I read in one of the threads, you did your initial import into a branch rather than HEAD. This is OK...you just need to then merge those changes into HEAD and/or other branches. This time you did it the other way around which is probably easier. Anyways, you should be OK now.
participants (3)
-
eric Farris -
Jim Riggs -
Syscrusher