Warning: This page has not been updated in over over a year and may be outdated or deprecated.
legacy:vufind_1.x_developer_manual:subversion
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
subversion [2012/04/03 15:52] – katwol | legacy:vufind_1.x_developer_manual:subversion [2018/12/19 15:00] (current) – demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Subversion ====== | ====== Subversion ====== | ||
- | [[http://subversion.tigris.org/ | + | // VuFind development |
- | + | ||
- | You can use Subversion at several levels: you can [[subversion# | + | |
- | + | ||
- | After creating a repository on your subversion-server, | + | |
- | + | ||
- | Subversion is a powerful and useful tool, and it's worth taking the time to learn about it if you expect to be doing complex customization of VuFind. | + | |
- | + | ||
- | + | ||
- | ===== Exporting from Subversion ===== | + | |
- | + | ||
- | When you want to get the latest files out of a Subversion repository without also loading all of the metadata about their history, you perform an export operation. | + | |
- | + | ||
- | The command to export VuFind' | + | |
- | + | ||
- | < | + | |
- | svn export https:// | + | |
- | </ | + | |
- | + | ||
- | Notes: | + | |
- | * " | + | |
- | * You can add a --force switch if you want to overwrite any existing files in the vufind directory. | + | |
- | + | ||
- | ===== Initial Checkout ===== | + | |
- | You check out code from a Subversion repository when you plan on changing it and want to keep track of its history. There are several popular Subversion clients that simplify the checkout process, including [[eclipse setup|Eclipse (with Subclipse)]], [[http:// | + | |
- | + | ||
- | ==== Command Line Checkout ==== | + | |
- | + | ||
- | Change to the directory where you want to work on your Vufind instance and then run this command: | + | |
- | + | ||
- | < | + | |
- | svn co https:// | + | |
- | </ | + | |
- | + | ||
- | This will check out the Vufind source into a folder named vufind. | + | |
- | + | ||
- | ===== Vendor Branching ===== | + | |
- | + | ||
- | Vendor branching is a useful strategy for merging changes to an external project (i.e. VuFind) with changes to a local project (i.e. your own VuFind-based catalog). | + | |
- | + | ||
- | It sounds complicated at first, but it makes more sense when you understand version control in general. | + | |
- | + | ||
- | ===== Upgrading an Old Custom VuFind Version Using Subversion ===== | + | |
- | + | ||
- | The best upgrade strategy depends on the tools you are using, the scope of the changes, and which versions of VuFind are involved. | + | |
- | + | ||
- | To get started, there two possible approaches: | + | |
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | + | ||
- | ==== Option A: Rely on Subversion ===== | + | |
- | + | ||
- | * 1.) Determine which version of VuFind you originally modified. | + | |
- | * 2.) Branch “vendor” to “trunk”. | + | |
- | * 3.) Copy your customized version of VuFind into the trunk directory, overwriting the files that were branched there by Subversion. | + | |
- | * 4.) Download the version of VuFind you wish to upgrade to into the “vendor” directory. | + | |
- | * 5.) Merge “vendor” into “trunk.” | + | |
- | + | ||
- | Sample commands to upgrade VuFind 1.0 to current trunk (assumes that you start out in an appropriate SVN working directory -- note that this working directory should be from YOUR OWN Subversion repository, not the public VuFind one): | + | |
- | + | ||
- | < | + | |
- | # Initialize vendor directory: | + | |
- | svn export https:// | + | |
- | svn add vendor | + | |
- | svn commit -m" | + | |
- | + | ||
- | # Branch to trunk: | + | |
- | svn copy vendor trunk | + | |
- | svn commit -m" | + | |
- | + | ||
- | # Copy your own files and update the trunk -- note that this cp command is an example | + | |
- | # but isn't really the best way to do this (it will pull in unwanted things like the | + | |
- | # Solr index and cache directories -- you should be more selective). | + | |
- | cp -r / | + | |
- | svn add --force --depth infinity trunk | + | |
- | svn commit -m" | + | |
- | + | ||
- | # Load the latest version of VuFind: | + | |
- | svn export --force https:// | + | |
- | svn add --force --depth infinity vendor | + | |
- | svn commit -m" | + | |
- | + | ||
- | # Merge new changes into trunk (note that if this is not a fresh repository, you may | + | |
- | # need to replace " | + | |
- | svn merge vendor@1 vendor@HEAD trunk | + | |
- | svn commit -m" | + | |
- | </ | + | |
- | + | ||
- | The problem is that step 5 may or may not be difficult, depending on how drastic your changes have been and how many versions of VuFind you are upgrading through. | + | |
- | + | ||
- | ==== Option B: Manually Reintegrate Diffs ==== | + | |
- | + | ||
- | * 1.) Determine which version of VuFind you originally modified. | + | |
- | * 2.) Use a comparison tool like [[http://winmerge.org/ | + | |
- | * 3.) Download the latest version of VuFind into a Subversion directory called “vendor” and commit it. | + | |
- | * 4.) Branch “vendor” to “trunk”. | + | |
- | * 5.) Manually reapply the changes revealed by [[http:// | + | |
- | * 6.) Commit trunk. | + | |
- | + | ||
- | This approach is better for a small number of changes or after many VuFind releases have passed. | + | |
- | + | ||
- | Regardless of which approach you take, once you are done, you are all set to begin using the [[subversion# | + | |
- | + | ||
- | ===== Using Git ===== | + | |
- | + | ||
- | Some developers prefer [[http:// | + | |
---- struct data ---- | ---- struct data ---- | ||
+ | properties.Page Owner : | ||
---- | ---- | ||
legacy/vufind_1.x_developer_manual/subversion.txt · Last modified: 2018/12/19 15:00 by demiankatz