About Features Downloads Getting Started Documentation Events Support GitHub

Love VuFind®? Consider becoming a financial supporter. Your support helps build a better VuFind®!

Site Tools


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.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
subversion [2010/11/17 14:07] demiankatzlegacy:vufind_1.x_developer_manual:subversion [2015/12/11 20:14] – ↷ Page moved from subversion to legacy:vufind_1.x_developer_manual:subversion demiankatz
Line 4: Line 4:
  
 You can use Subversion at several levels: you can [[subversion#exporting_from_subversion|export]] code from the public VuFind repository as an easy way of loading it onto a server, you can [[subversion#initial_checkout|check out]] code from the public repository in order to see its history and (with proper permissions) contribute changes, or you can run your own local Subversion repository to manage your local changes through the [[subversion#vendor_branching|vendor branching]] strategy. You can use Subversion at several levels: you can [[subversion#exporting_from_subversion|export]] code from the public VuFind repository as an easy way of loading it onto a server, you can [[subversion#initial_checkout|check out]] code from the public repository in order to see its history and (with proper permissions) contribute changes, or you can run your own local Subversion repository to manage your local changes through the [[subversion#vendor_branching|vendor branching]] strategy.
 +
 +After creating a repository on your subversion-server, you'll need to do a checkout of the (still empty) repository into a path of your choice, thus creating a //**working copy**// of your repository. Inside this working copy you can build a subdirectory-structure suitable to your project.
  
 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.  The free [[http://svnbook.red-bean.com/|Version Control with Subversion]] book is a great starting point. 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.  The free [[http://svnbook.red-bean.com/|Version Control with Subversion]] book is a great starting point.
Line 23: Line 25:
  
 ===== Initial Checkout ===== ===== 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://tortoisesvn.net/|Tortoise SVN]] and [[http://www.rapidsvn.org/|Rapid SVN]].  If you don't want to use a fancy graphical tool, there's also the good ol' command line.+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://marketplace.eclipse.org/content/subclipse|Eclipse (with Subclipse)]], [[http://tortoisesvn.net/|Tortoise SVN]] and [[http://www.rapidsvn.org/|Rapid SVN]].  If you don't want to use a fancy graphical tool, there's also the good ol' command line.
  
 ==== Command Line Checkout ==== ==== Command Line Checkout ====
Line 46: Line 48:
  
 To get started, there two possible approaches: To get started, there two possible approaches:
 +
 +
 +
 +
  
 ==== Option A: Rely on Subversion ===== ==== Option A: Rely on Subversion =====
Line 54: Line 60:
   * 4.) Download the version of VuFind you wish to upgrade to into the “vendor” directory.  Commit the changes.   * 4.) Download the version of VuFind you wish to upgrade to into the “vendor” directory.  Commit the changes.
   * 5.) Merge “vendor” into “trunk.”  Resolve conflicts.  Commit.  You’re done!   * 5.) Merge “vendor” into “trunk.”  Resolve conflicts.  Commit.  You’re done!
 +
 +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):
 +
 +<code>
 +# Initialize vendor directory:
 +svn export https://vufind.svn.sourceforge.net/svnroot/vufind/releases/VuFind-1.0/ vendor
 +svn add vendor
 +svn commit -m"Initial load of VuFind 1.0"
 +
 +# Branch to trunk:
 +svn copy vendor trunk
 +svn commit -m"Branched vendor to trunk"
 +
 +# 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"Local customizations"
 +
 +# Load the latest version of VuFind:
 +svn export --force https://vufind.svn.sourceforge.net/svnroot/vufind/trunk/ vendor
 +svn add --force --depth infinity vendor
 +svn commit -m"Latest public trunk"
 +
 +# Merge new changes into trunk (note that if this is not a fresh repository, you may 
 +# need to replace "vendor@1" with a different revision number):
 +svn merge vendor@1 vendor@HEAD trunk
 +svn commit -m"Merged latest public trunk"
 +</code>
  
 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.  Also note that your trunk may end up with some unwanted files because loading a new copy of VuFind into your “vendor” directory won’t automatically delete any files that have become obsolete.  It may be useful to occasionally run a tool like [[http://winmerge.org/|WinMerge]] (described below in Option B) to locate and eliminate these files. 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.  Also note that your trunk may end up with some unwanted files because loading a new copy of VuFind into your “vendor” directory won’t automatically delete any files that have become obsolete.  It may be useful to occasionally run a tool like [[http://winmerge.org/|WinMerge]] (described below in Option B) to locate and eliminate these files.
Line 69: Line 105:
  
 Regardless of which approach you take, once you are done, you are all set to begin using the [[subversion#vendor_branching|Subversion vendor branching strategy]] to keep things up to date.  If you want to stay on the cutting edge, you should get into the habit of keeping up to date with the trunk -- the more often you merge, the less painful the process should be!  Get involved with the [[https://lists.sourceforge.net/mailman/listinfo/vufind-tech|vufind-tech]] mailing list so that you can ask questions about recent changes and be involved in discussions of major changes to the software. Regardless of which approach you take, once you are done, you are all set to begin using the [[subversion#vendor_branching|Subversion vendor branching strategy]] to keep things up to date.  If you want to stay on the cutting edge, you should get into the habit of keeping up to date with the trunk -- the more often you merge, the less painful the process should be!  Get involved with the [[https://lists.sourceforge.net/mailman/listinfo/vufind-tech|vufind-tech]] mailing list so that you can ask questions about recent changes and be involved in discussions of major changes to the software.
 +
 +===== Other Subversion Resources =====
 +
 +  * [[http://tortoisesvn.net/ssh_howto.html|Securing Svnserve using SSH]] - If you want to allow secure access to your local SVN repository, this tutorial will help.
 +    * If using Subclipse on Windows, you may also need [[http://www.woodwardweb.com/java/000155.html|this article]].
 +  * [[https://www.zulius.com/how-to/automatically-update-a-subversion-working-copy-on-commit/|Automatically update a Subversion working copy on commit]] - If you want to use SVN to automatically update your code on a server, this will help (though obviously you should only do this if you know what you are doing!).
 +
 +===== Using Git =====
 +
 +Some developers prefer [[http://git-scm.com|Git]] over Subversion.  If you want to work on VuFind using Git, it is possible.  For some ideas, see [[https://swem.wm.edu/um/vufind/git.html|these notes]] from the College of William & Mary.
 ---- struct data ---- ---- struct data ----
 ---- ----
  
legacy/vufind_1.x_developer_manual/subversion.txt · Last modified: 2018/12/19 15:00 by demiankatz