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 revisionNext revisionBoth sides next revision | ||
subversion [2008/10/10 16:38] – wayne | subversion [2015/12/02 16:00] – [Initial Checkout] demiankatz | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | To set up a project, you can use several methods. There are several popular Subversion clients, including Eclipse (with Subclipse), Tortoise SVN, Rapid SVN, and the good ol' command line. | + | |
+ | [[http:// | ||
+ | You can use Subversion at several levels: you can [[subversion# | ||
- | ===== Command Line ===== | + | After creating a repository on your subversion-server, |
- | Change to the directory | + | Subversion is a powerful and useful tool, and it's worth taking |
+ | |||
+ | ===== 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 [[https:// | ||
+ | |||
+ | ==== Command Line Checkout ==== | ||
+ | |||
+ | Change to the directory where you want to work on your Vufind instance and then run this command: | ||
+ | |||
+ | < | ||
svn co https:// | svn co https:// | ||
+ | </ | ||
This will check out the Vufind source into a folder named vufind. | This will check out the Vufind source into a folder named vufind. | ||
- | As a side note, don't forget | + | ===== Vendor Branching ===== |
- | svn ex https:// | + | |
- | This removes | + | 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 ===== | ||
+ | |||
+ | | ||
+ | * 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 | ||
+ | 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 /usr/local/vufind/* trunk | ||
+ | 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:// | ||
+ | * 3.) Download the latest version | ||
+ | * 4.) Branch “vendor” to “trunk”. | ||
+ | * 5.) Manually reapply | ||
+ | * 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# | ||
+ | |||
+ | ===== Other Subversion Resources ===== | ||
- | ====== Vendor Branching ====== | + | * [[http:// |
+ | * If using Subclipse on Windows, you may also need [[http:// | ||
+ | * [[https:// | ||
+ | ===== Using Git ===== | ||
+ | Some developers prefer [[http:// | ||
---- struct data ---- | ---- struct data ---- | ||
---- | ---- | ||
legacy/vufind_1.x_developer_manual/subversion.txt · Last modified: 2018/12/19 15:00 by demiankatz