Subversion @ Ubuntu

After the confusion when synchronizing my document repositories using rsync and SMB, finally I’ve had enough. I think this is a good time to give SVN (Subversion) a try.

Pretty simple in Ubuntu, as usual :

sudo aptitude install subversion
sudo aptitude install subversion-tools

Create the repository :

svnadmin create /home/harry/svnrepo
svn mkdir file:///home/harry/svnrepo/docs

Before we can run the server, first we need to edit /home/harry/svnrepo/conf/svnserve.conf and edit as necessary.
(hint: anon-access = read, auth-access = write, password-db = passwd)

And then don’t forget to setup the usernames and passwords in /home/harry/svnrepo/conf/passwd.

Now we can run the SVN server :

svnserve -d -r /home/harry/svnrepo/

Import my documents into the just-created SVN repository :

svn import /home/harry/documents svn://192.168.1.88/docs/ -m "initial import" --username sufehmi

That’s it ! Now you have a fully functioning SVN repository and have it host your documents.

Good reading on the subject :

1. THE Book on Subversion
2. Subversion Cheatsheet
3. Subversion FAQ

That should do for now. Gotta run.

51 thoughts on “Subversion @ Ubuntu

  1. My prediction, pretty soon you’ll be “confused” again wishing you can have disconnected operations and you’ll even want multiple repositories.

    In that case, SVK will help you:
    (may need to enable universe Ubuntu repositories first)

    sudo apt-get install svk

    Good luck!

  2. There’s one caveat though.
    If we’re intending to make repo server available beyond corporate firewall, we must enable WebDAV wether in server and in client side.
    As you might probably aware that SVN extend HTTP protocol using WebDAV with their own set of command (PROPGATE, IOPROP, etc etc). This issued really get me major headaches when working offsite.

  3. @Hendy – Blimey, don’t tell me you can read my mind !
    .
    I was just starting to look if I can make this work with minimum hassle in SVN : multi master (2 way sync), offline operation, faster performance, etc (not to mention SVN limitations – already hit it with one of my repo, “file size limit exceeded”) – and it seems that SVK is already able to do these.
    .
    Thanks Hendy, I’ll have a play with SVK today. Nice one !
    .
    @Andry – if you happen to have a Dreamhost webhosting account, setting up an online SVN repo will only cost you a few clicks ! Just have a look here.
    Kudos to Dreamhost for the very useful feature !

  4. I *do* use dreamhost as SVN server.
    My problem is on client side.

    The thing is, my client’s sysadmin wouldn’t allow us to do webDAV thingy. He close all those candy in his Squid. Some sysadmin, huh?

    If you know what is alternate way to get sync with Dreamhost subversion hosted server only using plain old HTTP and port 8080 in client side then please let me know.

    Oh by the way, on local Ubuntu subversion installation, you might find libapache2-svn and websvn useful. Sure, console is sexy but to be able to view our trunks via browser is handy also.

  5. Bukan mbaca pikiran sih… cuma pengalaman pribadi ajah.

    Sayangnya, di Ubuntu at least Edgy Eft 6.10, SVK yang diberikan cukup lama (1.08), padahal versi 2.0 sudah keluar… dan belum pasti apakah di Feisty nanti udah dapet versi 2.0.

    Subversion Edgy juga masih versi 1.3. Dan sampe sekarang belum ada backportnya… Feisty? Dunno.

    Sebagian besar webhosting (misalnya yang saya pake, HostingRails.com) sudah memakai Subversion 1.4. Sayangnya, SVK sepertinya kurang terkenal, belum nemu yang sudah nginstall ini built-in. Dan di HostingRails, berhubung shared hosting, request saya untuk minta SVK ditolak. 🙁

    Sampai sekarang, menurut sekarang memakai SVK cukup nyaman. (meski ada beberapa known bugs di SVK 1.x, …) Di samping itu, repository yang menggunakan format Subversion, artinya kalo ada error ato apa gitu, kita bisa menggunakan teknik2 yang biasa digunakan pada repository Subversion.

    (Pernah kejadian repository corrupt, akhirnya yah… nge-dump deh… itu pun harus memilah mulai dari revision 1 karena entah kenapa kalo mulai dari revision 0… nggak bisa? Aneh.)

    Tips: Oh iya, sering2 verify yah (svnadmin verify ato svk admin verify). Lebih baik mendeteksi error dari awal, daripada menyesal di kemudian hari. (entah kenapa, Subversion/SVK ini tidak langsung komplain kalo repository-nya corrupt…mengerikan!!)

  6. @Andry – wow, my condolences… in that case, you may wish to try SSH tunneling via the HTTP proxy. You’ll need an SSH account, but since you already got a Dreamhost account, this is piece of cake.
    .
    btw, thanks for the web SVN tips, myself haven;t got the time to explore it. Cheers.

  7. mana konspe internet cafe di ltsp.org? kang harry mendua, katanya pendukung fedora, kok sekarang banting setir ke ubuntu?

  8. @Hendy – setahu saya, SVN itu dibuat dalam waktu yang sangat lama karena fokusnya ke reliabilitas.Mereka tidak mau main-main dengan data orang lain katanya.
    .
    Kalau SVK bisa membuat SVN jadi bermasalah, wah sepertinya saya pending dulu deh. Gawat euy kalau sampai corrupt 🙂

  9. Mas Harry,

    Maaf saya nggak sepenuhnya setuju.

    Repository yang corrupt, belum tentu sepenuhnya salah SVK. In fact, karena SVK memakai backend Subversion… most of the time Subversion-lah yang patut “disalahkan”. Besides, there are lots of horror stories about Subversion: 😉

    http://crschmidt.net/blog/archives/67/wedged-subversion-repository/
    http://svn.haxx.se/dev/archive-2004-08/0194.shtml
    http://www.jroller.com/page/dunpanic/Weblog/subversion_base_checksum_mismatch
    http://www.red-sweater.com/blog/?p=22
    http://www.cs.bris.ac.uk/~henkm/svn.html
    http://toxicsoftware.com/blog/subversion_repository_corrupted_again/
    http://www.svnforum.org/2017/viewtopic.php?t=3455
    http://svn.haxx.se/users/archive-2004-11/0378.shtml
    http://saintaardvarkthecarpeted.com/wordpress/?p=254
    http://www.svnforum.org/2017/viewtopic.php?t=1522

    And of course the famous:

    http://www.google.co.id/search?q=site%3Ahttp%3A%2F%2Fsvn.haxx.se+svnadmin+recover+verify

    PS: Yea, I’m so excited about this because I’ve been there myself.. It wasn’t pretty anyway.

  10. Rather than svk+svn, I personally prefer to directly use something like darcs. It’s fast, simple, robust, and ideal for single-user. But of course, that really depends on the type of documents which need to be stored in the repository.

  11. Hi Hendy, I’ve looked at the links, thanks. Seems like most of them are from 2004 / 2005. And most are problems with BerkeleyDB, not really with SVN itself (CMIIW).
    .
    Anyway, seems that SVN is OK now.
    .
    @Ariya – so many toys to play with, so little time….. *sob*
    Life is not fair 😀

  12. Yes, Mr. Sufehmi, I truly agree with you on that one.

    My bad experience happened using Subversion 1.3, and also SVK 1.0x (probably 1.04).

    The versions are relatively old (especially for SVK). Subversion has been 1.4 for about half a year now, and SVK 2.0 has also been released with numerous fixes (and of course new features, since it’s a major version upgrade).

    What makes me sad, is that the Ubuntu repositories currently still contain the old versions. Probably won’t be in the next Feisty, and even less probable in Edgy backports.

    As these programs are very important to me, I’ve e-mailed the maintainers themselves and got not-so-happy news. (these guys are quick repliers, though!) SVK isn’t even part of the main repository, and this was what I got from Barry deFreese:

    “It is unlikely that I can get a new upstream version of a package backported into Edgy. In fact we are in feature Freeze for Feisty so I’m not sure I can even get it in to Feisty but I can give it a shot.”

    My request for Subversion 1.4 is here:
    https://launchpad.net/bugs/91031
    And well, it’s not exactly very excellent news.

  13. We should not compare SVN with Clearcase.Clearcase is a commercial and expensive sofeware,only big company can afford it.On the other hand ,CC is more powerfull than other SCM software like cvs svn designsync and so on.

  14. “Powerful” is a relative term.
    .
    For example; for me PHP is a very powerful programming language. Because I can use it to hack / do pretty much ANYTHING, within a very short time.
    .
    However, for others, for example a friend of mine; Java is the most powerful. Because it enable him to spread the development process to multiple team consisting of many team members located in various places; to build a bin enterprise system.
    .
    It’s the same here. If your needs are fulfilled with Clearcase, good for you. However, if svn can fulfill it, then why bother with anything else. Or, if you can get work done using cvs, don’t bother with svn. And so on.

  15. If your looking for a “Powerful” version control tool like ClearCase, but don’t want to pay so much. Look intro AccuRev instead of CVS or SVN. It is a commercial tool, but works a lot better CVS, or SVN, and is half the cost ClearCase with a lot less administrative headache. We were using SVN for some projects and ClearCase for others. We switched everything over to AccuRev and our performance and release quality has really improved.

  16. Even though the content of this post is limited and quite short, it is very helpful and useful because of the link that was attached.

  17. . I had really admired for helpful technology in this blog and the amazing services in this blog. Thanks a lot for sharing the nice services in this blog.

  18. Pingback: Loch Lomond Lodge

Leave a Reply

Your email address will not be published. Required fields are marked *