Difference between revisions of "Help:Subversion"

From Biowikifarm Metawiki
Jump to: navigation, search
m (+DEFAULTSORT)
m
Line 1: Line 1:
Subversion is used to control different versions of files and directories. Here a short cheat sheet. A good documentation is available at http://svnbook.spears.at/nightly/en/ [[File:Flag_icon_en.png|link=]] or http://svnbook.spears.at/nightly/de/ [[File:Flag_icon_de.png|link=]].
+
__TOC__
  
 +
Subversion is used to control different versions of files and directories. A good documentation is available at http://svnbook.spears.at/nightly/en/ [[File:Flag_icon_en.png|link=]] or http://svnbook.spears.at/nightly/de/ [[File:Flag_icon_de.png|link=]]. See also [[Configuring the subversion repository]].
 +
 +
== On the server ==
 
<source lang="bash">
 
<source lang="bash">
 
cd /usr/share/mediawiki/extensions/
 
cd /usr/share/mediawiki/extensions/
 
# will copy all files for the FIRST time into /usr/share/mediawiki/extensions/SemanticForms/
 
# will copy all files for the FIRST time into /usr/share/mediawiki/extensions/SemanticForms/
 
sudo svn checkout --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
 
sudo svn checkout --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
 +
 
# just an update
 
# just an update
 
sudo svn update --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
 
sudo svn update --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
Line 17: Line 21:
 
# 'C' The contents (as opposed to the properties) of the item conflict with updates received from the repository.
 
# 'C' The contents (as opposed to the properties) of the item conflict with updates received from the repository.
 
</source>
 
</source>
 +
 +
== Manage files on a local machine ==
 +
 +
=== Linux ===
 +
Once you have subversion installed you can simply do it by the command line.
 +
<source lang="bash">
 +
cd /my/local/svn/directory/
 +
# checkout the first time
 +
  # svn checkout --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
 +
  svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
 +
# update local files
 +
  svn update http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
 +
# commit files
 +
  cd /my/checked-out/svn/
 +
  svn commit --message "Type your justification here" # or
 +
  svn commit --message "Type your justification here" myfile.txt
 +
</source>
 +
 +
[[File:Kdesvn screenshot.jpg|right|thumb|KDESvn screenshot]]
 +
It is more convenient to use a GUI, like kdesvn.
 +
# Click “Open…” and type in a subversion repository
 +
# Click “Check out” and specify where you want to put it
  
 
[[Category:Help]]
 
[[Category:Help]]
 
{{DEFAULTSORT: {{PAGENAME}}}}
 
{{DEFAULTSORT: {{PAGENAME}}}}

Revision as of 13:53, 27 May 2011

Subversion is used to control different versions of files and directories. A good documentation is available at http://svnbook.spears.at/nightly/en/ Flag icon en.png or http://svnbook.spears.at/nightly/de/ Flag icon de.png. See also Configuring the subversion repository.

On the server

cd /usr/share/mediawiki/extensions/
# will copy all files for the FIRST time into /usr/share/mediawiki/extensions/SemanticForms/
sudo svn checkout --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/

# just an update
sudo svn update --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/

# query status
cd /usr/share/mediawiki/extensions/SemanticForms/
svn status
# '?' not in version control
# 'A' Item is scheduled for addition.
# 'D' Item is scheduled for deletion.
# 'M' Item has been modified.
# 'C' The contents (as opposed to the properties) of the item conflict with updates received from the repository.

Manage files on a local machine

Linux

Once you have subversion installed you can simply do it by the command line.

cd /my/local/svn/directory/
# checkout the first time
  # svn checkout --revision r69050 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
  svn checkout http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
# update local files
  svn update http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/SemanticForms/
# commit files
  cd /my/checked-out/svn/
  svn commit --message "Type your justification here" # or
  svn commit --message "Type your justification here" myfile.txt
KDESvn screenshot

It is more convenient to use a GUI, like kdesvn.

  1. Click “Open…” and type in a subversion repository
  2. Click “Check out” and specify where you want to put it