Thursday, 24th June 2010
The new frontier for learning Java

WikiJava:Using the SVN repository

From WikiJava

Jump to: navigation, search

This page contains instructions on how to:

  • upload your code to the WikiJava Subversion server,
  • how to publish the link to it on your articles,
  • how to configure subversion and download the code from the server.

upload your code

  1. request for an account to the subversion server
  2. checkout your directory from the repository
  3. add your code in your working copy
  4. commit you code

Publish your code

After uploading your code to the repository you can include it in your articles. To do so you have to write:

{{versioned code
|url=http://an.SVN.URL}}

Where http://an.SVN.URL is the url to the file or directory containing the code you want to reference in your article.

The above code will generate the following box:


Image:250px-Subversion.png
You can download the complete code of this article from the Subversion repository at this link

Using the username:readonly and password: readonly

See the using the SVN repository instructions page for more help about this.

Download the code from the WikiJava SVN server

You can get the code from the WikiJava SVN server in two ways:

  1. By clicking on the link inside the page.
  2. By checking out the repository using subversion.

If you click on the link your browser will show you the web version of the SVN server. This may be convenient for pograms with very few files, because you won't need to install SVN.

The preferred way is to checkout the repository using subversion. Using this method you will need to have subversion installed on your computer.

The code on the WikiJava SVN server is open for being downloaded from anyone using the shared account:

Login: readonly
Password: readonly

Which has (guess) only read permission and can't write on the repository. This account is to be used both if you are accessing the repository via web or checking it out using subversion.


If you want to download the code from a WikiJava article that has, for example the following box:

Image:250px-Subversion.png
You can download the complete code of this article from the Subversion repository at this link

Using the username:readonly and password: readonly

See the using the SVN repository instructions page for more help about this.

you should use the following command to download it

svn checkout https://svn2.hosted-projects.com/wikijava/articles/dongiulio/helloworld . --username readonly

NOTE: the dot in the command line must be preserved as it represents the destination directory for the code on the local computer. (Namely the current directory)

When prompted insert the password readonly.

This will checkout and make available on your computer the whole most recent version of the project you are downloading.