See also Configuring the subversion repository (e.g. adding new users to biowikifarm svn)!
The Subversion version control system is used for various parts of the biowikifarm programming or configuration. Typically this involves:
- a set of files is managed by subversion
- on the server (e.g. /usr/share/mediawiki/ext-LOCAL-svn) the files are checked out from subversion, but should not normally be edited there (unless using command-line svn-commit briefly after the change)
The normal procedure is to
- make a local svn checkout on the private computer of a user (for Windows installing Tortoise SVN is recommended)
- checkout https://biowikifarm.net/svn into a folder name "biowikifarm" in any location on your machine that you find suitable
- edit any files there, or
- add new files and mark them with a svn command (right-click when using Tortoise) as to-be-added
- make a subversion commit (if Tortoise SVN is installed, this is done by right clicking on an appropriate folder containing the changes)
Using subversion on your local computer
It is recommended to install Tortoise SVN (http://tortoisesvn.net/downloads.html). After this is done, create a new folder, e.g. named “biowikifarmSVN” in any convenient location on your local machine (desktop, user folder, etc.). Right click on this folder, select “SVN Checkout …” in the context menu. Enter https://biowikifarm.net/svn into “URL of the repository”, leave the rest on the default setting, and click OK.
You will be asked for a username and password.
Tortoise will now download all files in the repository to your local computer. You can edit any files. (To test it, you can create a folder with your user name and “test” in the folder name.)
At first any changes exist only on your local computer. To make them “active” on the server, you need to “commit” your changes. To do this, right click the checkout folder in the Windows Explorer and select “SVN Checkout …” in the context menu. Now all changes will be uploaded.
If you have created a new file, you need to add it to the repository; this can be done in the commit dialog (the checkbox in front of files that have been newly created local and are not in the repository is unchecked at first, check it to include the file in the commit).
To update the files (others may have made changes and committed them) right click the checkout folder in the Windows Explorer again and select “SVN Update” in the context menu. Now all the local files will be updated.
Note: The above is standard use of SVN. However, depending which files your are editing, one point in the setup may be unusual or confusing: when you commit local changes to the repository, the repository itself will ALSO automatically update these files in the place where they may be actively used on the server.
Once you have subversion installed you can simply do checkout, update and commit using 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/ # Test for unwanted local changes: cd /usr/share/mediawikistaging/ sudo svn status phase3 extensions; # 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
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
On the server itself
The first time something is brought into subversion, i is necessary to make a checkout into folders on the server itself:
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. # MISCELLANEOUS: make files executable: # svn propset svn:executable PATH # make files not executable: # svn propdel svn:executable PATH