Sometimes you just need to admit that you’ve loused things up and you want to go back to the way you had them last Thursday. It takes courage to throw in the towel, but it also takes a reasonable understanding of how to do it quickly with your tool. Here’s the simple procedure I follow when I want my
trunk restored to a previous version.
First, I have my repository laid out like this:
-1. Know which revision of trunk you want to restore. If you don’t, then this is all a worthless waste of time.
Also, make sure to talk to your team. You don’t want anyone trying to commit or update from trunk between steps 1 and 3. Also, they may have objections to your choice in step -1.
Backup you work in the
/tags/archive area. I use this area for snapshots of my project that I want to name, and don’t want to see very often (I want to see project releases occasionally, so they just go in
/tags). Make sure you choose a good name (
good-name in the url below) for your archive tag.
svn cp http://url/for/my/trunk http://url/for/my/tags/archive/good-name -m "Save my messed up work."
1. Delete your trunk. Now we could have simply used `mv` instead of `cp` in our last command, but we’re paranoid and want to make sure that everything worked first.
svn rm http://url/for/my/trunk -m "Start over on trunk."
1. Restore the version of trunk that you want to use. In this example, we’re using revision 437 as the source of our new trunk.
svn cp -r 437 http://url/for/my/trunk http://url/for/my/trunk -m "Restore trunk to previous version."
There you have it, kids. Happy restoration.
It’s all over the news today. Steve Jobs announced that there won’t be an SDK for the iPhone — just use Safari. Oh, and you Windows developers can use Safari for Windows to test out your iPhone apps. (BTW — I really love the “resizable text areas” in the new Safari 3 beta. It makes working in the web much nicer when you don’t have to be cramped in a tiny box!)
This seems like an interesting confluence of releases to try to gain further inroads in the market: release a killer OS upgrade (all for just $129), release a revolutionary phone, and then make sure developers everywhere can test that their webapps will work with it by pushing your browser to that other OS.
We’ll have to see if these connections play out the way it seems, but I’m very excited about the announcements today from Apple. I, for one, am planning an app with some iPhone integration so I’m interested to see how the development goes.
I’ve been using Safari 3 for Mac OS X for a couple hours, and while things seem generally nice so far (I love the expandable text areas, and it really is a very fast browser), it’s definitely a beta. I ran into a few odd screens, while trying to learn the shortcuts. Like this one:
You can get this screen by hitting
Cmd + . Now this screen seems to tell me that I can test how quickly a page loads, and also profile the memory used. I type in my URL and hit the right arrow button, just below “Start”, then hit the “Start” button.
When I do so, I get this message telling me about a memory leak:
Now, I don’t really think I found a memory leak. I just think I don’t know how to run the test tool, the message is funny, and I think they probably forgot to yank it from the public beta.
In general, I’m stoked about fiddling with a new version of Safari. I started playing with browsers other than Firefox over a month ago.
A few behavioral oddities I’ve noticed include strange rendering of Google Analytics, and this conundrum where my resized text area “drag handle” ended up in a place that’s now unselectable — I can’t drag my text area to be smaller now.
I’m not worried though; they’ll fix it. But it sure is fun to play with beta software!
I setup a Campfire account for my RailsConf 2007 visit. Guest access is on, so come on over. It’s a
free basic account now, but if more people come I’ll try to upgrade it as needed (if it gets big I’ll post a donation link). So come on by and chat.
May 17 Morning Tutorials
Test Driven Development