<?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>That's Funny... &#187; writing</title>
	<atom:link href="http://staff.washington.edu/rec3141/wordpress/archives/tag/writing/feed" rel="self" type="application/rss+xml" />
	<link>http://staff.washington.edu/rec3141</link>
	<description>the website of Eric Collins, grad student</description>
	<lastBuildDate>Wed, 11 Nov 2009 18:25:46 +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>Using Bazaar version control system for my Ph.D. Thesis</title>
		<link>http://staff.washington.edu/rec3141/wordpress/archives/513</link>
		<comments>http://staff.washington.edu/rec3141/wordpress/archives/513#comments</comments>
		<pubDate>Thu, 30 Apr 2009 21:58:15 +0000</pubDate>
		<dc:creator>eric</dc:creator>
				<category><![CDATA[none]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[science]]></category>
		<category><![CDATA[writing]]></category>

		<guid isPermaLink="false">http://staff.washington.edu/rec3141/?p=513</guid>
		<description><![CDATA[I wrote my last paper in LaTeX and the submitted file was named &#8216;paper_v26&#8242;. Various other files with similar names are floating around and it is a chore to keep up with which is the latest version when they are split between two computers and three operating systems.  For my thesis I decided to [...]]]></description>
			<content:encoded><![CDATA[<p>I wrote my last paper in LaTeX and the submitted file was named &#8216;paper_v26&#8242;. Various other files with similar names are floating around and it is a chore to keep up with which is the latest version when they are split between two computers and three operating systems.  For my thesis I decided to make things easier. I tried using subversion. I really did. But it just wasn&#8217;t doing it for me. So I tried Bazaar and got it to work intuitively in just a few minutes. So that&#8217;s what I&#8217;m going to start using now. To help get you (and me) started, here&#8217;s a distilled version of <a href="http://doc.bazaar-vcs.org/latest/en/mini-tutorial/index.html">this tutorial</a> and <a href="http://doc.bazaar-vcs.org/latest/en/user-guide/index.html">this user guide</a>). Requirements for my setup: 1) unfrightened by the command line; 2) SSH daemon running on central repository host.</p>
<p>Briefly, the way it works is that you set up a central repository for your files, preferably on some computer that is connected to the internet all the time, even better if it has a static domain name. Into this repository you place the files you want to be version controlled. This works best for plain text files (like LaTeX source files) because it is simple to compare versions if necessary, but it will also work for binary files like OpenOffice documents (which have built-in version control, if you didn&#8217;t know) and images. If you are working on the computer with the central repository, great, just make sure to update the files each time before you work on them and commit them each time you are done. You could probably write a cron job to do this for you if you are liable to forget. If you are working on a different computer, you just have to ask the central repository for the files and it will give you the latest versions. After you edit them you have to commit the changes to a local repository, which can then be merged with the central repository.</p>
<p>To get started:</p>
<ul>
<li>Install <a href="http://bazaar-vcs.org/">bzr</a></li>
<li>Make a new directory and copy the files you&#8217;ll be starting with into it. If you&#8217;re using LaTeX, you&#8217;ll probably only want the files that are not compiled, e.g. *.tex, *.bib, *.bst and NOT *.aux, *.log, etc.</li>
<li>Tell bzr who you are:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr whoami &quot;me &lt;me@me.com&gt;&quot;</div></div>
</li>
<li>Initialize tracking in this directory:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr init</div></div>
</li>
<li>Add all the files in the directory, recursively:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr add</div></div>
</li>
<li>Commit the files to the first revision. Make sure to add a message (-m), or you might find yourself in &#8216;vi&#8217; (shudder). Do this after every work session.
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr commit -m &quot;very important message&quot;</div></div>
</li>
<li>Next time you work from this computer with the central repository, make sure you are using the most recent version:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr update</div></div>
<li>The first time you work on your project from a different computer, pull a new copy via ssh from that computer:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr branch sftp://user@host.domain:port/location/to/remote/files /new/local/location</div></div>
</li>
<li>In future sessions, pull new edits from the central repository before working on them:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr merge sftp://user@host.domain:port/location/to/remote/files<br />
bzr commit -m &quot;merge from parent&quot;</div></div>
</li>
<li>To submit edits to the central repository, first commit them locally, then push edits via ssh to that computer:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr commit -m &quot;local changes&quot;<br />
bzr push sftp://user@host.domain:port/location/to/remote/files</div></div>
</li>
</ul>
<p>Some further usage, much of which is intuitive because it works just like regular unix commands:</p>
<ul>
<li>Clean up a directory by deleting non-versioned files and reloading the last commit:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr commit<br />
&nbsp;rm *<br />
bzr revert</div></div>
</li>
<li>Make a new versioned subdirectory:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr mkdir ./newdirectory</div></div>
</li>
<li>Add a new file to the repository:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr add ./newfile.txt</div></div>
</li>
<li>Remove a file from the repository:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr rm ./oldfile.txt</div></div>
</li>
<li>Rename or move a file or directory in the repository:
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">bzr mv oldfile.txt newfile.txt</div></div>
</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://staff.washington.edu/rec3141/wordpress/archives/513/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
