<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Marius van Witzenburg &#187; Upgrading</title>
	<atom:link href="http://kitara.nl/tag/upgrading/feed/" rel="self" type="application/rss+xml" />
	<link>http://kitara.nl</link>
	<description>We fight for our survival, we fight!</description>
	<lastBuildDate>Sun, 20 May 2012 15:39:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to create a patch to update one of your projects its external vendor code.</title>
		<link>http://kitara.nl/2010/04/13/how-to-create-a-patch-to-update-one-of-your-projects-its-external-vendor-code/</link>
		<comments>http://kitara.nl/2010/04/13/how-to-create-a-patch-to-update-one-of-your-projects-its-external-vendor-code/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 10:31:50 +0000</pubDate>
		<dc:creator>mariusvw</dc:creator>
				<category><![CDATA[BSD / Linux / Unix]]></category>
		<category><![CDATA[How to]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[CakePHP]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Diff]]></category>
		<category><![CDATA[Patch]]></category>
		<category><![CDATA[Update]]></category>
		<category><![CDATA[Upgrading]]></category>
		<category><![CDATA[Vendor]]></category>

		<guid isPermaLink="false">http://mariusvw.com/?p=1627</guid>
		<description><![CDATA[I use this way to upgrade projects such as DokuWiki and CakePHP. The advantage of this method is you will keep modifications you have made in the code of that vendor. In my description I use FreeBSD and Mac OS X so you might need to adjust the commands for a different Operating System. Create [...]]]></description>
			<content:encoded><![CDATA[<p>I use this way to upgrade projects such as DokuWiki and CakePHP.</p>
<p>The advantage of this method is you will keep modifications you have made in the code of that vendor.<br />
In my description I use FreeBSD and Mac OS X so you might need to adjust the commands for a different Operating System.</p>
<p><strong>Create the patch file</strong></p>
<p>First download the old and the new version code from your vendor site. In this example this is the website of CakePHP.<br />
You need this that you can match the old version to the new version you want to upgrade to.</p>
<p>Create a temp directory to work in.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">mkdir myUpgrade
cd myUpgrade</pre></div></div>

<p>Download the two versions of CakePHP, your current and the version you desire to upgrade to</p>
<ul>
<li>http://github.com/cakephp/cakephp1x/tarball/1.3.0-RC3</li>
<li>http://github.com/cakephp/cakephp1x/tarball/1.3.0-RC4</li>
</ul>
<p>Unpack tarballs:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">tar -xzvf cakephp-cakephp1x-348e5f0.tar.gz
tar -xzvf cakephp-cakephp1x-f63ab48.tar.gz</pre></div></div>

<p>Now create the aptch width using the diff utility:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">diff -Naur -x '.svn' -x '._*' cakephp-cakephp1x-348e5f0 cakephp-cakephp1x-f63ab48 &gt; cakephp.diff</pre></div></div>

<p><strong>Applying the patch</strong></p>
<p>To apply the patch file you created in the previous step, change into your real vendor directory and run the patch tool.<br />
You may first want to do a test run to see if any conflicts may happen and what files are affected:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">cd myUpgrade
patch -E -p1 &lt; ../cakephp.diff --dry-run</pre></div></div>

<p>The output should be something like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">patching file cake/VERSION.txt
patching file cake/basics.php
patching file cake/config/config.php
*etc*</pre></div></div>

<p>When you're happy, apply the patch:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">patch -E -p1 &lt; ../cakephp.diff</pre></div></div>

<p>Once patch is applied you're done <img src='http://kitara.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kitara.nl/2010/04/13/how-to-create-a-patch-to-update-one-of-your-projects-its-external-vendor-code/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

