June 2008 Blog Posts
Amazon.com Offline?

imageWow, this is big.  I just tried going to amazon.com to find an HTTP 1.1 Service Unavailable.






UPDATE: Just came across a CNET article:


"How to" SVN Merge with TortoiseSVN

image Ok, I have the hardest time remembering the "FROM" and "TO" semantics when merging in SVN.  So, here's a quick and dirty summary on merging in TSVN.

Suppose, you have a branch feature that you'd like to merge back into the trunk.

If there have been no changes to the trunk since you've been working on your branch, you can simply follow the steps below to merge your branch to trunk (branch -> trunk).

However, if there have been changes to the trunk while you've been working on your branch, then you should:

  1. First, merge trunk to branch (trunk->branch) to update your branch with the latest trunk changes.
  2. Then merge your new features from branch to trunk (branch->trunk).

Merge branch to trunk (branch->trunk)

  1. Commit all code in your working directory.
  2. Switch your working directory to the trunk:

    image image

  3. Next, Merge...

  4. In the merge window, we need to make sure we are going "FROM" the trunk "TO" our branch.  The reasoning behind this is that we are doing a DIFF between the trunk and the branch.  Or, starting "FROM" the trunk's current state "TO" our branch's state.  The trunk is the starting point for the branch changes.

  5. Now that the diff has been calculated, the results are stored in your working directory. You'll need to commit these results into  the /trunk to finalize the merge. 




Merge trunk to branch (trunk->branch)

  1. Commit all code in your working directory.
  2. Make sure that your current working directory is your branch.
  3. Next, Merge...

  4. The "FROM" text box should be the URL to the /trunk.  Why isn't it the URL to the branch?  Well, your branch doesn't have the changes that you're looking for in /trunk because we're trying to update our branch with changes in the trunk.  Effectively, what we want to do is perform a DIFF between the last time your branch was synchronized with the trunk and the head version of the trunk with the latest changes.  This is why "FROM" URL is set to /trunk and the revision number is set and the "Use 'FROM' URL" is set with "HEAD" revision.

    In my case below r25 was the last time the base of my branch was synchronized with the trunk.  I want to "REPLAY"/"DIFF" all changes that happened from the time my last branch (r25) was synchronized with the base of the "/trunk" up "TO" the current "HEAD reversion".  The result of this merge should be stored in my current working directory (which points to my /branch/cowboy).

  5. Once the merge happens, you're branch should now be synchronized with the /trunk.  You'll want to "Commit" the result of the diff and add a special note in the message that indicates what revision you're working copy is based on.

Hope that helps!

Brian Chavez


PS: Here are some other useful links on merging with SVN: