Skip to content

Z Archived: Moving CORAL from Subversion to Git

remocrevo edited this page Oct 29, 2015 · 1 revision

If your current version of CORAL was downloaded from our old Subversion (SVN) repositories, you will need to make some changes to transition to Git.

Why Git?

We want CORAL to continue growing! We believe that with the combination of Git and the features GitHub provides, this transition will allow us to continue improving and expanding both CORAL and the CORAL community. GitHub gives us a centralized place to track our issues and enhancements, as well as a means to accept code contributions from the community. If you want to get a better sense of what Git is, read this crash course

1. Set up Git

Windows

If you are on Windows, we recommend using TortoiseGit. If you've previously checked out the SVN versions of CORAL you are likely familiar with TortoiseSVN, which should feel very similar to TortoiseGit. Follow the "Download & Install" instructions on the TortoiseGit page. You will need to install msysgit before you install TortoiseGit.

Other Operating Systems

If you are on another operating system, GitHub has some very helpful guides for getting set up and running with Git. Starting from their help page, click on the "Set Up Git" link. This should take you to a page with instructions for setting up Git that are specific to your operating system. If you only want to download the latest version of CORAL, you do not need to follow the "Set up SSH Keys" or any subsequent steps.

2. Download CORAL

Go to the GitHub page for the project you wish to download, such as Resources. You should see a small text field containing a link that ends in ".git". For Resources, it will be: "https://github.com/ndlibersa/resources.git". This is the link you will need to use when you download (or "clone") the repository.

Open the directory where you would like to download the CORAL module. If you are using TortoiseGit, right click somewhere within the folder, and you should be able to select a menu option titled "Git Clone..." This will open up a window in TortoiseGit with two text fields and some other options that you may ignore. In the "Url:" field, enter the link we just got from GitHub: https://github.com/ndlibersa/resources.git and in the "Directory:" field, verify that it is going to be saved in the correct folder. Once everything looks correct, simply click the "OK" button, and the module should start downloading. After a few seconds you should see a "Success" message. You may close the TortoiseGit window, and your module should now be downloaded to the location you specified in the "Directory:" field.

3. Copying over your configuration and customizations

Now it's time to get the new Git-enabled module working! There are several files and directories you will want to make sure are copied over from your old SVN version of the module. These are the steps we recommend to ensure everything is set up correctly:

  1. Move the Git version to your webserver. If you have the resources module on your webserver located at "coral/resources" we recommend putting the new module at "coral/resourcesgit" for now.
  2. Copy admin/configuration.ini from the old module to the new.
  3. Copy the contents of the attachments directories from the old module to the new. This will be the directories such as "attachments" for the resources module, "archive" for the usage module, and both "attachments" and "documents" for the licensing module.
  4. Ensure the attachments directories of the new module are writable by your web server.
  5. Copy over any changes you made to the email formats, located in /admin/emails
  6. Copy over any changes you made to the directory.php, such as customizing the date or payment formats.
  7. Test that your new module is working by visiting it in the browser. For example, if your existing resources module is located at http://example.com/coral/resources, you would visit http://example.com/coral/resourcesgit (if you followed the naming from step 1)
  8. Rename the module directories. We highly recommend maintaining a copy of the old subversion directory for a time, to make sure you do not lose any customizations. Rename the existing "resources" directory to "resourcessvn", and then rename "resourcesgit" to "resources".

4. Breathe a sigh of relief

Hopefully everything is now working! If not, feel free to visit our forums at http://erm.library.nd.edu/forum and post your questions.