<?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>Blog dot Melimato dot Com &#187; doctrine</title>
	<atom:link href="http://blog.melimato.com/tag/doctrine/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.melimato.com</link>
	<description>Those things we do</description>
	<lastBuildDate>Thu, 24 Dec 2009 11:58:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Ignored files in Bazaar in a Symfony project</title>
		<link>http://blog.melimato.com/ignored-files-in-bazaar-in-asymfony-project/</link>
		<comments>http://blog.melimato.com/ignored-files-in-bazaar-in-asymfony-project/#comments</comments>
		<pubDate>Fri, 23 Oct 2009 12:40:19 +0000</pubDate>
		<dc:creator>pablo</dc:creator>
				<category><![CDATA[bzr]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[symfony]]></category>
		<category><![CDATA[bazaar]]></category>
		<category><![CDATA[bzrignore]]></category>
		<category><![CDATA[doctrine]]></category>
		<category><![CDATA[propel]]></category>
		<category><![CDATA[vcs]]></category>

		<guid isPermaLink="false">http://blog.melimato.com/?p=164</guid>
		<description><![CDATA[Recently, I&#8217;ve been doing a few projects using Symfony PHP framework and Bazaar for version control. One of the great features of Symfony is that it generates base classes automatically to interact with the database from a pre-defined schema file. While this is a great feature, every time the schema gets changed, Symfony regenerates all [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve been doing a few projects using <a href="http://www.symfony-project.org/">Symfony</a> PHP framework and <a href="http://bazaar-vcs.org/en/">Bazaar</a> for version control. One of the great features of Symfony is that it generates base classes automatically to interact with the database from a pre-defined  schema file. While this is a great feature, every time the schema gets changed, Symfony regenerates all the files thus flagging them as modified in Bazaar. To avoid committing those files all the time, I created a .bzrignore file to ignore them and leave my repository nice and clean.</p>
<p><span id="more-164"></span></p>
<p>Firstly, init bazaar for your new project:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">bzr init</pre></div></div>

<p>Next edit your .bzrignore file located in the root dir of your project</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">vi</span> .bzrignore</pre></div></div>

<p>And add the following lines:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trunk<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>config<span style="color: #000000; font-weight: bold;">/*</span>schema-transformed.xml
trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span></pre></div></div>

<p>The above lines are pretty much self-explanatory, the only important thing here to keep in mind is that if you want to ignore all the files inside a directory you firstly have to add the directory to bazaar (bzr add dir) and then ignore everything inside them.<br />
The magic really happens in the following line.<br />
For Doctrine users:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trunk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/**/</span>base<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>And Propel</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"> <span style="color: #000000; font-weight: bold;">**/</span>om<span style="color: #000000; font-weight: bold;">/*</span>. 
 <span style="color: #000000; font-weight: bold;">**/</span>map<span style="color: #000000; font-weight: bold;">/*</span>.</pre></div></div>

<p>This tells bzr to ignore anything inside any directory named base inside the lib directory, and om and map if you&#8217;re using propel, which is where all base classes are stored. </p>
<p>This way, your repository will only store the files that you edit. All files generated automatically by Symfony or plugins are ignored, so when checking out a Symfony project you will have to execute:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>symfony doctrine-build-all</pre></div></div>

<p>or</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">.<span style="color: #000000; font-weight: bold;">/</span>symfony propel-build-all</pre></div></div>

<p>To see which files are currently being ignored use the following command:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">bzr ignored</pre></div></div>

<p>And the output should be something like this:</p>
<p>The first column tells which file is ignored and the second one informs the rule (pattern) used for the match.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">trunk<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>admin                                  trunk<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>frontend                               trunk<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/</span>project_autoload.cache                 trunk<span style="color: #000000; font-weight: bold;">/</span>cache<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>filter<span style="color: #000000; font-weight: bold;">/</span>doctrine<span style="color: #000000; font-weight: bold;">/</span>base<span style="color: #000000; font-weight: bold;">/</span>BaseMyClassFormFilter.class.php trunk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/**/</span>base<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>form<span style="color: #000000; font-weight: bold;">/</span>doctrine<span style="color: #000000; font-weight: bold;">/</span>base<span style="color: #000000; font-weight: bold;">/</span>BaseMyClassForm.class.php trunk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/**/</span>base<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/</span>model<span style="color: #000000; font-weight: bold;">/</span>doctrine<span style="color: #000000; font-weight: bold;">/</span>base<span style="color: #000000; font-weight: bold;">/</span>BaseMyClass.class.php trunk<span style="color: #000000; font-weight: bold;">/</span>lib<span style="color: #000000; font-weight: bold;">/**/</span>base<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>admin_dev.log                            trunk<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/</span>frontend_dev.log                         trunk<span style="color: #000000; font-weight: bold;">/</span>log<span style="color: #000000; font-weight: bold;">/*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.channels                            trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.depdb                               trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.depdblock                           trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.filemap                             trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.lock                                trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.registry                            trunk<span style="color: #000000; font-weight: bold;">/</span>plugins<span style="color: #000000; font-weight: bold;">/</span>.<span style="color: #000000; font-weight: bold;">*</span>
trunk<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/</span>                     trunk<span style="color: #000000; font-weight: bold;">/</span>web<span style="color: #000000; font-weight: bold;">/</span>uploads<span style="color: #000000; font-weight: bold;">/*</span></pre></div></div>

<p>Comments are very much appreciated!</p>
<div id="wherego_related"><h3>Readers who viewed this page, also viewed:</h3><ul><li>Powered by <a href="http://ajaydsouza.com/wordpress/plugins/where-did-they-go-from-here/">Where did they go from here?</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://blog.melimato.com/ignored-files-in-bazaar-in-asymfony-project/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
	</channel>
</rss>
