<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>PHP and I &#187; lab</title>
	<atom:link href="http://palaniraja.wordpress.com/category/lab/feed/" rel="self" type="application/rss+xml" />
	<link>http://palaniraja.wordpress.com</link>
	<description>தீதும் நன்றும் பிறர் தர வாரா</description>
	<lastBuildDate>Sat, 17 Oct 2009 13:26:51 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<cloud domain='palaniraja.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://www.gravatar.com/blavatar/897d9e2aa61324c11b7a18c6134b6f80?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>PHP and I &#187; lab</title>
		<link>http://palaniraja.wordpress.com</link>
	</image>
			<item>
		<title>SVN: Export only updated files between 2 revisions</title>
		<link>http://palaniraja.wordpress.com/2008/09/20/svn-export-only-updated-files-between-2-revisions/</link>
		<comments>http://palaniraja.wordpress.com/2008/09/20/svn-export-only-updated-files-between-2-revisions/#comments</comments>
		<pubDate>Sat, 20 Sep 2008 19:27:21 +0000</pubDate>
		<dc:creator>Palani raja</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[subverion export only updated]]></category>
		<category><![CDATA[svn custom export]]></category>
		<category><![CDATA[svn export]]></category>
		<category><![CDATA[svn export alternative]]></category>
		<category><![CDATA[svn export only updated]]></category>
		<category><![CDATA[svnexport advanced]]></category>

		<guid isPermaLink="false">http://palaniraja.wordpress.com/?p=106</guid>
		<description><![CDATA[ 
Are you someone like me who is looking for an SVN command that exports the files updated between two revisions? Until now, I used to say that there is no such command available in SVN by default, or maybe now they have a feature to build in the next release.
Don&#8217;t lose hope. After having a [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=palaniraja.wordpress.com&blog=1123457&post=106&subd=palaniraja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p> </p>
<p>Are you someone like me who is looking for an SVN command that exports the files updated between two revisions? Until now, I used to say that there is no such command available in SVN by default, or maybe now they have a feature to build in the next release.</p>
<p>Don&#8217;t lose hope. After having a hard time searching for an out of the box solution, I built my own with power of PHP <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  what else?</p>
<h4>The scenario</h4>
<ul class="unIndentedList">
<li>Working with a team that uses SVN for versioning.</li>
<li>Your production server doesn&#8217;t have svn, so you can&#8217;t run the command svn update. Even if you have svn in your production server and your stupid system admin denied to open svn port of your dev server over firewall for security reasons(Believe me, it happens I wrote more than 10 email to my system admin, and I can&#8217;t make him understand why we need this port to be open.</li>
<li>You need to upload the changes frequently and you have a very large list of directories which need to be chmod to 777 if you prefer uploading all again or,  you don&#8217;t keep the files uploaded to the server in Dev (e.g. user images, videos are uploaded in the server are not required in Dev)</li>
<li>All you need is to upload the files which are updated after the previous build. It is not so easy if you have too many directories of hierarchy (or using a PHP Framework like me. i.e., controller, models, views, app etc.,) </li>
</ul>
<h4>Prerequisites</h4>
<ul class="unIndentedList">
<li>What does <strong>svn log</strong> do?<br />
It&#8217;s a command svn to list the files updated and other information in a revision or between two revisions, when you run the command &#8220;svn log -rM:N -v&#8221; (M,N are two revision numbers) in your working copy directory. You need the output of this command to provide the input for the script.</li>
<li>A working copy. (HEAD checkout from your Repo)</li>
<li>A directory with &#8220;chmod 0777″ for the script to copy only the updated files for upload. </li>
</ul>
<p> </p>
<h4>The Script</h4>
<ul class="unIndentedList">
<li>You can download the source <a title="Download the sourcecode" href="http://prjx.googlecode.com/files/svnexport.zip">here</a>.</li>
<li>View source <a title="View the source" href="http://palani.bitsymphony.com/lab/svnexport/showsource.php?q=svnexport.php">here</a>.</li>
<li>Try the <a title="Try the demo" href="http://palani.bitsymphony.com/lab/svnexport/">demo</a>. </li>
</ul>
<h4>Screenshots</h4>

<a href='http://palaniraja.wordpress.com/2008/09/20/svn-export-only-updated-files-between-2-revisions/svnexport1/' title='svnexport1'><img width="150" height="114" src="http://palaniraja.files.wordpress.com/2008/09/svnexport1.png?w=150&#038;h=114" class="attachment-thumbnail" alt="" title="svnexport1" /></a>
<a href='http://palaniraja.wordpress.com/2008/09/20/svn-export-only-updated-files-between-2-revisions/svnexport2/' title='svnexport2'><img width="150" height="113" src="http://palaniraja.files.wordpress.com/2008/09/svnexport2.png?w=150&#038;h=113" class="attachment-thumbnail" alt="" title="svnexport2" /></a>

  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/palaniraja.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/palaniraja.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/palaniraja.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/palaniraja.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/palaniraja.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/palaniraja.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/palaniraja.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/palaniraja.wordpress.com/106/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/palaniraja.wordpress.com/106/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/palaniraja.wordpress.com/106/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=palaniraja.wordpress.com&blog=1123457&post=106&subd=palaniraja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://palaniraja.wordpress.com/2008/09/20/svn-export-only-updated-files-between-2-revisions/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8ca79fc3854548afc239383d0c5b442?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>SVN: Auto UPDATE WORKING COPY after COMMIT</title>
		<link>http://palaniraja.wordpress.com/2008/09/05/svn-auto-update-working-copy-after-commit/</link>
		<comments>http://palaniraja.wordpress.com/2008/09/05/svn-auto-update-working-copy-after-commit/#comments</comments>
		<pubDate>Fri, 05 Sep 2008 19:12:02 +0000</pubDate>
		<dc:creator>Palani raja</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[svn]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[auto update]]></category>
		<category><![CDATA[commit automate]]></category>
		<category><![CDATA[subversion auto update]]></category>
		<category><![CDATA[subversion hooks]]></category>
		<category><![CDATA[svn hooks]]></category>

		<guid isPermaLink="false">http://palaniraja.wordpress.com/?p=84</guid>
		<description><![CDATA[In one of our recent project, we were looking for an automated script that update the working copy of our dev server as soon as someone commit the changes to the SVN.
We were using a Linux server (Fedora) to integrate all the modules developed by almost 15+ developers. I learnt a valuable lesson from the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=palaniraja.wordpress.com&blog=1123457&post=84&subd=palaniraja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>In one of our recent project, we were looking for an automated script that update the working copy of our dev server as soon as someone commit the changes to the SVN.</p>
<p>We were using a Linux server (Fedora) to integrate all the modules developed by almost 15+ developers. I learnt a valuable lesson from the projects in the recent past, it is not so easy to integrate all the modules developed by a team at the end of the project. So I suggested my team that integrating modules while developed would be the best thing (from my exp. anyway ).</p>
<p>Our Dev server running SVN and LAMPP, all we need is an automated script that updates the working copy of our application which resides in htdocs of LAMPP as soon as someone commit their changes, so that they can easily identify the issues as soon as someone commit the conflicts. And also it would be really easy for us to show the demo of the app. at any to the client (i.e., No integration headache at the time of the call).</p>
<h3>PHP: the right tool?</h3>
<p>As usual I wrote a script in php to run the SVN UPDATE command with PHP exec() function. Oops!! It doesn&#8217;t work as expected.</p>
<p>&lt;?php</p>
<p>$ret = exec(‘svn update /opt/lampp/htdocs&#8217;, $ret2, $ret3);<br />
echo  $ret;</p>
<p>?&gt;</p>
<p>I stumbled Google to know what&#8217;s wrong with this code. It returns the following valuable results.</p>
<p>I finally have come to a conclusion that PHP is not the precise tool for the task. So &#8220;How did you achieve? Which is the best tool to achieve this?&#8221;</p>
<p>I can&#8217;t say which one is the best, but this is how I automate the task.</p>
<p>SVN has a feature built-in called <strong><a href="http://svnbook.red-bean.com/en/1.4/svn-book.html#svn.ref.reposhooks" target="_blank">hook</a></strong> which is designed specifically to do similar tasks. Don&#8217;t know why I&#8217;m hearing hooks frequently now-a-days (Drupal uses hooks, Joomla 1.5 uses hooks, hooks! hooks!! hooks!!! )</p>
<h3>Steps:</h3>
<ul class="unIndentedList">
<li>Create a file in <strong>C</strong> to run the command &#8220;<strong>svn update</strong>&#8220;. In my case the file was s<strong>vn_update.c</strong> in <strong>/bin</strong>.</li>
<li><strong>svn_update.c</strong></li>
</ul>
<p><code> #include &lt;stddef.h&gt;<br />
#include &lt;stdlib.h&gt;<br />
#include &lt;unistd.h&gt;<br />
int main(void) {</code></p>
<p><code>execl("/usr/bin/svn", "svn", "update", "/opt/lampp/htdocs/ ", (const char *) NULL);<br />
return(EXIT_FAILURE);</code></p>
<p><code> </code></p>
<p> </p>
<p><code> }</code></p>
<ul class="unIndentedList">
<li>Compile the file with the following command &#8220;<strong>gcc svn_update.c -o svn_update</strong>&#8220;</li>
<li>Create a file called &#8220;<strong>post-commit</strong>&#8221; in the hooks directory of your SVN repository:</li>
<li><strong>post-commit</strong></li>
</ul>
<p><code> # #!/bin/sh<br />
/bin/svn_update</code></p>
<ul class="unIndentedList">
<li>         Chmod your post-commit with the following command &#8220;<strong>chmod 0755 post-commit</strong>&#8220;</li>
</ul>
<p> <br />
That&#8217;s all you have to do, now SVN will do the rest. You can download the files, svn_update.c and post-commit <a href="http://prjx.googlecode.com/files/svn-auto-update.zip">here</a>.<br />
 </p>
<h3>References:</h3>
<p>Apache SVN @  <a href="http://www.sematopia.com/?p=218" target="_blank">http://www.sematopia.com/?p=218</a></p>
<p>Alternate to C @ <a href="http://forum.webfaction.com/viewtopic.php?id=964" target="_blank">http://forum.webfaction.com/viewtopic.php?id=964</a></p>
<p>Mighty C code @ <a href="http://forum.webfaction.com/viewtopic.php?pid=216#p216" target="_blank">http://forum.webfaction.com/viewtopic.php?pid=216#p216</a></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/palaniraja.wordpress.com/84/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/palaniraja.wordpress.com/84/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/palaniraja.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/palaniraja.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/palaniraja.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/palaniraja.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/palaniraja.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/palaniraja.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/palaniraja.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/palaniraja.wordpress.com/84/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/palaniraja.wordpress.com/84/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/palaniraja.wordpress.com/84/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=palaniraja.wordpress.com&blog=1123457&post=84&subd=palaniraja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://palaniraja.wordpress.com/2008/09/05/svn-auto-update-working-copy-after-commit/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8ca79fc3854548afc239383d0c5b442?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kevin</media:title>
		</media:content>
	</item>
		<item>
		<title>Sticky notes with PHP and Jquery</title>
		<link>http://palaniraja.wordpress.com/2008/07/19/sticky-notes-with-php-and-jquery/</link>
		<comments>http://palaniraja.wordpress.com/2008/07/19/sticky-notes-with-php-and-jquery/#comments</comments>
		<pubDate>Sat, 19 Jul 2008 13:08:26 +0000</pubDate>
		<dc:creator>Palani raja</dc:creator>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[lab]]></category>
		<category><![CDATA[tools]]></category>
		<category><![CDATA[PHP Sticky]]></category>
		<category><![CDATA[PHP-GD]]></category>
		<category><![CDATA[sticky]]></category>
		<category><![CDATA[sticky notes app]]></category>
		<category><![CDATA[web sticky]]></category>
		<category><![CDATA[web sticky application]]></category>

		<guid isPermaLink="false">http://palaniraja.wordpress.com/?p=52</guid>
		<description><![CDATA[Script speaks louder than words. Please go through the following links
PHP Gd based Sticky script


Jquery UI based Sticky page

The first script is used to create a dynamic sticky image with the selected sticky pattern and font.
The second script is an example to use the dynamic sticky to implement a sticky dashboard kindof application, it uses [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=palaniraja.wordpress.com&blog=1123457&post=52&subd=palaniraja&ref=&feed=1" />]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Script speaks louder than words. Please go through the following links</p>
<p><strong>PHP Gd based Sticky script<br />
</strong></p>
<p><a href="http://palani.bitsymphony.com/lab/sticky/"><img class="alignnone size-medium wp-image-55" src="http://palaniraja.files.wordpress.com/2008/07/demo.png?w=300&#038;h=203" alt="" width="300" height="203" /></a><br />
<strong>Jquery UI based Sticky page</strong><br />
<a href="http://palani.bitsymphony.com/lab/sticky/demo2.php"><img class="alignnone size-medium wp-image-56" src="http://palaniraja.files.wordpress.com/2008/07/stickypage.png?w=300&#038;h=171" alt="" width="300" height="171" /></a><br />
The first script is used to create a dynamic sticky image with the selected sticky pattern and font.<br />
The second script is an example to use the dynamic sticky to implement a sticky dashboard kindof application, it uses jquery UI for drag-n-drop feature.</p>
<p>Script is almost 1 yr old so, with that said updates are welcome.</p>
<p>Download <a title="PHP Sticky 0.01" href="http://prjx.googlecode.com/files/sticky.zip">PHPSticky </a>from GoogleCode</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/palaniraja.wordpress.com/52/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/palaniraja.wordpress.com/52/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/palaniraja.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/palaniraja.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/palaniraja.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/palaniraja.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/palaniraja.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/palaniraja.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/palaniraja.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/palaniraja.wordpress.com/52/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/palaniraja.wordpress.com/52/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/palaniraja.wordpress.com/52/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=palaniraja.wordpress.com&blog=1123457&post=52&subd=palaniraja&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://palaniraja.wordpress.com/2008/07/19/sticky-notes-with-php-and-jquery/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/c8ca79fc3854548afc239383d0c5b442?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Kevin</media:title>
		</media:content>

		<media:content url="http://palaniraja.files.wordpress.com/2008/07/demo.png?w=300" medium="image" />

		<media:content url="http://palaniraja.files.wordpress.com/2008/07/stickypage.png?w=300" medium="image" />
	</item>
	</channel>
</rss>