upgrading drupal core (from CVS)

Introduction

Lets assume Drupal was installed from CVS, rather from a tarball or package. This usually happens when you need the newest features. The install might have been done with one command as follows.

Get drupal from the CVS repository
cvs -d:pserver:anonymous:anonymous@cvs.drupal.org:/cvs/drupal checkout -d drupal5 -r DRUPAL-5 drupal

This document shows how to upgrade, once you are on CVS.

Note: Weare probably use SVN (subversion) to also save the entire website and track changes we make. But CVS is how we track changes with the Drupal core.

Further reading

http://drupal.org/handbook/cvs
http://drupal.org/handbook/cvs/quickstart
http://drupal.org/node/52287

Upgrade summary

0. Preparation: Backup the DB and /www directory. Make sure your SVN repository is up to date and committed. i.e. "svn status" shows now changes.

1. Make a list of files that have changed from Drupal core:

Either:

cvs -nq update -dP
or:

cvs status . 2>&1 |egrep "Repository revision|Status" |egrep -v "Up-to-date|Examining"

2. manually examined the differences, so see if its just headers, comments, or key, major changes.

cvs diff FILENAME (for each file listed above)

3. For files that were 'locally modified', but we want to throw away the local changes, and re-get the new original version from Drupal.

cvs update -C FILE

4. Run the update, getting the latest files:

cvs update

5. Run the update, get any new directories added too:

cvs update -d

6. Finally, Recheck to see what files are still not in sync with Drupal core, using the commands in 1. above.

7. Now, we've updated from CVS, and can now:

run the update.php in /www to update the DB if necessary.

test in detail the website, make sure everything is working.

Wait a week, or two, if you're sures everything is 100%, now commit all files changes to SVN. Alternatively you can also summarise all changes made (svn status), or revert them.

Sample upgrade log v5.1 -> 5.3 dev

The following is an example from a test VM.

1. Get a list of changes
root@web1:/www[118]$ cvs status . |egrep "Repository revision|Status" |egrep -v "Up-to-date"

root@web1:/www[154]$ cvs -nq update -dP
? .svn
? README.Freenac.txt
? apache2-default
? cache
? downloads
? favicon.ico
? files
? jobsys
? sitemap.txt
? sitemap.xml
? sitemap.xml.gz
? test.php
? webalizer
? includes/.svn
? misc/.svn
? misc/farbtastic/.svn
? modules/.svn
? modules/aggregator/.svn
? modules/block/.svn
? modules/blog/.svn
? modules/blogapi/.svn
? modules/book/.svn
? modules/color/.svn
? modules/color/images/.svn
? modules/comment/.svn
? modules/contact/.svn
? modules/drupal/.svn
? modules/filter/.svn
? modules/forum/.svn
? modules/help/.svn
? modules/legacy/.svn
? modules/locale/.svn
? modules/menu/.svn
? modules/node/.svn
? modules/path/.svn
? modules/ping/.svn
? modules/poll/.svn
? modules/profile/.svn
? modules/search/.svn
? modules/statistics/.svn
? modules/system/.svn
? modules/taxonomy/.svn
? modules/throttle/.svn
? modules/tracker/.svn
? modules/upload/.svn
? modules/user/.svn
? modules/watchdog/.svn
? profiles/.svn
? profiles/default/.svn
? scripts/.svn
? sites/.svn
? sites/boranmopack.com
? sites/freenacweb.vptt.ch
? sites/old
? sites/all/.svn
? sites/all/include
? sites/all/modules
? sites/all/themes
? sites/default/.svn
? themes/.svn
? themes/freenac.zen
? themes/freenac2
? themes/freenac_zen
? themes/orig.freenac2
? themes/stylized_beauty
? themes/bluemarine/.svn
? themes/chameleon/.svn
? themes/chameleon/marvin/.svn
? themes/engines/.svn
? themes/engines/phptemplate/.svn
? themes/garland/.svn
? themes/garland/color/.svn
? themes/garland/images/.svn
? themes/garland/minnelli/.svn
? themes/garland/minnelli/color/.svn
? themes/pushbutton/.svn
C .htaccess
RCS file: /cvs/drupal/drupal/CHANGELOG.txt,v
retrieving revision 1.173.2.4
retrieving revision 1.173.2.9
Merging differences between 1.173.2.4 and 1.173.2.9 into CHANGELOG.txt
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in CHANGELOG.txt
C CHANGELOG.txt
M INSTALL.mysql.txt
M INSTALL.pgsql.txt
RCS file: /cvs/drupal/drupal/INSTALL.txt,v
retrieving revision 1.39
retrieving revision 1.39.2.2
Merging differences between 1.39 and 1.39.2.2 into INSTALL.txt
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in INSTALL.txt
C INSTALL.txt
M LICENSE.txt
M MAINTAINERS.txt
M UPGRADE.txt
M index.php
RCS file: /cvs/drupal/drupal/install.php,v
retrieving revision 1.34.2.1
retrieving revision 1.34.2.2
Merging differences between 1.34.2.1 and 1.34.2.2 into install.php
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in install.php
C install.php
M robots.txt
M update.php
M xmlrpc.php
cvs update: New directory `database' -- ignored
RCS file: /cvs/drupal/drupal/includes/bootstrap.inc,v
retrieving revision 1.145.2.3
retrieving revision 1.145.2.6
Merging differences between 1.145.2.3 and 1.145.2.6 into bootstrap.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/bootstrap.inc
C includes/bootstrap.inc
RCS file: /cvs/drupal/drupal/includes/cache.inc,v
retrieving revision 1.5.2.3
retrieving revision 1.5.2.4
Merging differences between 1.5.2.3 and 1.5.2.4 into cache.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/cache.inc
C includes/cache.inc
RCS file: /cvs/drupal/drupal/includes/common.inc,v
retrieving revision 1.611.2.5
retrieving revision 1.611.2.10
Merging differences between 1.611.2.5 and 1.611.2.10 into common.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/common.inc
C includes/common.inc
RCS file: /cvs/drupal/drupal/includes/database.inc,v
retrieving revision 1.62.2.3
retrieving revision 1.62.2.4
Merging differences between 1.62.2.3 and 1.62.2.4 into database.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/database.inc
C includes/database.inc
M includes/database.mysql.inc
M includes/database.mysqli.inc
M includes/database.pgsql.inc
RCS file: /cvs/drupal/drupal/includes/file.inc,v
retrieving revision 1.90
retrieving revision 1.90.2.1
Merging differences between 1.90 and 1.90.2.1 into file.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/file.inc
C includes/file.inc
RCS file: /cvs/drupal/drupal/includes/form.inc,v
retrieving revision 1.174.2.9
retrieving revision 1.174.2.11
Merging differences between 1.174.2.9 and 1.174.2.11 into form.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/form.inc
C includes/form.inc
M includes/image.inc
M includes/install.inc
M includes/install.mysql.inc
M includes/install.mysqli.inc
M includes/install.pgsql.inc
M includes/locale.inc
RCS file: /cvs/drupal/drupal/includes/menu.inc,v
retrieving revision 1.146
retrieving revision 1.146.2.1
Merging differences between 1.146 and 1.146.2.1 into menu.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/menu.inc
C includes/menu.inc
RCS file: /cvs/drupal/drupal/includes/module.inc,v
retrieving revision 1.93.2.1
retrieving revision 1.93.2.2
Merging differences between 1.93.2.1 and 1.93.2.2 into module.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/module.inc
C includes/module.inc
M includes/pager.inc
M includes/path.inc
RCS file: /cvs/drupal/drupal/includes/session.inc,v
retrieving revision 1.37.2.1
retrieving revision 1.37.2.2
Merging differences between 1.37.2.1 and 1.37.2.2 into session.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/session.inc
C includes/session.inc
RCS file: /cvs/drupal/drupal/includes/tablesort.inc,v
retrieving revision 1.43
retrieving revision 1.43.2.1
Merging differences between 1.43 and 1.43.2.1 into tablesort.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/tablesort.inc
C includes/tablesort.inc
RCS file: /cvs/drupal/drupal/includes/theme.inc,v
retrieving revision 1.337.2.1
retrieving revision 1.337.2.2
Merging differences between 1.337.2.1 and 1.337.2.2 into theme.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in includes/theme.inc
C includes/theme.inc
M includes/unicode.inc
M includes/xmlrpc.inc
M includes/xmlrpcs.inc
M misc/autocomplete.js
M misc/collapse.js
RCS file: /cvs/drupal/drupal/misc/drupal.js,v
retrieving revision 1.29
retrieving revision 1.29.2.1
Merging differences between 1.29 and 1.29.2.1 into drupal.js
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in misc/drupal.js
C misc/drupal.js
M misc/jquery.js
M misc/maintenance.css
M misc/print.css
M misc/progress.js
M misc/tableselect.js
M misc/textarea.js
M misc/update.js
M misc/upload.js
M misc/farbtastic/farbtastic.css
M misc/farbtastic/farbtastic.js
cvs update: New directory `modules/actions' -- ignored
M modules/aggregator/aggregator.css
M modules/aggregator/aggregator.info
M modules/aggregator/aggregator.install
RCS file: /cvs/drupal/drupal/modules/aggregator/aggregator.module,v
retrieving revision 1.324
retrieving revision 1.324.2.1
Merging differences between 1.324 and 1.324.2.1 into aggregator.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/aggregator/aggregator.module
C modules/aggregator/aggregator.module
cvs update: New directory `modules/archive' -- ignored
M modules/block/block.css
M modules/block/block.info
RCS file: /cvs/drupal/drupal/modules/block/block.module,v
retrieving revision 1.246.2.4
retrieving revision 1.246.2.6
Merging differences between 1.246.2.4 and 1.246.2.6 into block.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/block/block.module
C modules/block/block.module
M modules/blog/blog.info
M modules/blog/blog.module
M modules/blogapi/blogapi.info
RCS file: /cvs/drupal/drupal/modules/blogapi/blogapi.module,v
retrieving revision 1.100.2.1
retrieving revision 1.100.2.2
Merging differences between 1.100.2.1 and 1.100.2.2 into blogapi.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/blogapi/blogapi.module
C modules/blogapi/blogapi.module
M modules/book/book.css
M modules/book/book.info
M modules/book/book.install
M modules/book/book.module
M modules/color/color.css
M modules/color/color.info
M modules/color/color.install
M modules/color/color.js
RCS file: /cvs/drupal/drupal/modules/color/color.module,v
retrieving revision 1.13.2.1
retrieving revision 1.13.2.2
Merging differences between 1.13.2.1 and 1.13.2.2 into color.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/color/color.module
C modules/color/color.module
RCS file: /cvs/drupal/drupal/modules/comment/comment.css,v
retrieving revision 1.1.2.1
retrieving revision 1.1.2.2
Merging differences between 1.1.2.1 and 1.1.2.2 into comment.css
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/comment/comment.css
C modules/comment/comment.css
M modules/comment/comment.info
RCS file: /cvs/drupal/drupal/modules/comment/comment.install,v
retrieving revision 1.2
retrieving revision 1.2.2.1
Merging differences between 1.2 and 1.2.2.1 into comment.install
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/comment/comment.install
C modules/comment/comment.install
RCS file: /cvs/drupal/drupal/modules/comment/comment.module,v
retrieving revision 1.520.2.4
retrieving revision 1.520.2.6
Merging differences between 1.520.2.4 and 1.520.2.6 into comment.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/comment/comment.module
C modules/comment/comment.module
M modules/contact/contact.info
M modules/contact/contact.install
RCS file: /cvs/drupal/drupal/modules/contact/contact.module,v
retrieving revision 1.74
retrieving revision 1.74.2.1
Merging differences between 1.74 and 1.74.2.1 into contact.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/contact/contact.module
C modules/contact/contact.module
cvs update: New directory `modules/dblog' -- ignored
M modules/drupal/drupal.info
M modules/drupal/drupal.install
M modules/drupal/drupal.module
M modules/filter/filter.info
RCS file: /cvs/drupal/drupal/modules/filter/filter.module,v
retrieving revision 1.160.2.1
retrieving revision 1.160.2.3
Merging differences between 1.160.2.1 and 1.160.2.3 into filter.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/filter/filter.module
C modules/filter/filter.module
M modules/forum/forum.css
M modules/forum/forum.info
M modules/forum/forum.install
RCS file: /cvs/drupal/drupal/modules/forum/forum.module,v
retrieving revision 1.375.2.4
retrieving revision 1.375.2.6
Merging differences between 1.375.2.4 and 1.375.2.6 into forum.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/forum/forum.module
C modules/forum/forum.module
M modules/help/help.css
M modules/help/help.info
M modules/help/help.module
M modules/legacy/legacy.info
M modules/legacy/legacy.module
M modules/locale/locale.css
M modules/locale/locale.info
M modules/locale/locale.install
M modules/locale/locale.module
M modules/menu/menu.info
RCS file: /cvs/drupal/drupal/modules/menu/menu.module,v
retrieving revision 1.100
retrieving revision 1.100.2.1
Merging differences between 1.100 and 1.100.2.1 into menu.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/menu/menu.module
C modules/menu/menu.module
RCS file: /cvs/drupal/drupal/modules/node/content_types.inc,v
retrieving revision 1.24.2.1
retrieving revision 1.24.2.2
Merging differences between 1.24.2.1 and 1.24.2.2 into content_types.inc
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/node/content_types.inc
C modules/node/content_types.inc
RCS file: /cvs/drupal/drupal/modules/node/node.css,v
retrieving revision 1.2
retrieving revision 1.2.2.1
Merging differences between 1.2 and 1.2.2.1 into node.css
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/node/node.css
C modules/node/node.css
M modules/node/node.info
RCS file: /cvs/drupal/drupal/modules/node/node.module,v
retrieving revision 1.776.2.14
retrieving revision 1.776.2.21
Merging differences between 1.776.2.14 and 1.776.2.21 into node.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/node/node.module
C modules/node/node.module
cvs update: New directory `modules/openid' -- ignored
cvs update: New directory `modules/page' -- ignored
M modules/path/path.info
M modules/path/path.module
cvs update: New directory `modules/php' -- ignored
M modules/ping/ping.info
M modules/ping/ping.module
M modules/poll/poll.css
M modules/poll/poll.info
M modules/poll/poll.install
RCS file: /cvs/drupal/drupal/modules/poll/poll.module,v
retrieving revision 1.222
retrieving revision 1.222.2.1
Merging differences between 1.222 and 1.222.2.1 into poll.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/poll/poll.module
C modules/poll/poll.module
M modules/profile/profile.info
M modules/profile/profile.install
RCS file: /cvs/drupal/drupal/modules/profile/profile.module,v
retrieving revision 1.189.2.4
retrieving revision 1.189.2.8
Merging differences between 1.189.2.4 and 1.189.2.8 into profile.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/profile/profile.module
C modules/profile/profile.module
M modules/search/search.css
M modules/search/search.info
RCS file: /cvs/drupal/drupal/modules/search/search.install,v
retrieving revision 1.6
retrieving revision 1.6.2.1
Merging differences between 1.6 and 1.6.2.1 into search.install
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/search/search.install
C modules/search/search.install
RCS file: /cvs/drupal/drupal/modules/search/search.module,v
retrieving revision 1.209.2.3
retrieving revision 1.209.2.5
Merging differences between 1.209.2.3 and 1.209.2.5 into search.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/search/search.module
C modules/search/search.module
M modules/statistics/statistics.info
M modules/statistics/statistics.install
M modules/statistics/statistics.module
cvs update: New directory `modules/story' -- ignored
cvs update: New directory `modules/syslog' -- ignored
M modules/system/admin.css
M modules/system/defaults.css
M modules/system/system.css
M modules/system/system.info
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.69.2.3
retrieving revision 1.69.2.5
Merging differences between 1.69.2.3 and 1.69.2.5 into system.install
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/system/system.install
C modules/system/system.install
RCS file: /cvs/drupal/drupal/modules/system/system.module,v
retrieving revision 1.440.2.12
retrieving revision 1.440.2.18
Merging differences between 1.440.2.12 and 1.440.2.18 into system.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/system/system.module
C modules/system/system.module
M modules/taxonomy/taxonomy.info
RCS file: /cvs/drupal/drupal/modules/taxonomy/taxonomy.module,v
retrieving revision 1.330.2.6
retrieving revision 1.330.2.11
Merging differences between 1.330.2.6 and 1.330.2.11 into taxonomy.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/taxonomy/taxonomy.module
C modules/taxonomy/taxonomy.module
M modules/throttle/throttle.info
M modules/throttle/throttle.module
M modules/tracker/tracker.css
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.info,v
retrieving revision 1.3
retrieving revision 1.3.2.1
Merging differences between 1.3 and 1.3.2.1 into tracker.info
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/tracker/tracker.info
C modules/tracker/tracker.info
RCS file: /cvs/drupal/drupal/modules/tracker/tracker.module,v
retrieving revision 1.143
retrieving revision 1.143.2.2
Merging differences between 1.143 and 1.143.2.2 into tracker.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/tracker/tracker.module
C modules/tracker/tracker.module
cvs update: New directory `modules/translation' -- ignored
cvs update: New directory `modules/trigger' -- ignored
cvs update: New directory `modules/update' -- ignored
M modules/upload/upload.info
M modules/upload/upload.module
M modules/user/user.css
M modules/user/user.info
RCS file: /cvs/drupal/drupal/modules/user/user.module,v
retrieving revision 1.745.2.8
retrieving revision 1.745.2.19
Merging differences between 1.745.2.8 and 1.745.2.19 into user.module
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in modules/user/user.module
C modules/user/user.module
M modules/watchdog/watchdog.css
M modules/watchdog/watchdog.info
M modules/watchdog/watchdog.module
M profiles/default/default.profile
M scripts/code-clean.sh
M scripts/code-style.pl
M scripts/cron-curl.sh
M scripts/cron-lynx.sh
M sites/all/README.txt
RCS file: /cvs/drupal/drupal/sites/default/Attic/settings.php,v
retrieving revision 1.39.2.2
retrieving revision 1.39.2.3
Merging differences between 1.39.2.2 and 1.39.2.3 into settings.php
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in sites/default/settings.php
C sites/default/settings.php
M themes/bluemarine/style.css
RCS file: /cvs/drupal/drupal/themes/chameleon/chameleon.theme,v
retrieving revision 1.56.2.1
retrieving revision 1.56.2.2
Merging differences between 1.56.2.1 and 1.56.2.2 into chameleon.theme
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in themes/chameleon/chameleon.theme
C themes/chameleon/chameleon.theme
RCS file: /cvs/drupal/drupal/themes/chameleon/common.css,v
retrieving revision 1.11
retrieving revision 1.11.2.1
Merging differences between 1.11 and 1.11.2.1 into common.css
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in themes/chameleon/common.css
C themes/chameleon/common.css
M themes/chameleon/style.css
cvs update: New directory `themes/chameleon/images' -- ignored
M themes/chameleon/marvin/style.css
cvs update: New directory `themes/chameleon/pure' -- ignored
RCS file: /cvs/drupal/drupal/themes/engines/phptemplate/phptemplate.engine,v
retrieving revision 1.54.2.1
retrieving revision 1.54.2.2
Merging differences between 1.54.2.1 and 1.54.2.2 into phptemplate.engine
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in themes/engines/phptemplate/phptemplate.engine
C themes/engines/phptemplate/phptemplate.engine
cvs update: New directory `themes/engines/xtemplate' -- ignored
cvs update: New directory `themes/example' -- ignored
M themes/garland/fix-ie.css
M themes/garland/print.css
RCS file: /cvs/drupal/drupal/themes/garland/style.css,v
retrieving revision 1.14.2.3
retrieving revision 1.14.2.4
Merging differences between 1.14.2.3 and 1.14.2.4 into style.css
rcsmerge: warning: conflicts during merge
cvs update: conflicts found in themes/garland/style.css
C themes/garland/style.css
M themes/garland/template.php
M themes/garland/color/color.inc
M themes/garland/color/preview.css
M themes/garland/minnelli/style.css
M themes/garland/minnelli/color/color.inc
cvs update: New directory `themes/goofy' -- ignored
cvs update: New directory `themes/jeroen' -- ignored
cvs update: New directory `themes/marvin' -- ignored
M themes/pushbutton/style.css
cvs update: New directory `themes/trillian' -- ignored
cvs update: New directory `themes/unconed' -- ignored
cvs update: New directory `themes/xtemplate' -- ignored
cvs update: New directory `themes/yaroon' -- ignored
cvs update: New directory `updates' -- ignored
U misc/favicon.ico

Check some differences
----------------------
cvs diff .htaccess

Revert files locally modified, to the CVS master (i.e. keep the CVS version)
-------------------------------

cvs update -C cron.php
cvs update -C .htaccess CHANGELOG.txt INSTALL.mysql.txt INSTALL.pgsql.txt INSTALL.txt LICENSE.txt MAINTAINERS.txt UPGRADE.txt index.php robots.txt update.php xmlrpc.php includes/bootstrap.inc includes/cache.inc includes/common.inc includes/* misc modules themes

cvs update -C install.php .htaccess profiles scripts sites

Gte all recent changes again, create new dirs too
----------------------------------------------
cvs update -d

Recheck differences
--------------------
cvs -nq update -dP
cvs status . 2>&1 |egrep "Repository revision|Status" |egrep -v "Up-to-date|Examining"

Open issues:
---------------
C .htaccess
sites/default/settings.php

Syndicate content