Difference between revisions of "Subversion"
(Useful SVN commands) |
(cleanup) |
||
Line 1: | Line 1: | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
MediaWiki's SVN uses SSH public key so you don't need a password, so you'll need to supply your ~/.ssh/id_rsa.pub file to the person setting up your [[MW:Commit access|commit access]] (if that files doesn't exist, run ssh-keygen from non-root shell using blank passwd when prompted, see [http://www.debian.org/devel/passwordlessssh this link] for details). Also, you need to set up your [[MW:Subversion/auto-props|auto-props]]. Note also that the commit's are automatically shown on the ''#mediawiki'' IRC channel (see [http://freenode.net/faq.shtml freenode FAQ] re registering a nickname etc) so it's good to have that open when working on the MediaWiki code. | MediaWiki's SVN uses SSH public key so you don't need a password, so you'll need to supply your ~/.ssh/id_rsa.pub file to the person setting up your [[MW:Commit access|commit access]] (if that files doesn't exist, run ssh-keygen from non-root shell using blank passwd when prompted, see [http://www.debian.org/devel/passwordlessssh this link] for details). Also, you need to set up your [[MW:Subversion/auto-props|auto-props]]. Note also that the commit's are automatically shown on the ''#mediawiki'' IRC channel (see [http://freenode.net/faq.shtml freenode FAQ] re registering a nickname etc) so it's good to have that open when working on the MediaWiki code. | ||
Line 43: | Line 7: | ||
svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/RecordAdmin | svn co http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/RecordAdmin | ||
</bash>}} | </bash>}} | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Usage == | == Usage == | ||
Line 116: | Line 20: | ||
{{code|<pre> | {{code|<pre> | ||
svn log -v http://[PATH TO SERVER SVN PROJECT] | svn log -v http://[PATH TO SERVER SVN PROJECT] | ||
+ | </pre>}} | ||
+ | |||
+ | |||
+ | Or to get changes between a certain date range in a local repo; | ||
+ | {{code|<pre> | ||
+ | svn log -r {2012-02-10}:{2012-02-15} | ||
</pre>}} | </pre>}} | ||
Line 216: | Line 126: | ||
</pre>}} | </pre>}} | ||
− | + | === Problems === | |
− | + | When attempting to import the ''/var/www'' structure into the ''/var/svn/www'' repository it bailed after coming across a filename containing special characters with the following fatal error: | |
{{code|<pre> | {{code|<pre> | ||
− | svn | + | svn: Can't convert string from native encoding to 'UTF-8': |
− | + | svn: A?\195?\164o?\195?\188.gif | |
− | |||
− | |||
− | |||
− | |||
− | |||
</pre>}} | </pre>}} | ||
Line 235: | Line 140: | ||
== See also == | == See also == | ||
*[[Configure SVN]] ''- our procedure for setting up SVN and WebSVN on our servers'' | *[[Configure SVN]] ''- our procedure for setting up SVN and WebSVN on our servers'' | ||
+ | *[[MediaWiki SVN Statistics]] | ||
+ | *[http://zaphod.leonweber.de/codeswarms/mediawiki.h264.1024x786.avi CodeSwarm video of MW repository] (38M) | ||
*[http://www.howtoforge.com/debian_subversion_websvn Setting up websvn on Debian/Apache] | *[http://www.howtoforge.com/debian_subversion_websvn Setting up websvn on Debian/Apache] | ||
*[http://jeremyknope.com/articles/2006/05/30/howto-basic-subversion-setup-and-usage Jeremy Knope's tutorial] | *[http://jeremyknope.com/articles/2006/05/30/howto-basic-subversion-setup-and-usage Jeremy Knope's tutorial] | ||
Line 247: | Line 154: | ||
*[http://vis.cs.ucdavis.edu/~ogawa/codeswarm CodeSwarm] ''- renders video's of subversion repository activity'' | *[http://vis.cs.ucdavis.edu/~ogawa/codeswarm CodeSwarm] ''- renders video's of subversion repository activity'' | ||
*[http://wiki.greenstone.org/wiki/index.php/Useful_SVN_Commands Useful SVN commands (wiki)] | *[http://wiki.greenstone.org/wiki/index.php/Useful_SVN_Commands Useful SVN commands (wiki)] | ||
− | [[Category:Projects]][[Category: | + | [[Category:Projects]][[Category:Subversion]] |
Revision as of 13:19, 26 February 2012
MediaWiki's SVN uses SSH public key so you don't need a password, so you'll need to supply your ~/.ssh/id_rsa.pub file to the person setting up your commit access (if that files doesn't exist, run ssh-keygen from non-root shell using blank passwd when prompted, see this link for details). Also, you need to set up your auto-props. Note also that the commit's are automatically shown on the #mediawiki IRC channel (see freenode FAQ re registering a nickname etc) so it's good to have that open when working on the MediaWiki code.
See MW:Subversion for details about using MediaWikis SVN. The following examples download the current code-base and an extension:
Contents
Usage
The most important command to know is how to get help;
To obtain a log of the changes made in a svn project;
Or to get changes between a certain date range in a local repo;
To create a new repository on the server ready for importing a directory of files;
This creates a concise database directory for the new repository on the SERVER in the directory called /tmp/SERVER;
Create an example directory for upload;
Listing the contents in the repository directory path;
To make a local copy you need to use the checkout command. This creates a new directory (default called newrepos) which is a local copy of newrepos.
Note: The directory the svn command is run in determines where the local checkout directories and files will end up.
Now that you have created a local copy all work should be conducted within it. There is a hidden directory called .svn which contains all the information required for the svn framework;
To update a file on your CLIENT directory;
To add a new file to the local svn copy, first make a new file within the directory structure;
The status command will identify differences between the CLIENT copy and the SERVER copy of the repoistory;
The following list provides the details of svn status output;
Problems
When attempting to import the /var/www structure into the /var/svn/www repository it bailed after coming across a filename containing special characters with the following fatal error:
SVN GUI's
- Linux: kdesvn - and many others
- Windows: tortoisesvn
- Macos: svnx
See also
- Configure SVN - our procedure for setting up SVN and WebSVN on our servers
- MediaWiki SVN Statistics
- CodeSwarm video of MW repository (38M)
- Setting up websvn on Debian/Apache
- Jeremy Knope's tutorial
- Svn Cheatsheet
- Secure subversion
- cvs to svn Experiences
- subversion cheatsheet
- Centrestage tutorial
- BioConductor SVN tutorial
- Subversion book
- CodeSwarm - renders video's of subversion repository activity
- Useful SVN commands (wiki)