DevelopmentNow Blog
 Thursday, April 10, 2008

We don't branch or tag super often, usually just on major releases, experimental code, or not-yet-ready code. But sometimes you'll have changes in a branch that you want to merge back into the main development trunk.

So assume your project's trunk is at myproject/trunk.  You then create a branch for a major release in myproject/branches/1.0-release. After a few weeks, you have to fix a bug in the 1.0-release version of your project, so you make the changes to the /myproject/branches/1.0-release branch. Then you build, test, & deploy that fixed version to production or whatever.

But now you want to merge that fix into your trunk. The main thing to remember is that the only changes you want to merge are the ones you made after the branch was created. You don't want to merge the entire branch into the trunk, otherwise you'll end up merging old code (from the branch) into the trunk, too.

BTW you might ask why I use "branches" instead of "tags" in the above example. That's because tags and branches are the same as far as SVN is concerned, and the main difference is that a "tag" is supposed to be a "snapshot" of your code that you don't make changes to (i.e. a static archive), while a "branch" is a version of the code that people might change. Since there's always a chance that we'll need to make changes to a major release (without accidentally including any not-yet-ready trunk changes), all our major releases are branches, not tags.

Ok so enough of all that. Below are some links on this topic that I suggest you read.

  1. SVN Book Chapter 4. It's a quick read, explains the principles, and shows the commands. You can skip through some of the beginning if you already know about branching, but sections "Copying Changes Between Branches" and "Common Use Cases for Merging" have good overviews on merging changes and branches. I'd suggest first reading the explanations and skipping the actual commands, so you know what's going on from a high-level.
  2. SVN Branch Merging from Michael Sepcot. Nice easy SVN commands to follow, now that you understand what's going on. If you're using Subversion from a command line, that is.
  3. How to Merge using Tortoise SVN. If you're a Windows developer, you're probably using TortoiseSVN. This guide explains how to perform the merge. Remember that the changes are merged into your local copy, so you can confirm they're ok and then commit them into SVN.

Happy merging!

April 10, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [1]



 Tuesday, April 08, 2008

Portland Open Beer Club (a spinoff of the Open Coffee Club) is meeting this Thursday 5pm at Bailey’s Taproom, 213 SW Broadway, Portland, OR. It’s an informal meetup where entrepreneurs, developers and investors can chat, network and grow. Very laid back, no agenda, stay as little or as long as you want.

 

Portland Open Beer Club is different from Open Coffee Club in that it's

·         Beer instead of coffee

·         At 5pm instead or 10am

·         usually attended by more people J

Hope to see you there! If you've never met me before, I'm the tall blond guy in the orange jacket.

April 8, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]



 Monday, April 07, 2008

The easiest way I've found involves two steps:

Adjust SSMS Settings

  1. Go to Tools->Options
  2. Query Results->SQL Server->Results to Grid
  3. Check "Include column headers when copying or saving results"
  4. Click OK.
  5. Note that the new settings won't affect any existing Query tabs -- you'll need to open new ones and/or restart SSMS.

Now next time you run a query, do this

  1. Make sure the results are displayed in a grid (CTRL+D or Query->Results To->Results to Grid)
  2. Right click in the grid, and click Select All
  3. Right click in the grid again & click Copy
  4. Open up a new Excel spreadsheet, and paste the data in
  5. Do a global search & replace, replacing "NULL" with an empty string.

Voila!

I had tried before with SSMS's export to CSV feature, and it just didn't escape data the way I needed it to.

April 7, 2008    Bookmark to Digg or other social bookmarking
#    Disclaimer  |  Comments [0]