Setting up Subversion on Windows

Setting up svn in Apache is more complicated,

What does that get us? Some kind of web UI? Use of port 80?

clone the repository to my laptop, do some checkins there (without network access, on a plain, train, etc.) and resync with just one command when I’m back home.

What is the difference between what you describe, and working traditionally offline, then checking in when you get back into the office? If a “checkin” occurs on your local machine, and nobody else in the world knows about it… did it really happen? Maybe I’m not understanding the distinction here. I still need to watch the rest of Linus Torvalds’ presentation on this topic ( http://www.youtube.com/watch?v=4XpnKHJAok8 )

Also I don’t like the way Subversion deals with branches and tags

True, that part is a little ghetto-- you shouldn’t be able to check a change into a “tag”, but you can. The tag is sort of an illusion-cum-convention in Subversion; it’s really a branch.

There is no perf penalty for creating hundreds of branches, though. They’re only ultra-lightweight pointers until a change occurs under that branch.

Has anyone tried any of the Visual Studio.net plugins for Subversion?

No, I haven’t. But there are two that I know of:

http://ankhsvn.open.collab.net/
http://www.visualsvn.com/

This is sort of a religious issue. Some developers believe source control should never be done inside the IDE, and I’ve started to see their point after dealing with the many, many bugs in the Team Explorer Visual Studio integration point of Team System.

@Tim:

We looked into SVN plugins when we moved to SubVersion last year, and after trying a few we found VisualSVN (http://www.visualsvn.com/) to be the clear winner - VERY nice integration with Solution Explorer, and context menus to quickly find out a current file’s history, or diff between two versions, etc.

It may be a little pricey for some at $49 a seat, but I definitely think it’s worth the money. Hope that helps :o)

clone the repository to my laptop, do some checkins there (without network access, on a plain, train, etc.) and resync with just one command when I’m back home.

What is the difference between what you describe, and working traditionally offline, then checking in when you get back into the office? If a “checkin” occurs on your local machine, and nobody else in the world knows about it… did it really happen?

The difference is that you can keep a trace of the different checkins you did and you can go back when you want on your local repository. And then you can checkin to the main repository in the end.

1 Like

Setting up svn in Apache is more complicated,
What does that get us? Some kind of web UI? Use of port 80?

Well, it can get you per-directory permissions, a web UI (to browse at least) and a few other things. I’ve got it setup on our Linux server, and it hosts to (mostly) Windows clients.

Ankh is nice, but somehow it feels rather clunky. I stick to Tortoise, or the command line for anything substantial. On Linux, I use either kdesvn or the command line.

I’d still like to switch to a distributed VCS if only for my own convenience, but too many people don’t even grok basic branching and tagging… It’d be torture on them.

http://svn1clicksetup.tigris.org/ - 1clicksetup, all i need for my svn happiness, server+client

What is the difference between what you describe, and working traditionally offline,
then checking in when you get back into the office?

I think this comes down to your philosophy if when to commit your code. Personally I like to make fairly small, incremental changes. I find that this helps when you make a mistake and need to back-track and, more importantly, when you need to merge into another branch.

With subversion you can’t really do this without having your own local repository in addition to the central one. This gets messy.

1 Like

Great tutorial !

could you do the same tutorial for installing and configuring trac on windows…

What does that get us? Some kind of web UI? Use of port 80?

Many organisations don’t allow to open any ports except for the standard 80, 443, etc.
And screw web UI, we’ve got Trac for that :slight_smile:

@Nicholas Wright: If you want it centralized, SVN is the best you can find. There are other dozen open source SCM software but they’re all distributed.

@John Fiala: “svn export” is what you need.

http://www.visualsvn.com/server/ - simple setup for svn + apache and it’s sweet

@Ilici: use exclusive locks, or find a tool that would merge them correctly.

We’ve used Subversion for nearly four years and are on the whole very happy with it (~16 developers, plus QA, plus other groups using it for non-source code files). The biggest limitation we’ve hit is the rather poor tooling related to merges, though it seems svn 1.5 will have considerable improvements here.

We found setting up the repository to use Apache as the server indispensable to permit browsing of checked in files. We don’t use this as much for source code as for other documents (specs, certain test data, etc.). It makes for easy integration to wiki pages, for example, and also makes it easy to for people to “check out” (peruse) specific directories/files (e.g. spreadsheets, Word docs) without checking them out. If the repository purely serviced development needs we likely wouldn’t leverage this as much, though I’ve found it useful to quickly look at code in branches/tagged versions that I don’t have active in my workspace.

Most of our development is in Java and we make use of the Subclipse Eclipse plug-in, though I personally just prefer to handle svn tasks outside the IDE. We also have used Ankh for our VStudio/C++ work and it seemed to work reasonably well.

Although we don’t have a distributed development team, an advantage I can imagine to distributed version control, where needed, is actual revision support locally. If I were doing substantive development work without more or less constant access to the repository I would want something more than the file system and the IDE’s “local history” feature for revision control. This is a key difference I see between just “working offline” and having revision control support locally. Linus pitches this as one of the chief requirements a distributed revision control system is meant to address.

Clearly the needs of a large and largely uncontrolled distributed project are quite different than the needs of traditionally managed teams (“uncontrolled” in the sense that anyone can join and start tinkering, even if official versions go back through some approval process). Linus claims that until he used BitKeeper he didn’t even believe that revision control was necessary or useful, which I find quite revealing either about how he likes to work or the type of work he’s done or both.

I always thought that “SYSTEM” is the most powerful account…

I agree, http://svn1clicksetup.tigris.org/ is a great way to get started with SVN.

Alternatives for a Windows subversion-server:

  • http://www.assembla.com/ Web hosted workspace with SVN, wiki (TRAC), chat, and much more (free for personal use)
  • http://buildix.thoughtworks.com/ Live-cd or ubuntu-install with SVN, project management, Cruise Control for continuous integration and TRAC as a wiki and bug-tracker

As clients I recommend TortoiseSVN or the well done subclipse plugin for Eclipse (http://subclipse.tigris.org/).

Setting up SVN in Apache is more complicated,
What does that get us? Some kind of web UI? Use of port 80?

Yes, with the apache integration you are able to browse your repository with a web interface. FishEye (http://www.atlassian.com/software/fisheye/) is another great (but commercial) web UI for CVS and SVN. TRAC (as mentioned above) also has a integrated repository browser.

A lot of Svn users are moving to Git. I haven’t tried it myself, but I thought I’d mention it, since this is the first blog posting I’ve read in a long time promoting the old hotness :wink:

by the way, is it just me or does your CAPTCHA always display the word “orange”?

Jeff, I agree with you about distributed source control that it is not easy to see the difference with centralized source control. I tried Mercurial for some time and had the same issues.

Actually, this if often a misunderstanding of what a source control system is. I think all programmers will agree with me that source control system allows:

  • to work on a common source code ;
  • to keep an history of the changes ;
  • to back up your work.

The order I choose is intentionnal, this is the way people understand source control. First I can share with others, then I save history, and then I feel safe because my code base lives in a secured server.

With distributed source control, the goal is primarily to keep an history of the changes. Sharing the code is secondary. Backing it up is not even a feature.

The trick is that history is not the source control feature that is the most used. Just compare the number of update/commits on the last revision with the number of updates on older revision. Mainly, working with a source control is just updating on the morning and commiting before leaving. Browsing through history is not a daily activity.

That is why it is so confusing to switch to distributed source control. With distributed source control, history is the main thing. They considered this feature so important that they allow you to browse your history while being offline. You can share with others later.

There is some advantage to that. First, this is much harder to break the build. You don’t have to push untested code or quick and dirty fix “just to save them” because you can save the history locally, do all the testing another day, and finally merge the whole history back with others.

Merge are easier too. With SubVersion, when a conflict occurs, you MUST resolve it before commiting your changes. But you may not understand the conflict and you really really don’t have time to fix that right now. Because distributed source control keeps a whole repository locally, merging is not mandatory when a conflict occurs. You can keep the two versions and choose to resolve the conflict later. Or even ask the programmer that introduced the conflict to fix it.

That being said, I do think that all these software got the problem wrong. What I really want is my computer to keep an history of all the change I do, silently, without having to choose whenever I need an history point.

SubVersion or Mercurial both think that I am smart enough to know when I need to save my changes. They are wrong. I am dumb, an idiot. When I write a function, deletes it, quit my editor, and then want my function back, I am an idiot. An idiot in need of a really smart software to keep track of my all my changes.

(Sorry for the long post and any english mistakes.)

1 Like

Well just in time… I very recently adopted Subversion for our project. It was just the right choice for our team size(about 3 :))… Even though the way it manages some aspect of source control differenlty, it was sure very easy to install and work with in Windows. The way in which it shows the status of files in windows explorer through icon overlay is a nice littel useful feature.

I also use VisualSVN Server. It’s free and lets you set up a repository that’s slightly different than what described here.

  1. It uses Apache on Windows, and automatically creates an SSL (self-signed) certificate for you, so you can run it over HTTPS. (By doing it the way described in this article, you have no encryption – everything is out in the open)
  2. It stores the password in hashes, not plaintext, by using the Apache htpasswd authentication mechanisms.
  3. It uses SVN authz files, which allow you have granular control over a user’s permissions for each directory inside each repository. And it provides the ability to control this in the GUI.

It has a great graphical interface, too. It’s an MMC snapin, so it really makes it feel like it’s a honest-to-goodness Windows service.

And did I mention that it’s free? :slight_smile: