I’ve always wanted to know how to do this, and for some reason I always had a hard time finding out how. I needed to rollback a change I had committed to my SVN repository.
The way you rollback to an earlier version of your repository is to do a reverse merge.
Here’s the example off the SVN site. It will do a reverse merge, and roll back the commit you made in version 303.
tips
- Barebones list for the things you should be looking for when developing a web app in PHP. Some of it applies to all web apps, not just PHP. Use HTML_Safe (or a similar javascript stripping library) to check for and remove javascript when you’re accepting data that will be output to a page. Check every get and post variable for validity. Every web site has url like “dosomething.php?id=3”. Make sure that id you’re accepting is actually a number (or whatever type you’re allowing).
- I saw a post on digg.com about how it’s nice to have “pretty urls” that are easy to tell people. While i’m not sure anyone would remember rustyrazorblade.com slash some ridiculous post name, it’s nice to have for search engines. Unfortunately, it didn’t really go into detail about how to accomplish the urls. A lot of people suggested mod_rewrite. Yes, it’s something you can use, but kind of a pain to set up.
- Maybe not breaking news, but I think it’s interesting enough of a point, and I didn’t really find anything about the topic when I googled it. If you do any addition, subtraction, multiplication, or division (and probably a lot more mathematical functions for that matter) and NULL is one of your values, the entire expression will evaluate to NULL. For example, this statement returns NULL: mysql> select 4 + NULL; +----------+ | 4 + NULL | +----------+ | NULL | +----------+ Normally you wouldn’t do the above in such a simple way, for instance, you might do some addition in a subquery.
- I noticed after installing PHP 5.1.4 on my brand new MacBook Pro that my scripts weren’t executing. After about 3 hours of messing around, I realized that short_open_tag was turned off in php.ini. Location: /usr/local/php5/lib/php.ini Should be: short_open_tag = On Not sure if this is a common issue, or if the PHP defaults have been changed. I installed the package distributed by Marc Liyanage, found at his homepage. _Edit: According to the php web site, this should be on by default.