Capistano - before_update_code issue

I’m using the before_code_update task to write the diff between the
currently deployed code to the one in the repository to a file for
future use - however I’ve noticed that when the before_update_code is
included in config/deploy.rb - the deployment script symlinks to the
previous release versus the new one checked out - am I overriding
something with the custom before_update_code? It uses the same code
that’s in diff_from_last_deploy task, except writing to file versus
screen. Any other ways to write the diff to file during just a call
to “rake deploy”?

task :before_update_code, :roles => [:app] do
diff = source.diff(self)
File.open(‘deploy.diff’,‘w’) do |f|
f.write(diff)
end
end