maintaining MOODLE18_STABLE with CVS

maintaining MOODLE18_STABLE with CVS

Mark Pearson發表於
Number of replies: 3
I am having a rather major problem here with my first outing using CVS. Using the documentation here I ran the following command line, having first created a directory in my apache root:
cvs -z3 -d:pserver:anonymous@uk.cvs.moodle.org:/cvsroot/moodle co -r MOODLE_18_STABLE moodle

and then set up the moodle system as per normal. All fine and dandy. Because I need to get courses imported from the Banner system I installed the MINTED course profile plugin and got it running. Triffic. Then I noticed some issues with the Assignment module had apparently been fixed. 'Ahah', thinketh I, 'time to use the jolly old CVS update to snag these fixes and then test out the Assignment module'. Then I made my first mistake. I did not backup the moodle directory tree. Blithely assuming all would be well, I went ahead and did an update:

cvs update -dP

All was not well. What had been functioning fine now gives a blank page (see http://moodle.macarius.earlham.edu/). Suspecting that I might have strayed off the Moodle stable path I tried:

cvs update -dP -r MOODLE_18_STABLE

to no avail. Any ideas why the stable branch should deliver a blank opening page?

Cheers

Mark

評比平均分數: -
In reply to Mark Pearson

Re: maintaining MOODLE18_STABLE with CVS

Mark Pearson發表於

Subj: CVS problems sussed (for now)

Using Moodle: maintaining MOODLE18_STABLE with CVS

Here's what I did to fix the problem:

  1. created a fresh installation in a different directory (moodletest) using cvs with the MOODLE_18_STABLE branch as before.
  2. created a test database instance and data directory. All working hunky dory.
  3. performed the cvs update -dPgreat success
  4. NOW I copied over and installed the Minted course profile plugin as before and installed it as per my guide making sure to make a backup copy of the files that MINTED replaces.
  5. At this point I'd like to see whether this configuration of files in moodletest works with the database instance that I had already setup for moodle1.8 . So I made a backup of config.php and copied over the config.php from moodle1.8 to moodletest.
  6. I renamed moodle1.8 to moodle1.8_backup using the mv command and then renamed moodletest to moodle1.8 in the same manner
  7. Now I loaded the site (mapped to http://moodle.macarius.earlham.edu with an Apache VHOSTS directive) and behold, it worketh!
  8. It loads up the Environment page and tells me that the status is OK on all the required components (php, mysql, etc). Press Continue
  9. Asks to upgrade database from (2007021503) to (2007021505) and database sucessfully upgraded upon a 'yes'.

The MINTED plugin seems to be working : there is a 'default settings' section under Courses and it's retreived the former settings correctly.

Conclusion

What moral can I draw from this story?:

  • do a tar -cvzf moodle.tgz moodle to backup before performing a cvs update
  • I suspect that the problem lay in the files that had been changed by the MINTED plugin. Perhaps I should swap the original files back to their original filesnames before executing the cvs upgrade and then swap em back afterwards. A job for a shell script methinks. This I will test out.
In reply to Mark Pearson

Re: maintaining MOODLE18_STABLE with CVS

Anthony Borrow發表於
Core developers的相片 Plugin developers的相片 Testers的相片
You're learning (as am I) about how to better handle upgrades with less risk. Keep up the good work.
In reply to Mark Pearson

Re: maintaining MOODLE18_STABLE with CVS

Anthony Borrow發表於
Core developers的相片 Plugin developers的相片 Testers的相片
Mark - This is precisely the reason I do not use CVS for my production server. I have a test server that I download the latest code for, then I patch in my custom code, and then test it before copying it over to my production server. Even then, I have been somewhat cautious and will actually rename the root directory for my apache server from /MoodleData/moodlecode/production/20070501/ to /MoodleData/moodlecode/production/20070515/ that way I maintain the old code in case I need to go back to it. Sometimes I forget a small customization that I may have done on the fly (without testing) and that I forgot to document. Other times I will download a particular file from CVS to patch a particular bug and I just copy it over on to the production server. I just didn't like the idea of having all of those hidden files lying around so I do things a little differently. It is good to experiment and find what works best for you in your environment. Peace - Anthony