The Artima Developer Community
Sponsored Link

Ruby Buzz Forum
Automatically merge changes from branch to trunk

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Paul Gross

Posts: 152
Nickname: pgross
Registered: Sep, 2007

Paul Gross is a software developer for ThoughtWorks.
Automatically merge changes from branch to trunk Posted: Oct 15, 2007 9:28 PM
Reply to this message Reply

This post originated from an RSS feed registered with Ruby Buzz by Paul Gross.
Original Post: Automatically merge changes from branch to trunk
Feed Title: Paul Gross's Blog - Home
Feed URL: http://feeds.feedburner.com/pgrs
Feed Description: Posts mainly about ruby on rails.
Latest Ruby Buzz Posts
Latest Ruby Buzz Posts by Paul Gross
Latest Posts From Paul Gross's Blog - Home

Advertisement

On my current project, we release code often. As a result, we usually have at least one active branch along with the trunk. When bugs arise in production, we fix them in the branch and then merge them into the trunk. This constant merging was becoming a pain, so we automated it with a rake task that looks like:


desc 'merge changes from branch to trunk'
task :'svn:merge_to_trunk' do
  if %x[svn info].include? "branches" 
    puts "Merging changes into trunk.  Don't forget to check these in." 
    system "svn diff | patch -p0 -d /path/to/truck/checkout" 
  end
end

This task first checks to see if we are on the branch. If our checkout is from the trunk, it does nothing. Then, it does a “svn diff” and pipes that into patch, which applies the diff to the local working copy for the trunk.

We added this task as a dependency on our commit task, which we run in order to check in (see Ruby: rake commit). Once we check into the branch, we switch over to the trunk working copy and run “rake commit” again to check in the changes.

Read: Automatically merge changes from branch to trunk

Topic: Changes in Ruby 1.9, Oct. 07 update Previous Topic   Next Topic Topic: Don't you feel like this sometimes too?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use