<?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>Likesalmon Design &#187; Musings</title>
	<atom:link href="http://www.likesalmondesign.com/category/musings/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.likesalmondesign.com</link>
	<description>Open Source Web Design and Development from Scratch</description>
	<lastBuildDate>Tue, 15 Jun 2010 03:51:47 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Tile images in Imagemagick to create CSS sprites</title>
		<link>http://www.likesalmondesign.com/tile-images-in-imagemagick-to-create-css-sprites/</link>
		<comments>http://www.likesalmondesign.com/tile-images-in-imagemagick-to-create-css-sprites/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 05:31:35 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Imagemagick]]></category>
		<category><![CDATA[rollover]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=350</guid>
		<description><![CDATA[The Magick
This will stack two images to create a CSS sprite.  Very handy for flicker-free image rollovers:
$ montage -background transparent -tile 1x2 -geometry +0+2 image1.gif image2.gif result.gif
You could create a taller or wider stack by adjusting the -tile option.  For example -tile 2x10 would stack 2 images across and 10 images down.  [...]]]></description>
			<content:encoded><![CDATA[<h3>The Magick</h3>
<p>This will stack two images to create a CSS sprite.  Very handy for flicker-free image rollovers:</p>
<p><code>$ montage -background transparent -tile 1x2 -geometry +0+2 <em>image1.gif</em> <em>image2.gif</em> result.gif</code></p>
<p>You could create a taller or wider stack by adjusting the <code>-tile</code> option.  For example <code>-tile 2x10</code> would stack 2 images across and 10 images down.  If you don&#8217;t have 20 images, Imagemagick will leave empty spaces.</p>
<p>Not sure why I had to set <code>-geometry +0+2</code>.  That creates a 2 pixel vertical offset, which was necessary to align to two images.  If you leave it at <code>-geometry +0+0</code> the hover image is slightly off, which makes for a cool &#8220;pressed in&#8221; effect, but it&#8217;s not always what I need.</p>
<h3>The CSS</h3>
<p>The CSS you would use to make the rollover work would go something like this:</p>
<p><code><br />
a.rollover {<br />
background: url('Images/result.gif') no-repeat center top;<br />
display: block; /* necessary to set the width and height of a tags */<br />
text-indent: -99999px; /* get the link text out of the way if replaced by an image */<br />
overflow: hidden; /* so you don't get the dotted outline when you click on the link */<br />
width: 100px;<br />
height: 100px;<br />
}</p>
<p>a.rollover:hover {<br />
background: url('Images/result.gif') no-repeat center bottom;<br />
}<br />
</code></p>
<h3>Bash bonus!</h3>
<p>When I did this, I had a folder of images with the naming scheme <em>menu_img1.gif, menu_img1_on.gif, menu_img2.gif, menu_img2_on.gif.. .etc.</em>.  I automated the sprite creation process from the command line like this:</p>
<p><code><br />
$ array=( img1 img2 img3 )<br />
$ for i in 0 1 2<br />
$ do<br />
$ montage -background transparent -tile 1x2 -geometry +0+2 menu_${array[i]}.gif menu_${array[i]}_on.gif menu_${array[i]}_sprite.gif<br />
$ done</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/tile-images-in-imagemagick-to-create-css-sprites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun for Friday: Steve Jobs tells Flash to go screw</title>
		<link>http://www.likesalmondesign.com/fun-for-friday-steve-jobs-tells-flash-to-go-screw/</link>
		<comments>http://www.likesalmondesign.com/fun-for-friday-steve-jobs-tells-flash-to-go-screw/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 19:08:51 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=340</guid>
		<description><![CDATA[In an open letter published on the Apple website, the venerable Mr. Jobs has thrown down the gauntlet:
Flash was created during the PC era – for PCs and mice. Flash is a successful business for Adobe, and we can understand why they want to push it beyond PCs. But the mobile era is about low [...]]]></description>
			<content:encoded><![CDATA[<p>In an open letter <a href="http://www.apple.com/hotnews/thoughts-on-flash/" title="Thoughts on Flash">published on the Apple website</a>, the venerable Mr. Jobs has thrown down the gauntlet:</p>
<blockquote><p>Flash was created during the PC era – for PCs and mice. Flash is a successful business for Adobe, and we can understand why they want to push it beyond PCs. But the mobile era is about low power devices, touch interfaces and open web standards – all areas where Flash falls short.</p></blockquote>
<p>Hallelujah! Finally someone with some power standing up for web standards.  I suspected that the i-device refusal of Flash was a trojan horse for HTML5 and this confirms it.  Adobe has the interweb by the balls and its time to loosen their grip.</p>
<p>There&#8217;s a lot of criticism directed at Jobs for calling for openness when his own products are closed.  But seriously, who cares about closed <em>devices</em>?  Apple made the iPhone and iPad, they can do whatever they want with them. There is competition in those markets, consumers have a choice.  But nobody owns the internet and its in everyone&#8217;s best interest to keep it that way.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/fun-for-friday-steve-jobs-tells-flash-to-go-screw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Webfaction, seriously, I love you</title>
		<link>http://www.likesalmondesign.com/webfaction-seriously-i-love-you/</link>
		<comments>http://www.likesalmondesign.com/webfaction-seriously-i-love-you/#comments</comments>
		<pubDate>Fri, 30 Apr 2010 02:28:03 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=338</guid>
		<description><![CDATA[Webfaction has been my hosting provider for a couple years now.  I&#8217;ve set up prolly six or so clients with them as well.  I am absolutely in love with them.
I&#8217;ve never had a single problem with them or a second of downtime (that I noticed anyway).  Their cPanel interface is great to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.webfaction.com?affiliate=likesalmon" title="Sign up with Webfaction">Webfaction</a> has been my hosting provider for a couple years now.  I&#8217;ve set up prolly six or so clients with them as well.  I am absolutely in love with them.</p>
<p>I&#8217;ve never had a single problem with them or a second of downtime (that I noticed anyway).  Their cPanel interface is great to use and allows me to do pretty much everything I need.  You ever have to call your web host to change domain settings or to have them install an app on your server?  Then you need a new web host.  Oh, and they&#8217;re pretty cheap.  Like five to ten bucks a month cheap for their shared 1 plan, which is more than enough for me.  Not as cheap as GoDaddy maybe, but seriously, <em>GoDaddy?</em> GoDaddy <em>suuuuuuuuuuuucks.</em></p>
<p>I&#8217;ve only had to contact Webfaction twice with questions and the support staff has emailed me back so fast its like I&#8217;m their only customer.  The other day I was wondering how to set up Apache with some PHP options that weren&#8217;t in the default install.  I submitted a support ticket at 10:15pm and got a personal reply 12 minutes later.  And let me tell you, this was no easy answer.  Turns out you can install a custom Apache instance with whatever settings you want as a custom app on their server.  Isn&#8217;t that just insane?!  I&#8217;m totally doing it, even though it turns out the project I was doing it for is not happening.  But awesome, right?</p>
<p>So here it is again:</p>
<p><a href="http://www.webfaction.com?affiliate=likesalmon" title="Sign up with Webfaction">Webfaction</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/webfaction-seriously-i-love-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What to do when your javascript only works with Firebug turned on</title>
		<link>http://www.likesalmondesign.com/what-to-do-when-your-javascript-only-works-with-firebug-turned-on/</link>
		<comments>http://www.likesalmondesign.com/what-to-do-when-your-javascript-only-works-with-firebug-turned-on/#comments</comments>
		<pubDate>Wed, 28 Apr 2010 05:33:49 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=334</guid>
		<description><![CDATA[It makes sense, but I don&#8217;t ever turn Firebug off so I never would have noticed.  That is, until I&#8217;m sitting in front of a client trying to show off a new website.  That&#8217;s when I decide to turn it off.  Yep.
Turns out console is undefined when Firebug is off (of freaking [...]]]></description>
			<content:encoded><![CDATA[<p>It makes sense, but I don&#8217;t ever turn Firebug <em>off</em> so I never would have noticed.  That is, until I&#8217;m sitting in front of a client trying to show off a new website.  That&#8217;s when I decide to turn it off.  Yep.</p>
<p>Turns out <code>console</code> is undefined when Firebug is off (of freaking course) so Firefox stops parsing the code when it gets to all those <code>console.log()</code>&#8217;s and <code>console.assert()</code>&#8217;s that I have so liberally sprinkled my code with.  To fix this, wrap &#8216;em in an if statement, but you shouldn&#8217;t use <code>log</code> as a function name since its a built-in.  I like <code>clog</code> better anyway.</p>
<p><code><br />
function clog(string) {<br />
        if (window.console) {<br />
            console.log(string);<br />
        }<br />
    }</p>
<p>    function assert(fact, explanation) {<br />
        if (window.console) {<br />
            console.assert(fact, explanation);<br />
        }<br />
    }<br />
</code></p>
<p>Course this means that text substitution in console.log() doesn&#8217;t work, i.e.:</p>
<p><code>console.log('I like %s', 'pie')</code> // prints &#8216;I like pie&#8217;</p>
<p>but </p>
<p><code>clog('I like %s', 'pie') // prints 'I like %s'</code></p>
<p>I&#8217;ll think about this and get back to ya.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/what-to-do-when-your-javascript-only-works-with-firebug-turned-on/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>A plug for Lee Howard and Mystery Machine Studio</title>
		<link>http://www.likesalmondesign.com/a-plug-for-lee-howard-and-mystery-machine-studio/</link>
		<comments>http://www.likesalmondesign.com/a-plug-for-lee-howard-and-mystery-machine-studio/#comments</comments>
		<pubDate>Thu, 01 Apr 2010 19:15:33 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=301</guid>
		<description><![CDATA[Lee is the owner and sound engineer at the soon-to-be huge recording studio Mystery Machine Studio in Portland, OR.  I built his website (http://www.mysterymachinestudio.com/).  
A CD that Lee recorded for local folk/pop hero Nick Jaina was just released to critical acclaim, and we&#8217;re trying to drum up some exposure for Lee&#8217;s beautiful little [...]]]></description>
			<content:encoded><![CDATA[<p>Lee is the owner and sound engineer at the soon-to-be huge recording studio Mystery Machine Studio in Portland, OR.  I built his website (<a href="http://www.mysterymachinestudio.com/" title="Mystery Machine Studio">http://www.mysterymachinestudio.com/</a>).  </p>
<p>A CD that Lee recorded for local folk/pop hero <a href="http://www.nickjaina.com/" title="Nick Jaina's website">Nick Jaina</a> was just released to <a href="http://www.wweek.com/editorial/3621/13847/" title="Willamette Week review">critical acclaim</a>, and we&#8217;re trying to drum up some exposure for Lee&#8217;s beautiful little basement studio.  Go Lee!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/a-plug-for-lee-howard-and-mystery-machine-studio/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I&#8217;m switching to Chrome (on a trail basis)</title>
		<link>http://www.likesalmondesign.com/im-switching-to-chrome-on-a-trail-basis/</link>
		<comments>http://www.likesalmondesign.com/im-switching-to-chrome-on-a-trail-basis/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 20:19:17 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>
		<category><![CDATA[Software I use]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=277</guid>
		<description><![CDATA[I thought I would be a Firefox user till I died, but holy crap Chrome is fast!  I can launch Firefox, go make a sandwich, launch Chrome and be browsing before Firefox loads. This is particularly nice on our crappy Windows machines at work. JavaScript is noticeably faster.  Chrome seems more stable and [...]]]></description>
			<content:encoded><![CDATA[<p>I thought I would be a Firefox user till I died, but holy crap Chrome is fast!  I can launch Firefox, go make a sandwich, launch Chrome and be browsing before Firefox loads. This is particularly nice on our crappy Windows machines at work. JavaScript is noticeably faster.  Chrome seems more stable and doesn&#8217;t do that occasional temporary freeze thing on slow computers. As much.  Well, at least the whole thing doesn&#8217;t freeze, just the one tab that is having trouble.</p>
<h3>Extensions</h3>
<p>The Dev and Beta version of Chrome work with extensions (like LastPass, worlds greatest password manager).  The dev version has been very stable for me:</p>
<p><a title="Google Chrome dev channel" href="http://dev.chromium.org/getting-involved/dev-channel">http://dev.chromium.org/getting-involved/dev-channel</a></p>
<h3>Developer Tools! Eeeee!</h3>
<p>The thing that sealed the deal is the built-in developer tools.  Seems they&#8217;ve shipped Chrome with a built-in Firebug-like JavaScript debugger and inspector (press ctrl-shift-j).  Its not installed automatically on Linux machines, so apt-get it:</p>
<p><code>sudo apt-get install chromium-browser-inspector</code></p>
<p>I haven&#8217;t used it enough to form an opinion yet, but it <em>looks</em> great.  I&#8217;m going to finish out the current site I&#8217;m developing with Firefox and Firebug, but I&#8217;ve got another one in the pipe that is going to be all Chrome.</p>
<h3>Fantastic UI</h3>
<p>Best user interface of any browser I&#8217;ve used.</p>
<p>The teeny tiny branding means I get at least a quarter inch of screen real estate that would normally be full of dialog.  Page loading info is shown in a tiny pop-up at the bottom, so I get more space there too.  Its overlaid on top of the horizontal scroll bar, taking up no room at all. The combo address/search bar means the horizontal space is more usable too.  I  can usually see the whole url even when I&#8217;m using Chrome in a small window.</p>
<p>I love love love the tabs at the very top.  It reinforces the idea that each tab is its own process doing its own thing (dialogs like preferences are also displayed in a tab, just like web pages).  Tabs are arguably the most important feature of the browser dialog, they tell you where you are, and I definitely click on them more than anything else.  Making them a big target right at the top where they are the most obvious thing in the whole interface is genius.</p>
<p>Way to go Google!  Can&#8217;t wait for Chrome OS!</p>
<h3>Update, 2/25/2010</h3>
<p>Well, I tried.  Turns out that the Chrome developer tools has some usability issues that make it very hard to use effectively.  The number one problem is that the font is too small.  I get a headache just glancing at it.  I&#8217;m also annoyed by the checkboxes that pop up when you mouse over a css property.  I&#8217;m sure that one sounded really great on paper, but in practice its horrible.  The major thing it lacks is the &#8220;Larger Command Line&#8221; option that Firebug has, which allows you to put multi-line indented code in the console and run it.  It&#8217;s really nice and I use it all the time.</p>
<p>I still really like Chrome and I use it more and more (even though it doesn&#8217;t work with Netflix) for my non-development browsing pleasure.  Its still a young project and I&#8217;m hopeful that Google will improve the developer tools soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/im-switching-to-chrome-on-a-trail-basis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wordpress Error: Unable to create directory / Is its parent directory writable by the server?</title>
		<link>http://www.likesalmondesign.com/wordpress-error-unable-to-create-directory-is-its-parent-directory-writable-by-the-server/</link>
		<comments>http://www.likesalmondesign.com/wordpress-error-unable-to-create-directory-is-its-parent-directory-writable-by-the-server/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 05:54:35 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=270</guid>
		<description><![CDATA[If you get this error when you try to upload an image to your WordPress blog, there are two things you can do:

Go to Settings &#62; Miscellaneous in your Wordpress admin area and make sure that &#8216;Store uploads in this folder&#8217; is set to the default: wp-content/uploads (notice there is no &#8216;/&#8217; before wp-content/uploads).  Try [...]]]></description>
			<content:encoded><![CDATA[<p>If you get this error when you try to upload an image to your WordPress blog, there are two things you can do:</p>
<ol>
<li>Go to Settings &gt; Miscellaneous in your Wordpress admin area and make sure that &#8216;Store uploads in this folder&#8217; is set to the default: <code>wp-content/uploads</code> (notice there is no &#8216;/&#8217; before wp-content/uploads).  Try to upload again and see if it works.</li>
<li>If that didn&#8217;t work, open up a terminal and navigate to the wp-content directory.  If wp-content does not contain sub-directory called &#8216;uploads&#8217;, create one and then change its permissions to wide open (<code>sudo chmod 777 uploads/</code>).  Try to upload the image again.  If this works, navigate to the <code>wp-content/uploads/</code> directory and check the <em>owner</em> of the image you just uploaded (<code>ls -l</code>).  It will probably be something weird you&#8217;ve never seen before (mine was &#8216;www-data&#8217;).  Navigate up a directory and change the owner of the <code>uploads</code> folder to the one WordPress want to use: <code>sudo chown www-data:www:data</code>.  Then revert the permissions back to something a little safer: <code>sudo chmod 755 uploads/</code> and you&#8217;re done.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/wordpress-error-unable-to-create-directory-is-its-parent-directory-writable-by-the-server/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Use your user&#8217;s public_html directory to serve webpages</title>
		<link>http://www.likesalmondesign.com/use-your-users-public_html-directory-to-serve-webpages/</link>
		<comments>http://www.likesalmondesign.com/use-your-users-public_html-directory-to-serve-webpages/#comments</comments>
		<pubDate>Thu, 21 Jan 2010 03:59:53 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=268</guid>
		<description><![CDATA[Using a public_html file in your home directory is much more convenient than /var/www for a local website development environment.  The following commands create a file called public_html in your home directory and enable the UserDir module in Apache.
From the command line, enter:

$ mkdir ~/public_html
$ cd /etc/apache2/mods-enabled
$ sudo ln -s ../mods-available/userdir.conf userdir.conf
$ sudo ln [...]]]></description>
			<content:encoded><![CDATA[<p>Using a public_html file in your home directory is much more convenient than /var/www for a local website development environment.  The following commands create a file called public_html in your home directory and enable the UserDir module in Apache.</p>
<p>From the command line, enter:</p>
<ul>
<li><code>$ mkdir ~/public_html</code></li>
<li><code>$ cd /etc/apache2/mods-enabled</code></li>
<li><code>$ sudo ln -s ../mods-available/userdir.conf userdir.conf</code></li>
<li><code>$ sudo ln -s ../mods-available/userdir.load userdir.load</code></li>
<li><code>$ sudo service apache2 restart</code></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/use-your-users-public_html-directory-to-serve-webpages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The difference between a working tree, repository, branch, and checkout in the Bazaar version control system</title>
		<link>http://www.likesalmondesign.com/the-difference-between-a-working-tree-repository-branch-and-checkout-in-the-bazaar-version-control-system/</link>
		<comments>http://www.likesalmondesign.com/the-difference-between-a-working-tree-repository-branch-and-checkout-in-the-bazaar-version-control-system/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 07:17:07 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=250</guid>
		<description><![CDATA[I wish this was in huge type on the front page of the Bazaar web site because it is essential to understanding just what the heck is going on when you place you files under version control.
I&#8217;m going to use an example to explain this.  These events are listed in the order that they [...]]]></description>
			<content:encoded><![CDATA[<p>I wish this was in huge type on the front page of the <a href="http://bazaar-vcs.org/en/">Bazaar web site</a> because it is essential to understanding just what the heck is going on when you place you files under version control.</p>
<p>I&#8217;m going to use an example to explain this.  These events are listed in the order that they usually occur, at least when I use Bazaar. If you want to understand this at all, you better read the <a href="http://doc.bazaar-vcs.org/latest/en/mini-tutorial/" title="">Bazaar in five minutes</a> tutorial first.</p>
<h3>Working Tree</h3>
<p>When I start a new project I usually create a folder named after my project, say &#8216;foo/&#8217;, and in folder &#8216;foo/&#8217; I might put my first file I&#8217;ll be working on called, say, &#8216;bar.py&#8217;, and a file to hold some data called &#8216;data.py&#8217;.  So as soon as I initialise Bazaar, &#8216;bar.py&#8217; and &#8216;data.py&#8217; will make up my working tree &#8211; <em>the files I actually edit</em>.</p>
<h3>Branch</h3>
<p>The next thing I do is initialise Bazaar by typing the command &#8216;bzr init&#8217; in the terminal, which creates a hidden folder in the &#8216;foo/&#8217; directory called &#8216;.bzr/&#8217;.  This hidden folder and its contents is a branch &#8211; <em>the state of a project including all its history</em>.  </p>
<p>A branch usually includes a working tree too, but it doesn&#8217;t have to.  If you get a branch and it doesn&#8217;t have a working tree, you can run &#8216;bzr update&#8217; to make one.</p>
<h3>Repository</h3>
<p> Among other things, &#8216;.bzr/&#8217; contains a folder called &#8216;repository&#8217;.  This, not surprisingly, is your repository &#8211; <em>the place where all commited changes to your working tree are stored</em>.</p>
<p>There isn&#8217;t much to a repository until you run &#8216;bzr add&#8217;, which adds all the files and folders in your project to the branch, and &#8216;bzr commit&#8217; which records all the changes to your working tree in your repository.</p>
<p>Your repository works like a database.  Each file you put under version control gets a unique identifier and each commit is numbered so you can go back to any revision and see what you did. A common thing to do if you have more than one person working on your project is to use the same <em>repository</em> for everyone.  The command &#8216;bzr init-repo&#8217; (as opposed to just plain old &#8216;bzr init&#8217;) creates a shared repository.</p>
<h3>Checkout</h3>
<p>So I created a folder and put some files in it, then initialised Bazaar which made my project a <em>branch</em>.  Then I ran &#8216;bzr add&#8217; and &#8216;bzr commit&#8217; to add the files in my working tree and revisions therein to my branch.  Now suppose someone else wanted to add code to my project?  That is where checkout comes in.</p>
<p>If the hobo living behind the Safeway wants a stand-alone version of my branch that he can stare at or create a competing project that has nothing to do with mine, he can run &#8216;bzr branch [BRANCH_LOCATION] [TO_LOCATION]&#8216;.  This will create a copy of my branch on his computer, but his commits will not effect my branch.</p>
<p>But if Sally Smartypants and I are friends and she wants to contribute to my project, she would run &#8216;bzr checkout [BRANCH_LOCATION] [TO_LOCATION]&#8216;, which would create a copy of my branch on her computer just like the hobo, with the major difference that Sally and my branches <em>share the same repository</em>.  So when Sally runs &#8216;bzr commit&#8217;, the changes that she made would be reflected in the branch I have.  I won&#8217;t see them right away though.  If I want Sally&#8217;s changes to show up in my working tree, I have to run &#8216;bzr update&#8217; to sync my working tree with our shared repository.</p>
<p>But what if a storm hits and Sally&#8217;s Internet goes down? No prob, her commits will just go on her local repository (since she has a full branch that works all by itself) until she&#8217;s back online and runs &#8216;bzr merge&#8217; to sync up her local repository with the main branch.</p>
<p>Hope that clears things up.  I know I&#8217;ve learned a lot.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/the-difference-between-a-working-tree-repository-branch-and-checkout-in-the-bazaar-version-control-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fixed my site</title>
		<link>http://www.likesalmondesign.com/fixed-my-site/</link>
		<comments>http://www.likesalmondesign.com/fixed-my-site/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 06:05:51 +0000</pubDate>
		<dc:creator>Ammon</dc:creator>
				<category><![CDATA[Musings]]></category>

		<guid isPermaLink="false">http://www.likesalmondesign.com/?p=248</guid>
		<description><![CDATA[LastPass, my fave password manager, was doing funny things with WordPress, reposting and deleting my blog posts.  Weird.  Fixed now.
]]></description>
			<content:encoded><![CDATA[<p><a href="https://lastpass.com/" title="">LastPass</a>, my fave password manager, was doing funny things with WordPress, reposting and deleting my blog posts.  Weird.  Fixed now.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.likesalmondesign.com/fixed-my-site/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
