Comments on I Wonder What This Button Does

42 Reader Comments

Back to the Article
  1. “trac”:http://trac.edgewall.org/ is also a good bug/ticketing system that interfaces with subversion

    Copy & paste the code below to embed this comment.
  2. It’s sad, that so many web developers don’t use version control software. It’s even more sad, that a lot of universities don’t don’t include nothing about version control into their Computer Science programs.

    Even when you are working alone, you should place all you projects under version control. In addition to saving your ass when you screw things up, it gives you a nice overview of how the project has evolved over time and answer to questions what the hack were you doing last monday?

    Copy & paste the code below to embed this comment.
  3. Subversion is also handy for server config files, not just those of applications. I work alone, so collaboration functions are virtually irrelevant, but version control makes the process of configuring and tweaking Apache, MySQL, etc. not only faster but less stressful.

    Copy & paste the code below to embed this comment.
  4. ...to get off my bum and implement Subversion. We run it at work, and it has been a lifesaver for your internal application development.

    Sadly, I don’t use it (yet) in my own web-design business. I spent a majority of the weekend trying to fix a problem with a site (in IE) that I sloppily introduced into functional code while working late on Friday. The problem was that I made a lot of changes and I had copies of incremental code changes in different places on the drive. (Horrow show, isn’t it?)

    So, time lost and lessons learned equals solutions implemented.

    Thanks for reminding me about something I already knew about. And thanks for the inspiration to get off my bum and implement Subversion! :)

    Copy & paste the code below to embed this comment.
  5. “WinMerge is also your friend”:http://winmerge.sourceforge.net/ .

    Copy & paste the code below to embed this comment.
  6. Subversion is great, but for first time users, maintaining separate development tasks (Branches) and merging changes back into trunk can be quite a headache.  It really does take some reading of the documentation to fully figure it out.

    Some tips that might be helpful to new users:

    # If you want to save time on the installation, use the included svnserve daemon instead of apache.
    # When replacing a file, avoid deleting the old one and dropping the new one in. It’ll break the reference between them.  Instead, copy the contents of the new file into the old one.
    # When creating Branches, include the revision number that it was created from in the commit comments.

    Copy & paste the code below to embed this comment.
  7. I’ve been using subversion for about a year now and it kicks some major booty.  Keeps those ‘Oh crap!’ moments to a minimum.  On the Mac you should try out “svnX”:http://www.lachoseinteractive.net/en/community/subversion/svnx/features/  for a GUI.  It doesn’t have every feature of svn implemented yet but it has all the basics that most people need.  You can always use the command line to do the rest ;)

    Copy & paste the code below to embed this comment.
  8. Mike: My experience with #2 is solely using Eclipse with the Subclipse Plugin.  I had an external developer working on their own branch who deleted and then replaced 2 key css files.  When the time came to update the branch from trunk, it took some time to figure out what they had done and resolve the issue.

    Copy & paste the code below to embed this comment.
  9. I understand the usage of SVN to control desktop software, but it would be helpful to see an example of how to use it for a *website*.

    Is the site itself the repository? Or is the site a checkout of the repository? Am I going to need to run a server on my local machine, and then sync my changes up to live through SVN? What about the DB? When I make quick changes to the stylesheet or a plugin, will I be jumping hoops just to get them launched?

    I’d be interested in an article explaining this in more detail. But for situations where I’m the sole programmer, I find it just as convenient to edit over FTP in a dev directory, and then rsync it with a live directory.

    Copy & paste the code below to embed this comment.
  10. There’s several ways to go about doing this.

    bq. Is the site itself the repository? Or is the site a checkout of the repository?

    No. Subversion stores files in an opaque format that webservers can’t read. It would be a checkout.

    bq. Am I going to need to run a server on my local machine, and then sync my changes up to live through SVN?

    The easiest way is if you have an external Subversion server that the production server can access, then all you need to do is `svn up` from inside the public html directory.

    However, I do manage a website that has a local repository that’s not web readable. In this case, I use `svn export` to create a tarball of the website, upload it, and extract, overwriting previous files. (an extra note: I usually tag these like DEPLOY-DATE). It’s slightly clunky though, I strongly recommend a public SVN server.

    bq. What about the DB?

    It is a tricky issue. My recommendation, based on the way MediaWiki does it, is to try to keep your database as stable as possible. When you do need to change it, make sure that you make a update.php file that can detect what version of the schema you’re using and update accordingly (run from shell, of course).

    bq. When I make quick changes to the stylesheet or a plugin, will I be jumping hoops just to get them launched?

    For an external SVN server, all you need to do is `svn up` and the changes are live (if the repository and the webserver are on the same server, you can setup a post-commit hook to instruct the webserver to update. I have this setup on another of my websites).

    Internally speaking, you could just upload just the file real fast, but I’d recommend tagging that snapshot anyway so that you can redeploy all the files if necessary.

    bq. I’d be interested in an article explaining this in more detail

    Read the “Subversion Book”:http://svnbook.red-bean.com/

    bq. But for situations where I’m the sole programmer, I find it just as convenient to edit over FTP in a dev directory, and then rsync it with a live directory.

    You should always use version control, even on single person projects. I always use version control on all of mine. ;-)

    Copy & paste the code below to embed this comment.
  11. I strongly recommend any kind of version control. Especially Subversion. Heck, I even use it for non-programming related stuff: short stories, configuration files…

    In that sense, this is good advocacy. However, anyone who’s already using Subversion will find this article kind of useless. I for one would be interested in seeing a survey of managing non-versionable properties, like database schemas/formats and external environments (PHP 4.3.11 vs 4.3.10 can be a real bugger to fix).

    Copy & paste the code below to embed this comment.
  12. Well written—what a relevant topic!

    I can’t tell you how many times I’ve had the sinking feeling of version OUT-OF-control. Sadly, it was usually because I opted not to use a perfectly usable system that was already in place. Part of my battle with version control is _controlling the developer_ (in this case, myself) and getting them comfortable with checkin/checkout as part of their normal work flow.

    Copy & paste the code below to embed this comment.
  13. 试一试中文是�显示无误:) wanderful!!!

    Copy & paste the code below to embed this comment.
  14. Subversion lets you create hooks on various actions including post-commit. Using that, it’s fairly trivial (for someone with reasonable perl or shell ability) to automatically update your website each time you ‘tag’ a release, and update a staging website each time you commit.

    Running your website as a checked-out repository might not be a good idea due to the svn cruft lying around (make sure your setup doesn’t allow viewing of ‘hidden’ files and directories)

    Copy & paste the code below to embed this comment.
  15. While I’m here, let me say that the headline was a poor editor decision: the article is abour revision control, not buttons.

    Back in April Slashdot talked about the way “headlines have changed”:http://slashdot.org/article.pl?sid=06/04/09/035205 from being ‘sensational’ to being descriptive: online we’re hit by so much information you need to put some info in the headline to grab our attention rather than just making it ‘loud’.

    In this case, figuring ALA knew this, I guessed this was an article about buttons. Oh well .. great article anyway :-)

    Copy & paste the code below to embed this comment.
  16. I totally agree to Rene that working with some kind of version control system should be in the university schedule of computer science students. I (as an employer) often find young applicants for my job positions never ever have worked in a team and they don’t even know what version control is good for. I really get a headache if I see them working on their local drive with no backup at all. I used to work in some 100+ people projects so I know the need of version control. But even if you have a version control system installed developers will need to use it in a proper way. For example if you move files to another directory some copy the files and delete the old ones. So all the history is gone (ok, it’s still there, but difficult to compare).

    Copy & paste the code below to embed this comment.
  17. @Edwards: subversion has a WebDAV interface, which make it comfortable to use with Dreamweaver.
    Dreamweaver sees the repos as usual with FTP.
    Every ‘upload’ will generate a commit. You lost the possibility to make custom commit messages, but I think it’s still an interesting use because it integrates itself smoothly in your workflow.

    It would be great if Adobe will integrate Dw with svn, i.e. using Design Notes as commit.messages

    Copy & paste the code below to embed this comment.
  18. I am as loyal a fan of subversion as you’ll find, but in my office, we frequently run into the same version-control wall.

    Our graphic designers, who also need to do a bit of template editing, are not command-line saavy in the least, and they work exclusively on OS X. Our developers all use TortioseSVN on windows (or the command line on the Mac) to access our repository, but the designers - ha! fuggedaboudit.

    So we’ve tried to find a GUI client they can use. I’ve checked out svnx, smartsvn, scplugin, and others, and all of them suffer from the same problem: when initially checking out a branch from the repository over the network, at some point during the checkout (not always in the same place) they will hang and we’ll be stuck with a spinning beach ball interminably.

    Apart from apache integration, is there a working GUI for our Mac-only designers?

    Copy & paste the code below to embed this comment.
  19. I’m a relatively new user of SVN, and my favorite way to use it in Windows is Tortoise (mentioned already), which integrates SVN into the Windows GUI with contextual menus, etc.

    Alas, there is nothing quite as good as Tortoise for OSX, but “SCPlugin”:http://scplugin.tigris.org/ comes pretty close. Finder integration, file status badging, etc. It doesn’t support every feature, but includes most that you will use on a daily basis.

    Also, I wanted to note that “BBEdit”:http://www.barebones.com/products/bbedit/ has fantastic SVN support.

    Copy & paste the code below to embed this comment.
  20. Danny, looks like we were posting about this at the same time. Just wanted to add that with SCPlugin, I have not had hangups during checkout.

    Copy & paste the code below to embed this comment.
  21. I did that once, on a UNIX server at work, with an unlabled blue button. I didn’t even press it, just touched it.


    It was the reset button. Oops.

    Copy & paste the code below to embed this comment.
  22. I did that once, on a UNIX server at work, with an unlabled blue button. I didn’t even press it, just touched it.

    It was the reset button. Oops.

    Copy & paste the code below to embed this comment.
  23. I was dissapointed you didn’t mention any of the other version control options out there. Like CVS with it’s excellent “TortoiseCVS”:http://www.tortoisecvs.org/ windows explorer plugin, or “Perforce”:http://www.perforce.com/index.html which is the system we use at my office.

    I’m sure it wasn’t intended, but you did make it sound like Subversion was the only options out there.

    Copy & paste the code below to embed this comment.
  24. wrong title in the above post.

    Copy & paste the code below to embed this comment.
  25. Mike,

    Thanks for the great article.

    Any ideas on using subversion as the storage layer of a wiki like TWiki? For example, TWiki uses RCS. But RCS is the predecessor of CVS, and CVS the predecessor of subversion.

    I’m thinking of using Kupu as a WYSIWYG html editor and PHP or (if I must learn it) Python to hook into Subversion. Hence, a modern wiki for our documentation.

    Copy & paste the code below to embed this comment.
  26. Hey there, just wanted to add that there is a small typo in the article. The software is called “tortoise”, not “tortise” ;) Excellent article btw, as always!

    Copy & paste the code below to embed this comment.
  27. For GUI clients, I have been using SvnX, which is ok. It does what I need it to do, but as Danny mentions is still not very good for someone who doesn’t like the command line. The designer I work with doesn’t know where to start.

    Has anyone tried the plugin for Quicksilver? I just activated it, but it seems quite promising.

    Copy & paste the code below to embed this comment.
  28. I tried SVN (+ TortoiseSVN) twice, and it just didn’t do it for me.  It’s not that it didn’t have enough features, it’s almost like it had too many features.

    I expected something easier.  I want something that sits in the background and perhaps records the state of my sauce code at given intervals (seconds, minutes, hours, maybe even keystrokes, I don’t know), and all this gets stored in a nice database that keeps track of the changes for me and allows me to restore them.  Ideally this would be automated and I wouldn’t have to give an order to save my work.  As a single developer this is all I need; to go back in time.

    SVN proved to be too much for me.  I found that I could just as easily copy/paste my source code files to a directory every once in a while and save it.  Maybe if I ever work with somebody this will change.

    Copy & paste the code below to embed this comment.
  29. If you happen to be on BSD or linux and have in fact deleted a file very recently, there might still be a chance to get it back.  I faced this once before, and wrote up my experience here:
    http://bluesmoon.blogspot.com/2004/08/undelete-in-freebsd.html

    Hope it helps others.

    Copy & paste the code below to embed this comment.
  30. I Just Like SVN… Iam using SVN in eclipse with sublipse plugin and it’s so simple just a click away…

    Copy & paste the code below to embed this comment.
  31. I use SVN on Dreamhost account to keep files away in case of hdd crash or something and to be able to connect and work in many locations. I’m the only editor of those files, but it’s great to move back in time to restore a piece of code I was sure won’t be necessary any more. The Subclipse plugin for Eclipse makes it very easy.
    At work we use CVS for teamwork synchronization and it does good job as well. It makes life easier, but doesn’t solve the human factor. Everyone in the team has to commit every change as soon as it’s done, not “when I’ll finish the changes I’m going to do tomorrow”

    Copy & paste the code below to embed this comment.
  32. No matter what form of version control one uses, you are only halfway there unless you have a decent hierarchical storage/backup system. I spent a goodly portion of my IT career in storage mangement, and in some cases had to recover DB instances for our version control software to a previous date (ok, we recovered it to a shadow system, extracted what was needed, and updated the online VCS, with the data needed)
    Of course you may not have the luxury of a large disk farm with HSM software and a robotic tape library, but reasonable solutions can be implemented at even the single server level.
    Disk and tape are cheap, when compared to the man-hour cost of lost time.
      That’s my take on it (yes, I’m an operations/hardware kind of guy, well..was, retired this year after 33 years in IT)
    Cheers
    Harold

    Copy & paste the code below to embed this comment.
  33. Two months ago, I would just skip this article, labeling it “too techie”.  But then, some of my co-workers started talking about Subversion, and last week we started using it. And yes, it’s great! Whenever those programming bastards mess up my CSS, I can point right to the guilty one and give him a good ol’ spanking!

    Copy & paste the code below to embed this comment.
  34. If you spend a lot of time on a laptop without Internet access—even if you just take the train to work every morning—“svk”:http://svk.elixus.org/ can be very handy.  It’s a program that interfaces with a Subversion repository, but it mirrors all the history on your own disk, allowing you to check changes into your local repository even when you don’t have Internet access (like when you’re traveling).  You can later synchronize with the central copy of the repository.  Since you have all the history with you, you can do all the neat back-in-time stuff you’d normally need access to the server to do.  And it lets you keep long projects in local branches that nobody else can screw up.  Very useful all around.

    Copy & paste the code below to embed this comment.
  35. If you spend a lot of time on a laptop without Internet access—even if you just take the train to work every morning—“svk”:http://svk.elixus.org/ can be very handy.  It’s a program that interfaces with a Subversion repository, but it mirrors all the history on your own disk, allowing you to check changes into your local repository even when you don’t have Internet access (like when you’re traveling).  You can later synchronize with the central copy of the repository.  Since you have all the history with you, you can do all the neat back-in-time stuff you’d normally need access to the server to do.  And it lets you keep long projects in local branches that nobody else can screw up.  Very useful all around.

    Copy & paste the code below to embed this comment.
  36. Great article. And you’re right to choose Subversion since it is definately one of the best things since sliced bread.

    Even tagging and branching are easy - for Luke Bussey above, just create two small scripts which give you the command lines to branch from the trunk and tag on the branch. Consistency is the key.

    Copy & paste the code below to embed this comment.
  37. Your site is very useful

    Copy & paste the code below to embed this comment.
  38. Sorry, commenting is closed on this article.