<?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>zeroasterisk &#187; development</title>
	<atom:link href="http://zeroasterisk.com/cats/geek/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://zeroasterisk.com</link>
	<description>zeroasterisk blog - alan blount &#38; friends</description>
	<lastBuildDate>Fri, 23 Jul 2010 17:56:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>I&#8217;m Just Git&#8217;ting It</title>
		<link>http://zeroasterisk.com/2010/05/07/im-just-gitting-it/</link>
		<comments>http://zeroasterisk.com/2010/05/07/im-just-gitting-it/#comments</comments>
		<pubDate>Fri, 07 May 2010 22:13:20 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/?p=385</guid>
		<description><![CDATA[Everyone and their mom have been using Git and GitHub for a while, but I&#8217;m just breaking down and using it&#8230; I have been slow to adopt because SVN worked for me fine (until I had to merge branches) and I don&#8217;t like to pay for storage space.  But I continue to be impressed by [...]]]></description>
			<content:encoded><![CDATA[<p>Everyone and their mom have been using Git and GitHub for a while, but I&#8217;m just breaking down and using it&#8230; I have been slow to adopt because SVN worked for me fine (until I had to merge branches) and I don&#8217;t like to pay for storage space.  But I continue to be impressed by it&#8217;s functionality and ease of use, so I&#8217;m going to move our work repositories over (needing a Large account probably) but I think it will be worth it.</p>
<p><a href="http://github.com/zeroasterisk/">http://github.com/zeroasterisk/</a></p>
<p><map name='google_ad_map_385_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/385?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_385_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=385&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2010%2F05%2F07%2Fim-just-gitting-it%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2010/05/07/im-just-gitting-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cakephp Beforesave() Gotcha: Need To Set $this-&gt;__exists To True If Setting A Primary Key</title>
		<link>http://zeroasterisk.com/2010/02/18/cakephp-beforesave-gotcha-this-__exists/</link>
		<comments>http://zeroasterisk.com/2010/02/18/cakephp-beforesave-gotcha-this-__exists/#comments</comments>
		<pubDate>Fri, 19 Feb 2010 02:59:45 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[development]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[beforeSave]]></category>
		<category><![CDATA[cake]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/?p=380</guid>
		<description><![CDATA[if you add a primary key which would turn an "insert" into an "update" within beforeSave() you'll need to set $this->__exists = true;... the call to $this->exists(); happens in model.php before the callback to beforeSave().]]></description>
			<content:encoded><![CDATA[<p>I added an update to <a href="http://book.cakephp.org/view/76/Callback-Methods">CakePHP Book: beforeSave()</a></p>
<blockquote><p>Also, if you add a primary key which would turn an &#8220;insert&#8221; into an &#8220;update&#8221; within beforeSave() you&#8217;ll need to set <code>$this-&gt;__exists = true;</code>&#8230; the call to <a href="http://api12.cakephp.org/view_source/model/#line-1159">$this-&gt;exists();</a> happens in model.php before the callback to <a href="http://api12.cakephp.org/view_source/model/#line-1191">beforeSave()</a>.</p>
<pre>function beforeSave() {
	if (!isset($this-&gt;data[$this-&gt;name['id') &amp;&amp; isset($this-&gt;data[$this-&gt;name['unique_field')) {
		$found = $this-&gt;find("first",array(
				"recursive" =&gt; -1,
				"fields" =&gt; array("id"),
				"conditions" =&gt; array("unique_field" =&gt; $this-&gt;data[$this-&gt;name['unique_field')));
		if (!empty($found) &amp;&amp; isset($found[$this-&gt;name['id')) {
			$this-&gt;id = $this-&gt;data[$this-&gt;name['id' = $found[$this-&gt;name['id';
			<strong>$this-&gt;__exists = true;</strong>
		}
	}
	return parent::beforeSave();
}</pre>
</blockquote>
<p>That&#8217;s been confusing me a bit recently &#8211; setting the ID of a row within beforesave() should change the save to an update, but it was trying to insert with a specified ID and thus, failing&#8230; glad to have a simple solution that makes sense&#8230; hope that helps someone else&#8230;</p>
<p><map name='google_ad_map_380_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/380?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_380_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=380&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2010%2F02%2F18%2Fcakephp-beforesave-gotcha-this-__exists%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2010/02/18/cakephp-beforesave-gotcha-this-__exists/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mysql Master/slave Replication Monitoring Php Script</title>
		<link>http://zeroasterisk.com/2010/01/13/mysql-masterslave-replication-monitoring-php-script/</link>
		<comments>http://zeroasterisk.com/2010/01/13/mysql-masterslave-replication-monitoring-php-script/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 18:47:25 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[cron]]></category>
		<category><![CDATA[heal]]></category>
		<category><![CDATA[master]]></category>
		<category><![CDATA[monitor]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[replication]]></category>
		<category><![CDATA[slave]]></category>
		<category><![CDATA[test]]></category>
		<category><![CDATA[test heal]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/?p=372</guid>
		<description><![CDATA[I&#8217;m a bit proud of myself on this one&#8230; I setup a simple, but clean and configurable, MySQL Master/Slave Replication Monitoring PHP Script:
http://code.google.com/p/php-mysql-master-slave-replication-monitor/ (docs)
It&#8217;s Open Source and free, I welcome comments, suggestions, and questions.
I think this will be quite useful for anyone who is setting up a pair of MySQL servers as master/slave and want [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m a bit proud of myself on this one&#8230; I setup a simple, but clean and configurable, MySQL Master/Slave Replication Monitoring PHP Script:</p>
<p><a href="http://code.google.com/p/php-mysql-master-slave-replication-monitor/">http://code.google.com/p/php-mysql-master-slave-replication-monitor/</a> (<a href="http://code.google.com/p/php-mysql-master-slave-replication-monitor/wiki/InstallationAndStandardUseCase?ts=1263408552&amp;updated=InstallationAndStandardUseCase">docs</a>)</p>
<p>It&#8217;s Open Source and free, I welcome comments, suggestions, and questions.</p>
<p>I think this will be quite useful for anyone who is setting up a pair of MySQL servers as master/slave and want to be sure their replication works as it should.</p>
<div class="zemanta-pixie" style="margin-top: 10px; height: 15px;"><img class="zemanta-pixie-img" style="border: none; float: right;" src="http://img.zemanta.com/pixy.gif?x-id=8482efd1-104c-4f20-81c2-92d20e4dac36" alt="" /><span class="zem-script more-related more-info pretty-attribution"><script src="http://static.zemanta.com/readside/loader.js" type="text/javascript"></script></span></div>
<p><map name='google_ad_map_372_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/372?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_372_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=372&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2010%2F01%2F13%2Fmysql-masterslave-replication-monitoring-php-script%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2010/01/13/mysql-masterslave-replication-monitoring-php-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Darkauth For The Win!</title>
		<link>http://zeroasterisk.com/2009/12/02/darkauth-for-the-win/</link>
		<comments>http://zeroasterisk.com/2009/12/02/darkauth-for-the-win/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 16:37:33 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[cakephp]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/?p=367</guid>
		<description><![CDATA[I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the Auth and ACL core components.
I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been working with CakePHP for a few years now and am very happy with it.  I&#8217;ve been working with the 1.2 version for a few months (since it went stable) and playing with the <a href="http://book.cakephp.org/view/172/Authentication">Auth</a> and <a href="http://book.cakephp.org/view/171/Access-Control-Lists">ACL</a> core components.</p>
<p>I&#8217;ve decided that ACL is too complicated for most setups, and Auth is fine, but not perfect.  So after some research, I switched to the <a href="http://bakery.cakephp.org/articles/view/darkauth-v1-3-an-auth-component">DarkAuth</a> component, which was much better suited to my needs.</p>
<p>The main reasons I prefer it are:</p>
<ul>
<li><span style="background-color: #ffffff; ">Role/Group based access out of the box, which is how I ususally provision security anyway</span></li>
<li><span style="background-color: #ffffff; ">Easy to customize/tweak to suit my needs (more below)</span></li>
<li><span style="background-color: #ffffff; ">Easy to setup permissions, easy to add to app_controller, without then having to explicitly allow public controllers/actions&#8230; instead I have to explicitly restrict controllers or actions.  Also it&#8217;s easy to check for prefixes and restrict based on that (more below)</span></li>
<li><span style="background-color: #ffffff; ">Fast</span></li>
</ul>
<p>So here are some of my customizations:</p>
<p>I like having some parameters set on the controller for easy access to &#8220;who is logged in&#8221;, so I put this in the bottom of the DarkAuth startup() function:<br />
<code><br />
//finally give the view access to the data<br />
$this-&gt;controller-&gt;user = $this-&gt;getAllUserInfo();<br />
$this-&gt;controller-&gt;set('_DarkAuth',$this-&gt;controller-&gt;user);<br />
$this-&gt;controller-&gt;isadmin = $this-&gt; isAllowed("admin");<br />
$this-&gt;controller-&gt;isloggedin = $this-&gt;isAllowed();<br />
</code></p>
<p>I like using the core security class for password hashing, which can easily be done like so:<br />
<code><br />
	var $securityImported = false;<br />
	function hasher($plain_text){<br />
		//$hashed = md5('dark'.$plain_text.'cake');<br />
		if (!$this->securityImported) {<br />
			App::import('Core','Security');<br />
			$this->securityImported = true;<br />
		}<br />
		return Security::hash($plain_text, null, true);<br />
	}<br />
</code></p>
<p>Here&#8217;s how to inject admin requirements based on the admin routing path (prefix):</p>
<p><code><br />
		if (isset($this->params["prefix") &#038;&#038; $this->params["prefix"=='admin') {<br />
			$this->_DarkAuth = array('required' => array("admin"));<br />
		}<br />
</code></p>
<p>And some other useful controller tricks:</p>
<p><code><br />
	/**<br />
	* assigns the DarkAuth profile of a different member account, as if you had logged in as them<br />
	* also backs up your current DarkAuth profile so you can later "depersonate"<br />
	*/<br />
	function admin_impersonate($id) {<br />
		$this->Session->write('AdminDepersonate',array_intersect_key($this->user['Member',array('id'=>0,'username'=>0)));<br />
		$this->DarkAuth->authenticate('Auth',$this->Member->read(null,$id));<br />
		return $this->redirect("/members/home");<br />
	}<br />
</code></p>
<p><map name='google_ad_map_367_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/367?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_367_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=367&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2009%2F12%2F02%2Fdarkauth-for-the-win%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2009/12/02/darkauth-for-the-win/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>A Cakephp Gotcha For Migrating From 1.1 To 1.2+ On Model-&gt;create()</title>
		<link>http://zeroasterisk.com/2009/11/30/a-cakephp-gotcha-for-migrating-from-1-1-to-1-2-on-model-create/</link>
		<comments>http://zeroasterisk.com/2009/11/30/a-cakephp-gotcha-for-migrating-from-1-1-to-1-2-on-model-create/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 16:15:28 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[cakephp]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/?p=361</guid>
		<description><![CDATA[I noticed that the data for my saves were not populating with the current date/time as they should, when calling the model->create() function, without a parameter, and then the model->save() function.

$this->ModelName->create();
$data = $this->ModelName->save($dataWithoutCreatedModifiedUpdated);
$data['ModelName']['created']=="0000-00-00 00:00:00"]]></description>
			<content:encoded><![CDATA[<p>I reported this as a <a href="http://code.cakephp.org/tickets/view/143">ticket</a>, but as it turns out, it&#8217;s a design choice.. but it&#8217;s enough of a gotcha that I thought I should report it.</p>
<h4>What happened</h4>
<p>The $this->ModelName->create() set the defaults for the next save, which is what I would expect. But on my database there&#8217;s a default value set for the &#8216;created&#8217; field (the standard for datetime columns in PHPmyAdmin) as well as the &#8216;modified&#8217; and &#8216;updated&#8217; fields.<br />
So when the $this->ModelName->create() function ran, it populated the &#8216;created&#8217; and &#8216;updated&#8217; and &#8216;modified&#8217; fields based on their default values in MySQL; which is &#8220;0000-00-00 00:00:00&#8243;.<br />
Subsequently, when I ran $this->ModelName->save($dataWithoutCreated); the &#8216;created&#8217; and &#8216;updated&#8217; and &#8216;modified&#8217; fields were not defaulting to the current timestamp when they were not set by the $data passed into save&#8230; since they already had a &#8220;valid&#8221; value.</p>
<h4>The Solution</h4>
<p>Of course you can modify your model with a beforeSave() code to strip those off, but the &#8220;real&#8221; solution recommended by Mark Story is to change the default value of those fields in the database to NULL.  This is something that sounded foreign to me, since PHPMyAdmin defaults to &#8220;0000-00-00&#8243; for date/time fields, but it seems to work fine and I usually will defer to recommendations of the CakePHP core devs (and usually am happy I&#8217;ve done so).</p>
<p><map name='google_ad_map_361_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/361?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_361_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=361&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2009%2F11%2F30%2Fa-cakephp-gotcha-for-migrating-from-1-1-to-1-2-on-model-create%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2009/11/30/a-cakephp-gotcha-for-migrating-from-1-1-to-1-2-on-model-create/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Svn Merge, Making Sure A Branch Is Updated From Trunk, Then Merging Back To Trunk</title>
		<link>http://zeroasterisk.com/2009/03/05/svn-merge-making-sure-a-branch-is-updated-from-trunk-then-merging-back-to-trunk/</link>
		<comments>http://zeroasterisk.com/2009/03/05/svn-merge-making-sure-a-branch-is-updated-from-trunk-then-merging-back-to-trunk/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 17:49:34 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/blog/index.php/2009/03/05/svn-merge-making-sure-a-branch-is-updated-from-trunk-then-merging-back-to-trunk/</guid>
		<description><![CDATA[So I&#8217;ve just fought a battle w/ SVN merge and thought I&#8217;d post the solution in case others might find it&#8230;
Scenario
Our stable code is in trunk svn://svn.domain.tld/repository/trunk
I&#8217;ve got a branch of trunk svn://svn.domain.tld/repository/branches/dev
Changes have been made to my branch and changes have been made to trunk, since I branched.
I&#8217;m ready to merge my branch back [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve just fought a battle w/ SVN merge and thought I&#8217;d post the solution in case others might find it&#8230;</p>
<p><strong>Scenario</strong><br />
Our stable code is in trunk svn://svn.domain.tld/repository/trunk<br />
I&#8217;ve got a branch of trunk svn://svn.domain.tld/repository/branches/dev<br />
Changes have been made to my branch and changes have been made to trunk, since I branched.<br />
I&#8217;m ready to merge my branch back into trunk.</p>
<p><strong>Approach / Overview</strong><br />
Basically, to be safe, I need to first update my branch with the changes from trunk and resolve any conflicts.  Then test my branch and code again (since I will likely have resolved conflicts and thus made changes to my code).  Then finally, merge my updated branch into trunk.</p>
<p><strong>Step 1 &#8211; update/merge branch from trunk</strong><br />
<code># cd /path-to-my-working-copy-of-the-dev-branch<br />
# svn up<br />
# svn log -q --stop-on-copy</code><br />
if the last revision listed is something like r999, the branch was created at revision 999&#8230; take note of this number in your case.  Anytime you see me use &#8220;999&#8243; you&#8217;ll want to replace it with your own revision number.<br />
<code># svn merge --dry-run -r 999:HEAD svn://svn.domain.tld/repository/trunk</code><br />
review the results&#8230; conflicts will be prefaced with a C.  If you&#8217;ve got a long list, you can send the results of the dry-run to a text file and review the results there<br />
<code># svn merge --dry-run -r 999:HEAD svn://svn.domain.tld/repository/trunk &gt; ../merge-results.txt</code><br />
after being sure you want to do this, do the merge, updating the branch with changes from trunk<br />
<code># svn merge -r 999:HEAD svn://svn.domain.tld/repository/trunk</code><br />
SVN tries to automatically merge changed files as best it can.  As conflicts are found, it will prompt you, asking you how you want to handle them.  If you are sure your version in the branch is correct, you can use &#8220;mf&#8221; (mine full) to resolve this conflict&#8230; if you are sure the trunk version is correct, you can use &#8220;tf&#8221; (theirs full) to resolve this conflict.  More often than not, though, the differences will take manual looking at and sometimes manual editing.  You can use &#8220;df&#8221; or &#8220;e&#8221; to do so in the console, but I usually use &#8220;p&#8221; to postone conflict resolution, which creates some extra files and breaks the conflicted file till resolved.<br />
You&#8217;ll probably have several conflicts&#8230; that&#8217;s fine, postpone as much as you need to and we will clean them up when done.<br />
When done, lets get a list of conflicts<br />
<code># svn st | grep C</code><br />
For each of those files, you&#8217;re going to need to fix the conflict.  Open them in your favorite editor and look for a line starting with<br />
    <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt; .merge-right.r###</code> or something like that&#8230; that&#8217;s where one version starts, at a line starting with<br />
    <code>=======</code> is where that version ends and the next starts, and that one goes until the next<br />
    <code>&gt;&gt;&gt;&gt;&gt;&gt;&gt; .merge-right.r###</code>.<br />
You can also diff the other file-copies it will create with different suffixes&#8230;  Basically, your goal is to FIX the file in question, it doesn&#8217;t matter what you do with the other file-copies with different suffixes, because the next step will remove them automatically.<br />
<code># svn resolved ./path-to/file-in-conflict-state.ext</code><br />
Keep checking for conflicts, and resolving them manually (this is the tedious part)<br />
<code># svn st | grep C</code><br />
Once you get all of the conflicts resolved, just to be safe, check out the differences/status of the working copy<br />
<code># svn st</code><br />
Test your code<br />
If that looks correct and your code passes QA, lets commit the branch&#8230; finalizing our update/merge<br />
<code># svn ci -m "MERGED: updated ./branches/dev with the latest from ./trunk"</code></p>
<p><strong>Step 2 &#8211; update/merge trunk from branch</strong><br />
<code># cd /path-to-my-working-copy-of-the-trunk</code><br />
<code># svn up</code><br />
Remember the revision where we created our branch, from step one? Anytime you see me use &#8220;999&#8243; you&#8217;ll want to replace it with your own revision number.<br />
<code># svn merge --dry-run -r 999:HEAD svn://svn.domain.tld/repository/branches/dev</code><br />
<code># svn merge -r 999:HEAD svn://svn.domain.tld/repository/branches/dev</code><br />
<code># svn st | grep C</code><br />
Fix all of your conflicts.  Usually, you can use &#8220;tf&#8221; (theirs full) to accept the version from your branch to overwrite the version in your trunk&#8230; since you&#8217;ve just gone through the trouble of resolving conflicts on your branch&#8230; but if you&#8217;re not 100% sure, manually review them as discussed in step 1.<br />
Once you get all of the conflicts resolved, just to be safe, check out the differences/status of the working copy<br />
<code># svn st</code><br />
Test your code<br />
If that looks correct and your code passes QA, lets commit the trunk&#8230; finalizing our update/merge<br />
<code># svn ci -m "MERGED: updated ./trunk with the latest from ./branches/dev"</code></p>
<p>That&#8217;s it.</p>
<p>Easy right?</p>
<p>Not quite.</p>
<p>But, I firmly believe the benefits to using SVN far outweigh the headaches.  If you&#8217;re sick and tired of complicated merge-processes, you should checkout <a href="http://git-scm.com/">GIT</a>&#8230; an alternative to SVN which handles merges and branching and whatnot much much easier and simpler.  We are sticking w/ SVN for now because we&#8217;re already committed, but I&#8217;ve heard nothing but good things about GIT.</p>
<p><map name='google_ad_map_310_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/310?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_310_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=310&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2009%2F03%2F05%2Fsvn-merge-making-sure-a-branch-is-updated-from-trunk-then-merging-back-to-trunk%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2009/03/05/svn-merge-making-sure-a-branch-is-updated-from-trunk-then-merging-back-to-trunk/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Repost: If Programming Languages Were Religions</title>
		<link>http://zeroasterisk.com/2008/12/17/repost-if-programming-languages-were-religions/</link>
		<comments>http://zeroasterisk.com/2008/12/17/repost-if-programming-languages-were-religions/#comments</comments>
		<pubDate>Wed, 17 Dec 2008 18:00:20 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[geek]]></category>
		<category><![CDATA[laughable]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/blog/index.php/2008/12/17/repost-if-programming-languages-were-religions/</guid>
		<description><![CDATA[A very funny post for the programming nerds out there:
If programming languages were religions&#8230;
By amz &#8211; Monday, December 15, 2008 at 14:52
PHP would be Cafeteria Christianity &#8211; Fights with Java for the web market. It draws a few concepts from C and Java, but only those that it really likes. Maybe it&#8217;s not as coherent [...]]]></description>
			<content:encoded><![CDATA[<p>A very funny post for the programming nerds out there:</p>
<p><a href="http://www.aegisub.net/2008/12/if-programming-languages-were-religions.html">If programming languages were religions&#8230;</a></p>
<p>By amz &#8211; Monday, December 15, 2008 at 14:52</p>
<blockquote><p>PHP would be Cafeteria Christianity &#8211; Fights with Java for the web market. It draws a few concepts from C and Java, but only those that it really likes. Maybe it&#8217;s not as coherent as other languages, but at least it leaves you with much more freedom and ostensibly keeps the core idea of the whole thing. Also, the whole concept of &#8220;goto hell&#8221; was abandoned.</p></blockquote>
<p><map name='google_ad_map_295_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/295?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_295_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=295&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2008%2F12%2F17%2Frepost-if-programming-languages-were-religions%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2008/12/17/repost-if-programming-languages-were-religions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mantis To Basecamp To-do(s)</title>
		<link>http://zeroasterisk.com/2008/11/13/mantis-to-basecamp-to-dos/</link>
		<comments>http://zeroasterisk.com/2008/11/13/mantis-to-basecamp-to-dos/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 18:36:39 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[development]]></category>
		<category><![CDATA[geek]]></category>
		<category><![CDATA[php]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/blog/index.php/2008/11/13/mantis-to-basecamp-to-dos/</guid>
		<description><![CDATA[I just created a handy little script to create todos in basecamp for unresovled tickets in mantis.
You can see the open sourced code/project: http://code.google.com/p/mantis2basecamp-todo/.
This is something we found useful, if you use both tools, you might find it useful as well.



]]></description>
			<content:encoded><![CDATA[<p>I just created a handy little script to create todos in basecamp for unresovled tickets in mantis.</p>
<p>You can see the open sourced code/project: <a href="http://code.google.com/p/mantis2basecamp-todo/">http://code.google.com/p/mantis2basecamp-todo/</a>.</p>
<p>This is something we found useful, if you use both tools, you might find it useful as well.</p>
<p><map name='google_ad_map_285_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/285?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_285_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=285&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2008%2F11%2F13%2Fmantis-to-basecamp-to-dos%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2008/11/13/mantis-to-basecamp-to-dos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cakephp Workshop, In Review</title>
		<link>http://zeroasterisk.com/2008/09/08/cakephp-workshop-in-review/</link>
		<comments>http://zeroasterisk.com/2008/09/08/cakephp-workshop-in-review/#comments</comments>
		<pubDate>Mon, 08 Sep 2008 15:38:13 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/blog/index.php/2008/09/08/cakephp-workshop-in-review/</guid>
		<description><![CDATA[We had the very good fortune of attending the first CakePHP workshop, in Raleigh, NC this weekend. Four of the core developers of the project where there, including the project manger and the lead developer; along with one of the guys behind jquery-UI. The non-presenters ranged from people who had never used CakePHP to people who had been using [...]]]></description>
			<content:encoded><![CDATA[<p>We had the very good fortune of attending the first CakePHP <a href="http://debuggable.com/posts/cakephp-workshop-in-raleigh-nc-sep-6-to-7:488a234d-39fc-4d06-9c57-65aa4834cda3">workshop, in Raleigh, NC</a> this weekend. Four of the core developers of the project where there, including the project manger and the lead developer; along with one of the guys behind <a href="http://ui.jquery.com/about">jquery-UI</a>. The non-presenters ranged from people who had never used <a href="http://cakephp.org">CakePHP </a>to people who had been using it for a couple of years.</p>
<p class="MsoNormal">The presentations were fantastic, often just building a project live, explaining their steps and choices and debugging as they went.<span> </span>In addition, there was a second room where the hosts who were not presenting were happy to go over specific problems, questions, and code, as well as talking about coding approaches or testing or pretty much anything else.<span> </span>The one-on-one time was incredibly useful both technically and it was invaluable to put faces on names.</p>
<p class="MsoNormal">Since it was just a bunch of geeks, we ended up all going out to dinner and hanging out in the hotel lobby until 2am, talking about code and projects and whatever else (HttpSocket).<span> </span>The Cake guys were very friendly, open, and encouraging – actually liking some of our work we showed them (at least faking it well).<span> </span>More importantly, they were very quick with suggestions and information and all sorts of tricks and techniques which would have taken weeks or months of research to discover on our own.</p>
<p class="MsoNormal">All in all, the cost was dirt cheap for what we got out of it and we are very much looking forward to a future “advanced” <a href="http://debuggable.com/categories/talks,-workshops-and-events:480f4dd5-dc14-4160-bfc5-4632cbdd56cb">workshop</a> next year.</p>
<p class="MsoNormal">Thanks Guys (and Cindy),</p>
<p class="MsoNormal"><img src="http://static.thinkingphp.org/img/workshop-nc-08/day2/2.jpg" alt="" /></p>
<p><map name='google_ad_map_264_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/264?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_264_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=264&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2008%2F09%2F08%2Fcakephp-workshop-in-review%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2008/09/08/cakephp-workshop-in-review/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cakephp Workshop 2008.09.06</title>
		<link>http://zeroasterisk.com/2008/09/06/cakephp-workshop-20080906/</link>
		<comments>http://zeroasterisk.com/2008/09/06/cakephp-workshop-20080906/#comments</comments>
		<pubDate>Sat, 06 Sep 2008 13:00:18 +0000</pubDate>
		<dc:creator>alan</dc:creator>
				<category><![CDATA[cakephp]]></category>
		<category><![CDATA[geek]]></category>

		<guid isPermaLink="false">http://zeroasterisk.com/blog/index.php/2008/09/06/cakephp-workshop-20080906/</guid>
		<description><![CDATA[So here I am, in Raleigh, NC &#8211; waiting for the CakePHP Workshop to start&#8230; We survived the rain so far, waiting to see if there is any flooding or whatnot.
Have met a few people here so far, all seem very friendly.  Looking forward to seeing what happens and what we learn along the [...]]]></description>
			<content:encoded><![CDATA[<p>So here I am, in Raleigh, NC &#8211; waiting for the <a href="http://debuggable.com/posts/cakephp-workshop-in-raleigh-nc-sep-6-to-7:488a234d-39fc-4d06-9c57-65aa4834cda3">CakePHP Workshop</a> to start&#8230; We survived the rain so far, waiting to see if there is any flooding or whatnot.</p>
<p>Have met a few people here so far, all seem very friendly.  Looking forward to seeing what happens and what we learn along the way.</p>
<p>I am wearing my &#8220;I [heart LAMP&#8221; geek-shirt today, as it seemed appropriate (if a little over the top nerdy).</p>
<p><map name='google_ad_map_263_0676ea2b0e7dda10'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/263?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_263_0676ea2b0e7dda10' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=263&amp;url= http%3A%2F%2Fzeroasterisk.com%2F2008%2F09%2F06%2Fcakephp-workshop-20080906%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://zeroasterisk.com/2008/09/06/cakephp-workshop-20080906/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
