Advanced SVN use and known issues
Advanced SVN use - overview
- Update an existing Acquia Drupal installation to SVN
- Combining with other repositories
- Updating or installing specific versions
- Known issues
Node on code style below: "[docroot]"
[docroot] is a path - Note that "[docroot]" stands for the path to your document root directory from wherever you are in your server's directory structure. Since this varies from server to server and setup to setup, you will need substitute the actual path required to match your setup and current location within the directory structure. See also: http://acquia.com/documentation/getting-started/concepts/docroot.
Update an existing Acquia Drupal installation to SVN
If you are already running Acquia Drupal and want to take advantage of the ease and reliability of SVN updates, here is a quick overview of how to "cross-update" your Acquia Drupal code to the SVN version:
- Make complete backups of your site's codebase and database (see Backing up Drupal websites).
-
Take your site offline at Administer > Site configuration > Site maintenance (?q=admin/settings/site-maintenance).
- Login to your server to perform the following steps
-
Rename [docroot] directory [docroot]_old (replacing "[docroot]" with the name of your document root directory):
mv [docroot] [docroot]_old -
Make a new [docroot] directory:
mkdir [docroot] -
Navigate into [docroot]:
cd [docroot] -
Install SVN codebase - while still in the new [docroot] directory:
Do not forget to include the final"." at the end of this command.
-
Move the following files and directories back into [docroot] from [docroot]_old using the commands listed below if they were customized in your existing Acquia Drupal site: .htaccess, robots.txt, "sites" directory, "files" directory. In the following commands, the "files" directory is handled differently than the themes and modules directories because it doesn't exist in the Acquia Drupal SVN distro.
Trailing slashes - Note that the trailing '/' is important when copying the "themes" and "modules" directories, because that tells the "cp" command to copy the contents of the directories and not overwrite the actual destination directory (that must be preserved because it contains important SVN information).
Navigate to [docroot]_old (commands below assume you are inside the [docroot]_old directory - substitute the path to your document root when "[docroot]" is listed below:
cd path/to/[docroot]_old-
cp -f .htaccess [docroot]/ -
cp -f robots.txt [docroot]/ -
cp -f sites/default/settings.php [docroot]/sites/default/ -
cp -fR sites/all/themes/ [docroot]/sites/all/themes/ -
cp -fR sites/all/modules/ [docroot]/sites/all/modules/ -
cp -fR files [docroot]/ -
Move site directories - if you have any site-specific directories within /sites, move them as well.
cp -fR sites/[sitename]/ [docroot]/sites/
-
- Update database - If you have changed versions of Acquia Drupal during this "cross-upgrade" process, you should run the database update script by navigating to http://example.com/update.php and following the instructions presented to you.
-
Put your site back online at Administer > Site configuration > Site maintenance (?q=admin/settings/site-maintenance).
-
Remove [docroot]_old - If all is running as expected and you have kept backups of your site and database from before the upgrade, you may delete the [docroot]_old directory:
rm -r [docroot]_old
Combining Acquia SVN and other repositories
For information on how to use your own code repository in combination with the Acquia Drupal SVN repository, for example, how to pull in custom code, themes, modules not included with Acquia Drupal, etc., the following links provide useful information and instructions:
- http://svnbook.red-bean.com/en/1.4/svn.advanced.externals.html
- http://svnbook.red-bean.com/en/1.4/svn.advanced.vendorbr.html
- http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html
Updating or installing a specific version
There are occasions when you might wish to install a specific, older version of Acquia Drupal from the repository.
To see a history of all the versions contained in the repository enter the following command:
svn log https://svn.acquia.com/drupal/branches/1.x-6.x
Example output:
-----------------------------------------------------------------------
r4877 | buildbot| 2009-03-26 08:37:37 -0400 (Thu, 26 Mar 2009) | 1 line
Acquia Drupal Release 1.2.5...[+ lots more text]
------------------------------------------------------------------------
r4875 | buildbot | 2009-03-25 15:14:16 -0400 (Wed, 25 Mar 2009) | 1 line
Acquia Drupal Release 1.2.4...[+ lots more text]
In this example, if you wanted revision 1.2.4, find svn revision number at the top left of its entry, then enter this command:
svn co -r 4875 https://svn.acquia.com/drupal/branches/1.x-6.x .
Then continue with the installation or update procedure, as the case may be.
Warning: svn will let you downgrade your site to an older AD version, but you'll need to connect it to a backup copy of your site database has not been used with a newer AD version.
Known issues
When moving an Acquia Drupal website installed via SVN to a new server, it might not initially accept Acquia's server certificate, even though it had before.
Re-accept the security certificate if you see an error such as the following:
Error validating server certificate for 'https://svn.acquia.com:443':
- The certificate is not issued by a trusted authority. Use the
fingerprint to validate the certificate manually!
Certificate information:
- Hostname: *.acquia.com
- Valid: from Fri, 22 Aug 2008 00:00:00 GMT until Wed, 26 Aug 2009 23:59:59 GMT
- Issuer: www.digicert.com, DigiCert Inc, US
- Fingerprint: 26:89:5b:ce:4a:42:40:c5:7d:90:87:39:82:83:44:37:de:0d:1c:45
Technical support for Acquia Drupal SVN
All registered users of acquia.com are free to participate in the Acquia Drupal Source Code Repositories forum. Check it to see if other users are experiencing similar problems to yours. SVN support questions may also be sent to installer-support@acquia.com.

Elijah Lynn
Step #7 gives me a 1.x-6.x
Step #7 gives me a 1.x-6.x folder inside my new [docroot] folder (public_html). What am I doing wrong?
jam - Senior Wr...
You must be sure to include
You must be sure to include the final "." after the checkout command. That checks out the *contents* of Acquia Drupal codebase directory into the target directory rather than the Acquia Drupal directory (1.x-6.x, in this case).
- jam | Jeffrey A. McGuire | Senior Writer, Evangelist | jam@acquia.com
I've have a checkout with
I've have a checkout with drupal core pulled from Acquia svn and my sites directory (and everything in it) pulling from my own repository. I have svn externals setup so any changes within sites/ get committed to my own repo.
The problem I'm having now is that I'm not seeing how someone else can easily do a checkout of my entire project in one step...
Does this make sense?
jam - Senior Wr...
I did a little research here
I did a little research here and found out the following:
What you want to do is fairly common and important in projects with external dependencies. It turns out you basically are approaching it backwards: you need to build your repository with Acquia Drupal as an external.
This is called making your own "vendor branch". For some of Acquia's Professional Services projects, the team shares code with customers by keeping the external (Acquia Drupal) and the sites directory in the same level of the repository, then use symlinks judiciously to knit together the document root.
This section of the SVN manual goes into some detail about setting up vendor branches: http://svnbook.red-bean.com/en/1.5/svn.advanced.vendorbr.html
Cheers,
- jam | Jeffrey A. McGuire | Senior Writer, Evangelist | jam@acquia.com