Posts filed under ‘subversion’

Using Subversion source control with MonoDevelop

This article describes how to integrate Subversion source control with MonoDevelop. Subversion has several methods of accessing a repository. In this example, we will be using accessing the repository directly through the local file system. This means the repository sits on the local machine you are working on.

Prerequisites

The following software must be installed.

  • MonoDevelop
  • Subversion

Creating a Subversion Repository

First we need to create a repository where we will store our source code. There appears to be no way to create the repository within MonoDevelop, so you will need to run this from the command line (replace <myhomedirectory> with your home directory.

svnadmin create <myhomedirectory>/subversion

This creates a repository “subversion” in your home directory (note: the default file system is FSFS).

Adding the solution to the repository

Once the repository is created, We can add the solution to the repository.

  1. Launch MonoDevelop.
  2. Open the solution.
  3. In the solution View, right-click on the solution and select Version Control->Publish. This brings up the select repository dialog box.
  4. Click on the “Registered Repositories” tab.
  5. Click on the add button.
  6. Enter the name of the Repository such as “subversion”.
  7. Set the protocol to “File”.
  8. Set the URL to file:///<myhomedirectory>/subversion.
  9. Press OK. This closes the Add repository.
  10. Select the repository and press OK. You will be asked if you want to publish the project into the repository.
  11. Answer Yes.

The solution is now added to the repository.

Using the source control

Now that the solutions has been added to the repository, all of the source files are now under source control. Right-click on any of the file and select Version Control. You can now update, diff, or revert file changes.

April 12, 2008 at 10:33 pm 8 comments

Subversion on a dual boot machine

Recently, I installed Ubuntu on a laptop with Windows XP. I left a Fat32 volume to share documents between Linux and Windows (since it’s still risky to write to NTFS). I later install subversion on both Windows and Linux Partition and though I could subversion as a document versioning system.

At around version 1.1, Subversion introduced a new file system call FSFS. Previous version of Subversion only supported Berkley DB, which only did not work properly cross platform (you get data corruptions). FSFS is a flat file system that do not have this problem and has been the default file system since version 1.2.

Unfortunately, when I attempt to check in a file to a repository on the FAT32 partiton, I got the following error:

Can’t chmod /myrepository

This was puzzling since chmod essentially does nothing on a Fat32 volume. The error message is deceptive. It appears that chmod is attempting to change permission on Fat32, which doesn’t support it and fails. In reality, the cause of the problem is because the Fat32 volume is typically mounted as root. Since the user is not the owner volume, chmod fails.

You have two solutions:

1. Mount the volume as being owned by you. For example, in the fstab, you can add:

/dev/hda3   /media/hda3   vfat  defaults,utf8,umask=007,gid=52,uid=1002 0       1
uid=1002 is my userId. To find out your uid, use the id command. This may not be such a good idea on mult-user machines, but dual boot machines tend to be used primary by one person.

2. Run the svn command using sudo or run as root. Since you are root, you have chmod permission over root owned volumes.

Of course, there are probably more elegant solutions, but this is what I could think of off the top of my head.

July 21, 2006 at 8:12 pm Leave a comment


Calendar

March 2017
M T W T F S S
« Jun    
 12345
6789101112
13141516171819
20212223242526
2728293031  

Posts by Month

Posts by Category