Exercises - Subversion

Exercises - Subversion

Each student has its own personal repository.

  • The address of your repository is: https://lalgec.fri.uni-lj.si/spo/USER
  • Replace USER with your username for FRI mail or studis, e.g., if your email address is ab1234@student.fri.uni-lj.si, then USER equals to ab1234.
  • Use your faculty password.
  • In case of trouble contact teaching assistant.
Information about the repository

Do the following exercises directly on your repository (without using local working copy).

a) What is the full address of your repository?

b) Which command should we use to test whether a given address represents repository? Try again also with your neighbour's store.

c) Which command should we use to list the entire contents (file hierarchy) of the repository? Try this later when you have several files in the repository.

d) Which command prints the contents of a given file in the repository. Try this with an existing file in your repository.

Creating a project

Do the following exercises directly on your repository (without using local working copy).

First, we need a place for storing documents which are part of a project. Create a project named vaja1.

a) In your repository create a directory vaja1. Use command svn mkdir.

b) List the repository contents.

Created directory represents a tag (a label) of your project. When you want more projects, you only need to add directories.

c) You can also create subdirectories named trunk, tags, branch. The directory trunk is used to store the main branch of the project, tags for storing tabs of special revisions, and in branch for storing branches.

Work on a local working copy

a) Restore (check out) the project named vaja1 from your repository. When performing the check out you should restore the main branch (labeled trunk) and not the whole project (with all tags and branches).

b) Create several files and directories with arbitrary contents. Gradually add newly created files to the repository and check the status of the working copy often.

c) Commit the changes into the repository. If successfully committed delete the working copy.

d) Repeat the whole cycle several times: checkout, editing, commit. Observer the status, versions during the process etc.

e) Print out the history of changes for your repository? How to print log history for only one file?

Advanced work directly on your repository

Delete your working copy and do the exercise directly on the repository.

a) Try commands mkdir, copy, move, delete directly on the repository.

Creating tags

Finding and memorising particular versions for important revisions can be troublesome. Hence, we rather use tags.

In your repository create a directory named tags, which sole intent is to store tags. Never store anything into this directory. We only use it only occasionally ).

b) Create tag vaja1, which should point to cirectory vaja1.

Hint: We can created tags directly with copy command directly on the repository.

Advanced use

If you got interested into Subversion, you may also check import and export of a project, conflict resolving etc. There are also plenty of tools to work with Subversion.

Hint: At he exercises you will experience better influence and try to understand effective and exploit.

Last modified: Sunday, 21 October 2018, 9:48 PM