<?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>Excursus &#187; subversion</title>
	<atom:link href="http://markelikalderon.com/category/version-control/subversion/feed/" rel="self" type="application/rss+xml" />
	<link>http://markelikalderon.com</link>
	<description>Philosophy and Text</description>
	<lastBuildDate>Tue, 27 Dec 2011 23:01:50 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.4</generator>
		<item>
		<title>Cornerstone</title>
		<link>http://markelikalderon.com/2008/07/01/cornerstone/</link>
		<comments>http://markelikalderon.com/2008/07/01/cornerstone/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 00:49:05 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Hybrid Application]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/07/01/cornerstone/</guid>
		<description><![CDATA[Previewing at 1.0, Cornerstone, a GUI Subversion front end has been released. Daring Fireball, as ever, with the wry commentary: It strikes me as an odd coincidence that two serious Subversion clients would debut at a time when many developers are starting to switch away from Subversion to distributed revision control systems such as Git [...]]]></description>
			<content:encoded><![CDATA[<p>Previewing at 1.0, <a href="http://www.zennaware.com/cornerstone/">Cornerstone</a>, a GUI <a href="http://subversion.tigris.org/" title="subversion.tigris.org">Subversion</a> front end has been released.</p>

<p><a href="http://daringfireball.net/" title="Daring Fireball">Daring Fireball</a>, as ever, with the wry commentary:</p>

<blockquote>
  <p>It strikes me as an odd coincidence that two serious Subversion clients would debut at a time when many developers are starting to switch away from Subversion to distributed revision control systems such as <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a> and <a href="http://www.selenic.com/mercurial/" title="Mercurial - Mercurial">Mercurial</a>.</p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/07/01/cornerstone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Subversion 1.5</title>
		<link>http://markelikalderon.com/2008/06/25/subversion-15/</link>
		<comments>http://markelikalderon.com/2008/06/25/subversion-15/#comments</comments>
		<pubDate>Tue, 24 Jun 2008 23:39:02 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/06/25/subversion-15/</guid>
		<description><![CDATA[Subversion 1.5 is out. This is a major release that promised to address many of the problems with merging. New features include: Merge tracking (foundational) Sparse checkouts (via new &#8211;depth option) Interactive conflict resolution Changelist support Relative URLs, peg revisions in svn:externals Cyrus SASL support for ra_svn and svnserve Improved support for large deployments on [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://subversion.tigris.org/" title="subversion.tigris.org">Subversion</a> 1.5 is <a href="http://subversion.tigris.org/svn_1.5_releasenotes.html">out</a>. This is a major release that promised to address many of the <a href="http://markelikalderon.com/blog/2007/08/02/the-problem-with-merging/">problems with merging</a>. New features include:</p>

<ul>
<li>Merge tracking (foundational)</li>
<li>Sparse checkouts (via new &#8211;depth option)</li>
<li>Interactive conflict resolution</li>
<li>Changelist support</li>
<li>Relative URLs, peg revisions in svn:externals</li>
<li>Cyrus SASL support for ra_svn and svnserve</li>
<li>Improved support for large deployments on FSFS, via sharding</li>
<li>Improved FSFS optimizability, via immutable file isolation</li>
<li>WebDAV transparent write-through proxy</li>
<li>Improvements to copy and move</li>
<li>Speed improvements, cancellation response improvements</li>
<li>Easier to try experimental ra_serf DAV access module</li>
<li>API changes, improvements, and much language bindings work</li>
<li>More than 150 new bug fixes, enhancements</li>
</ul>

<p>If you are still using subversion, or if subversion suits your needs better than distributed alternatives, then this is a must have release.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/06/25/subversion-15/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Versions Not Vaporware After All</title>
		<link>http://markelikalderon.com/2008/06/05/versions-not-vaporware-after-all/</link>
		<comments>http://markelikalderon.com/2008/06/05/versions-not-vaporware-after-all/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 00:50:40 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Versions]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/?p=408</guid>
		<description><![CDATA[Check it out. Will try to review it later. But one interesting feature is its integration with Beanstalk that provides one 20MB Subversion repository for free. Smart move for the casual user who might still be intimidated by the command line interface.]]></description>
			<content:encoded><![CDATA[<p>Check it <a href="http://www.versionsapp.com/">out</a>.</p>

<p>Will try to review it later. But one interesting feature is its integration with <a href="http://beanstalkapp.com/">Beanstalk</a> that provides one 20MB <a href="http://subversion.tigris.org/">Subversion</a> repository for free. Smart move for the casual user who might still be intimidated by the command line interface.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/06/05/versions-not-vaporware-after-all/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Migrating from Subversion to Git</title>
		<link>http://markelikalderon.com/2008/06/05/migrating-from-subversion-to-git/</link>
		<comments>http://markelikalderon.com/2008/06/05/migrating-from-subversion-to-git/#comments</comments>
		<pubDate>Thu, 05 Jun 2008 00:43:48 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Text]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/?p=407</guid>
		<description><![CDATA[Having decided to try out Git, I was excited to learn that Git could interface with Subversion repositories via git-svn. git-svn provides a bidirectional flow of changesets from a branch of a Subversion repository and any number of branches in a Git repository. The problem that I soon encountered should be evident from this description&#8212;you [...]]]></description>
			<content:encoded><![CDATA[<p>Having decided to try out <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a>, I was excited to learn that Git could interface with <a href="http://subversion.tigris.org/" title="subversion.tigris.org">Subversion</a> repositories via <a href="http://www.kernel.org/pub/software/scm/git/docs/git-svn.html">git-svn</a>. git-svn provides a bidirectional flow of changesets from a branch of a Subversion repository and any number of branches in a Git repository. The problem that I soon encountered should be evident from this description&#8212;you inherit the limitations of the Subversion repository. A rewrite of a paper for the <a href="http://www.ejp.dept.shef.ac.uk/" title="European Journal of Philosophy Web Page">European Journal of Philosophy</a> provided the opportunity to start a Git repository and work purely with Git. This was a revealing exercise that allowed me to shed some habits engrained from being a long-time Subversion user.</p>

<p>I am now in the process of transitioning my work over to Git. One salient difference is that, with Subversion, I kept all my mission-critical text files in a single structured directory; Git, however, wants to find relationships among everything in the repository, so it is important to keep unrelated projects in different repositories. (Fortunately setting up Git repositories is a snap.) This is important to bear in mind when migrating from Subversion. If, like me, you maintained a single Subversion repository with separate subdirectories for each of your projects, you need to migrate each of these into separate Git repositories.</p>

<p>Here is how I began my migration.</p>

<p>I decided to start with my <a href="http://www.roaringpenguin.com/products/remind" title="Remind | Roaring Penguin">remind</a> files:</p>

<pre class="textmate-source"><span class="source source_shell">$ mkdir -p /tmp/remind
$ cd <span class="keyword keyword_operator keyword_operator_pipe keyword_operator_pipe_shell">!</span>$
$ git-svn clone http://markelikalderon.com/svn/TheHub/Remind --no-metadata</span></pre>

<p>The command:</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">git-svn clone</span></span></pre>

<p>calls init, which creates a new Git repository, and fetch, which fetches the contents and history of the directory. git-svn clone takes the options of both init and fetch. One useful option is &#8211;no-metadata which strips out the no longer needed Subversion metadata.</p>

<p>Now I needed to configure my new Git repository. I began by creating a file and opening it in my text editor, <a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X">TextMate</a>:</p>

<pre class="textmate-source"><span class="source source_shell">$ touch <span class="keyword keyword_operator keyword_operator_tilde keyword_operator_tilde_shell">~</span>/users.txt <span class="keyword keyword_operator keyword_operator_list keyword_operator_list_shell">&amp;&amp;</span> mate <span class="keyword keyword_operator keyword_operator_tilde keyword_operator_tilde_shell">~</span>/users.txt</span></pre>

<p>I then added the following to users.txt:</p>

<pre class="textmate-source"><span class="text text_plain"><span class="meta meta_paragraph meta_paragraph_text">kalderon PhilGeek &lt;eli@markelikalderon.com&gt;</span></span></pre>

<p>&#8216;kalderon&#8217; being my Subversion user name and &#8216;PhilGeek&#8217; being my Git user name. There should be one line each with this syntax for each of the users. Now I was ready to configure git:</p>

<pre class="textmate-source"><span class="source source_shell">% git config svn.authorsfile <span class="keyword keyword_operator keyword_operator_tilde keyword_operator_tilde_shell">~</span>/users.txt</span></pre>

<p>The final step is to clone this new Git repository to rid ourselves of any remaining svn cruft. I created a new <a href="http://github.com/" title="Secure Git hosting and collaborative development &mdash; GitHub">GitHub</a> project and then within the Git repository:</p>

<pre class="textmate-source"><span class="source source_shell">$ git remote add origin git@github.com:PhilGeek/remind.git
$ git push origin master</span></pre>

<p>Finally, I cloned the remote repository into the directory where my remind files were to live locally and deleted the /tmp/remind directory.</p>

<p>Not too bad. But you might consider automating the process with a shell or ruby script, if this needs doing several times over.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/06/05/migrating-from-subversion-to-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Versions or Vaporware?</title>
		<link>http://markelikalderon.com/2008/06/02/versions-or-vaporware/</link>
		<comments>http://markelikalderon.com/2008/06/02/versions-or-vaporware/#comments</comments>
		<pubDate>Mon, 02 Jun 2008 02:09:56 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Hybrid Application]]></category>
		<category><![CDATA[Versions]]></category>
		<category><![CDATA[svnX]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/06/02/versions-or-vaporware/</guid>
		<description><![CDATA[Versions, the GUI Mac subversion client is still vaporware, but there is a review of the prerelease beta at Theocacao. Though I am shifting over to Git, I am still curious how Versions will stack up against svnX.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.versionsapp.com/">Versions</a>, the GUI Mac subversion client is <a href="http://markelikalderon.com/blog/2007/06/17/versions/">still</a> vaporware, but there is a <a href="http://theocacao.com/document.page/576">review</a> of the prerelease beta at <a href="http://theocacoa.com">Theocacao</a>. Though I am shifting over to <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a>, I am still curious how Versions will stack up against <a href="http://www.lachoseinteractive.net/en/community/subversion/svnx/" title="La Chose : web agency and software maker – agence web et développement de logiciels">svnX</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/06/02/versions-or-vaporware/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Running VC</title>
		<link>http://markelikalderon.com/2008/03/23/running-vc/</link>
		<comments>http://markelikalderon.com/2008/03/23/running-vc/#comments</comments>
		<pubDate>Sun, 23 Mar 2008 00:13:31 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[UNIX]]></category>
		<category><![CDATA[XeTeX]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/03/23/running-vc/</guid>
		<description><![CDATA[After posting about the version control bundle, I gave it a test spin. The version control bundle requires GNU awk. If gawk is not installed on your *nix system, this script will do it for you: #!/bin/sh # # installgawk.sh # # A bash script to install the latest version of GNU awk. Be sure [...]]]></description>
			<content:encoded><![CDATA[<p>After <a href="http://markelikalderon.com/blog/2008/03/12/the-version-control-bundle/">posting</a> about <a href="http://www.ctan.org/tex-archive/support/vc/">the version control bundle</a>, I gave it a test spin.</p>

<p>The version control bundle requires <a href="http://www.gnu.org/software/gawk/" title="Gawk - GNU Project - Free Software Foundation (FSF)">GNU awk</a>. If gawk is not installed on your *nix system, this script will do it for you:</p>

<pre><code>#!/bin/sh
#
# installgawk.sh
#
# A bash script to install the latest version of GNU awk. Be sure to set the variables to the desired values. 
#
# http://www.gnu.org/software/gawk/
#
# Mark Eli Kalderon 2008-03-22

# Gawk. Change to the desired version if necessary
VER="3.1.6"
GAWK="gawk-${VER}"

# Build directories. Change to the desired directories if necessary.
GBLDDIR=/var/tmp/${GAWK}-build

# Create gawk build directory, but save source files if they exist.
test -d ${GBLDDIR} || mkdir ${GBLDDIR}
test -d ${GBLDDIR}/${GAWK} &amp;&amp; /bin/rm -rf ${GBLDDIR}/${GAWK}
cd $GBLDDIR

# Download and unpack gawk source.
curl http://ftp.gnu.org/gnu/gawk/${GAWK}.tar.gz -O
tar -xvzf ${GAWK}.tar.gz
cd ${GAWK}

# Configure and build gawk.
./configure
make
make check

# Install gawk (in /usr/local/bin/). Will prompt for password.
sudo make install
</code></pre>

<p>As of version 0.3, the vc bundle supports <a href="http://bazaar-vcs.org/">bazaar</a>, <a href="http://git.or.cz/" title="Git - Fast Version Control System">git</a>, and <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a> and runs on Windows and unices. Within the vc directory there are subdirectories for each of these cases:</p>

<ul>
<li>bzr-unix/</li>
<li>bzr-windows/</li>
<li>git-unix/</li>
<li>git-windows/</li>
<li>svn-unix/</li>
<li>svn-windows/</li>
</ul>

<p>Each of these subdirectories contains a pair of scripts. As I am on OS X and wanted to see how well this would work with git, I used the scripts in git-unix/:</p>

<ul>
<li>vc</li>
<li>vc-git.awk</li>
</ul>

<p>Copy these to the root directory of your repository. vc is a shell script that extracts version control information and writes it to a new file, vc.tex. vc does this by calling vc-git.awk to process the output of git status and git log. To use these scripts, put the following in the preamble of your LaTeX document:</p>

<pre><code>\immediate\write18{sh ./vc}
\input{vc}
</code></pre>

<p>\write18 allows you to call shell scripts when running LaTeX. Most TeX installations has \write18 disabled by default for security reasons. That&#8217;s a good thing. Rather than enabling this globally, you can enable this on an as needed basis, by running pdflatex or xelatex with the -shell-escape argument.</p>

<p>vc.tex defines the following macros which can now be used in your LaTeX document:</p>

<ul>
<li><strong>\VCRevision</strong> current (maximum) working copy revision number </li>
<li><strong>\VCRevisionMod</strong> as \VCRevision, but with an additional note if the working copy contains modiﬁed ﬁles </li>
<li><strong>\VCAuthor</strong> author of the last check-in operation </li>
<li><strong>\VCDateRAW</strong> date of last check-in in native format of the VCS software </li>
<li><strong>\VCDateISO</strong> date of last check-in in ISO format YYYY-MM-DD </li>
<li><strong>\VCDateTEX</strong> date of last check-in in TeX format YYYY/MM/DD </li>
<li><strong>\VCTime</strong> time of last check-in </li>
<li><strong>\VCModifiedText</strong> contains the note shown in macro \VCRevisionMod if there were modiﬁed ﬁles. This macro can be redeﬁned by the user. </li>
<li><strong>\VCModified</strong> 0 if there are no modiﬁed ﬁles in the working copy 
directory; 1 or 2 if there are modiﬁed ﬁles. In general you 
don’t need this macro.</li>
</ul>

<p>These macros can be called wherever appropriate. I wanted my version control information discretely tucked away in a footer:</p>

<pre><code>\usepackage{fancyhdr}
\lfoot{\tiny{Revision: \VCRevision ; Author: \VCAuthor ; Date: \VCDateISO}}
\cfoot{}
\rfoot{}
</code></pre>

<p>The result:</p>

<p><img src="http://markelikalderon.com/wp-content/uploads/2008/03/vc-output.png" alt="vc output" /></p>

<p>If you want the version control information in draft mode only, Stephan Hennig, vc bundle&#8217;s maintainer, suggests using the <a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/ifdraft.html" title="The TeX Catalogue OnLine, Entry for ifdraft, Ctan Edition">ifdraft</a> package.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/03/23/running-vc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Version Control Bundle</title>
		<link>http://markelikalderon.com/2008/03/12/the-version-control-bundle/</link>
		<comments>http://markelikalderon.com/2008/03/12/the-version-control-bundle/#comments</comments>
		<pubDate>Wed, 12 Mar 2008 17:56:47 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2008/03/12/the-version-control-bundle/</guid>
		<description><![CDATA[CTAN has an interesting new package, the vc (version control) bundle. The vc bundle addresses some problems with earlier version control packages such as svn-multi (discussed here). First, earlier version control packages track version control information only for the LaTeX source. So, if you have a graphic, say, produced by an independent application, and you [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.ctan.org/" title="the Comprehensive TeX Archive Network">CTAN</a> has an interesting new package, <a href="http://www.ctan.org/tex-archive/help/Catalogue/entries/vc.html">the vc (version control) bundle</a>. The vc bundle addresses some problems with earlier version control packages such as <a href="http://www.ctan.org/tex-archive/macros/latex/contrib/svn-multi/" title="CTAN: directory: /tex-archive/macros/latex/contrib/svn-multi">svn-multi</a> (discussed <a href="http://markelikalderon.com/blog/2007/04/14/latex-and-subversion/">here</a>). First, earlier version control packages track version control information only for the LaTeX source. So, if you have a graphic, say, produced by an independent application, and you update it, this won&#8217;t be reflected in the version control information embedded in your LaTeX document. Second, many such packages rely on keyword substitution&#8212;an approach inapplicable to distributed version control systems like <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a> that lack keywords. The vc bundle addresses both these concerns and currently supports <a href="http://subversion.tigris.org/" title="subversion.tigris.org">Subversion</a> and Git. Its maintainer, Stephan Hennig, claims that other version control systems will be supported in the future. Will post back about this when I have road tested it.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2008/03/12/the-version-control-bundle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Getting Git</title>
		<link>http://markelikalderon.com/2007/12/30/getting-git/</link>
		<comments>http://markelikalderon.com/2007/12/30/getting-git/#comments</comments>
		<pubDate>Sun, 30 Dec 2007 02:11:32 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/12/30/getting-git/</guid>
		<description><![CDATA[While I have been a happy subversion user, there are some areas that are a continual source of frustration. No commits offline. Limited merging facilities. (See my earlier post.) The limitations on merging is the serious issue for me. Prose production presents opportunities for merging that subverion cannot handle (at least at present). Distributed version [...]]]></description>
			<content:encoded><![CDATA[<p>While I have been a happy <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a> user, there are some areas that are a continual source of frustration. No commits offline. Limited merging facilities. (See my earlier <a href="http://markelikalderon.com/blog/2007/08/02/the-problem-with-merging/">post</a>.) The limitations on merging is the serious issue for me. Prose production presents opportunities for merging that subverion cannot handle (at least at present). Distributed version control systems such as <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a> or <a href="http://www.selenic.com/mercurial/" title="Mercurial - Mercurial">Mercurial</a> solve both these problems. Centralized version control systems like subversion are a good model for me since I work on two machines (at home and at work). This can, of course, be mimicked with distributed version control systems, but I am also reluctant to abandon my subversion repository and am not sure if I trust the extant migration scripts. However, Git now includes the git-svn command that allows you to use Git locally with a centralized subversion repository. <a href="http://drnicwilliams.com/">Dr Nic</a> explains how in this <a href="http://drnicwilliams.com/2007/11/22/going-offline-without-your-favourite-subversion-repository/">post</a>. I will be exploring this in the New Year. So I have installed Git. Here is the bash script that I used to install Git on OS X <strong>Leopard</strong>:</p>

<pre><code>#!/bin/sh
#
# installgit.sh
#
# A bash script to install the latest version of Git. Be sure to set the variables to the desired values. 
#
# http://git.or.cz/
#
# Mark Eli Kalderon 2008-03-15

# Git. Change to the desired versions if necessary
VER="1.5.4.4"
GIT="git-${VER}"
GITMAN="git-manpages-${VER}"

# Build directories. Change to the desired directories if necessary.
GBLDDIR=/var/tmp/${GIT}-build

# Create Git build directory, but save source files if they exist.
test -d ${GBLDDIR} || mkdir ${GBLDDIR}
test -d ${GBLDDIR}/${GIT} &amp;&amp; /bin/rm -rf ${GBLDDIR}/${GIT}
cd $GBLDDIR

# Download and unpack Git source.
curl http://kernel.org/pub/software/scm/git/${GIT}.tar.gz -O
tar -xvzf ${GIT}.tar.gz
cd ${GIT}

# Configure and build Git.
./configure --prefix=/usr/local 
make

# Install Git. Will prompt for password.
sudo make install

# Install documentation. Will prompt for password.
curl -O http://kernel.org/pub/software/scm/git/${GITMAN}.tar.bz2
sudo tar xjv -C /usr/local/share/man -f ${GITMAN}.tar.bz2
</code></pre>

<p>Call the script installgit.sh and run it with:</p>

<pre><code>$ ./installgit.sh
</code></pre>

<p><strike>Installing Git with <em>documentation</em> is another matter. The brave should consult this <a href="http://wincent.com/knowledge-base/Setting_up_the_Git_documentation_build_chain_on_Mac_OS_X_Leopard">document</a>. The timid might content themselves with the online <a href="http://www.kernel.org/pub/software/scm/git/docs/user-manual.html">Git User&#8217;s Manual</a>.</strike> <strong>Updated</strong> script to include <a href="http://subtlegradient.com">SubtleGradient</a>&#8217;s sane instructions on how to install <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a> documentation.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/12/30/getting-git/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>LaTeX, Subversion, and Hygiene</title>
		<link>http://markelikalderon.com/2007/08/02/latex-subversion-and-hygiene/</link>
		<comments>http://markelikalderon.com/2007/08/02/latex-subversion-and-hygiene/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 22:01:17 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/08/02/latex-subversion-and-hygiene/</guid>
		<description><![CDATA[Typesetting a LaTeX source generates a lot of helper files, like *.aux and *.log. A quick look through my directory of LaTeX files reveals the following kinds of files: *.aux *.log *.out *.pdfsync *.bbl *.blg *.brf *.svn *.dvi *.toc *.bak *.nav *.snm (Your helper files may differ depending on the programs you are running. Thus [...]]]></description>
			<content:encoded><![CDATA[<p>Typesetting a LaTeX source generates a lot of helper files, like *.aux and *.log. A quick look through my directory of LaTeX files reveals the following kinds of files:</p>

<pre><code>*.aux
*.log
*.out
*.pdfsync
*.bbl
*.blg
*.brf
*.svn
*.dvi
*.toc
*.bak
*.nav
*.snm
</code></pre>

<p>(Your helper files may differ depending on the programs you are running. Thus for example, *.bbl files are generated by BibTeX and *.nav files are generated by Beamer. If you are using neither program, they won&#8217;t show up on your system.) If you are keeping your LaTeX source in version control with subversion, you don&#8217;t want to commit these to your repository. But then, running svn status returns all these &#8220;?&#8221;s since subversion doesn&#8217;t know about these files. If there are a lot of them, this can make it hard to to spot the files that genuinely need to be added. Wouldn&#8217;t it be great if there were a way that subversion could just ignore these? Well, here are two.</p>

<p><strong>Method One</strong>: Put the list of auxiliary files in a text file called temp. Then in the directory containing your LaTeX source run:</p>

<pre><code>svn propset svn:ignore . -F temp
</code></pre>

<p>After this subversion will ignore these files in the directory and stop bugging you about files that you don&#8217;t care about. Pretty cool. But it works on a directory by directory basis. If you have a lot of directories of LaTeX files, then this can get tedious.</p>

<p><strong>Method Two</strong>: The second method makes this change globally. Subversion comes with a config file. Two actually: /etc/subversion/config and ~/subversion/config. The former configures options for the use of subversion for all users, the latter configures options for the use of subversion on a user by user basis. Let&#8217;s modify ~/subversion/config. The config file is divided into sections. Be sure to read ~/subversion/README.txt for the syntax of the config file. In the section [miscellany] I have the following:</p>

<pre><code>global-ignores = *.o *.lo *.la #*# .*.rej *.rej .*~ *~ .#* .DS_Store *.aux *.log *.out *.pdfsync _rev.tex *.bbl *.blg *.brf *.svn *.dvi *.toc *.nav *.toc *.bak *.snm
</code></pre>

<p>These files will now be ignored in all of your working copies.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/08/02/latex-subversion-and-hygiene/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Problem with Merging</title>
		<link>http://markelikalderon.com/2007/08/02/the-problem-with-merging/</link>
		<comments>http://markelikalderon.com/2007/08/02/the-problem-with-merging/#comments</comments>
		<pubDate>Thu, 02 Aug 2007 14:40:12 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/08/02/the-problem-with-merging/</guid>
		<description><![CDATA[Subversion, a free and open source version control system, is great for keep track of the development of your LaTeX documents. As cool as it is, though, it has its limitations. One serious limitation is branch management. Suppose you have a document that you are writing and that you are considering restructuring that document. Suppose, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://subversion.tigris.org/" title="subversion.tigris.org">Subversion</a>, a free and open source version control system, is great for keep track of the development of your LaTeX documents. As cool as it is, though, it has its limitations. One serious limitation is branch management.</p>

<p>Suppose you have a document that you are writing and that you are considering restructuring that document. Suppose, further, you are unsure the restructuring will come off in the end. If the document is being kept in a subversion repository, then it is natural to create a <em>branch</em>. The <em>trunk</em> is the directory where the document in its main or current line of development is being kept. The branch is the directory where the alternaitive line of development is being kept. A minimal example of the directory structure would look like this:</p>

<pre><code>|-- mylatexproject\
    |-- trunk\
        |-- mydocument.tex
    |-- branch\
        |-- mydocument.tex
</code></pre>

<p>(The diagram is in one way misleading&#8212;the trunk and branch directories can contain multiple files.) To create a branch, simply copy trunk\mydocument.tex into branch\ (using the subversion commands, so that subversion knows what&#8217;s happening).</p>

<p>If after restructuring your document, you are happy with the changes, then you <em>merge</em> these changes into the trunk. This is done with the command:</p>

<pre><code>svn merge
</code></pre>

<p>This command does two things:</p>

<ol>
<li>It compares the differences between two files</li>
<li>It applies the differences to a location in the working copy</li>
</ol>

<p>The command thus takes three arguments. The first two arguments are the locations of the files to be compared (where these can be specified, for example, with their urls in the repository), and the path of the file in the working copy where these changes are to be applied. Notice that the changes are applied to a file in your working copy, so you will need to commit these changes after the merge. For more information see the <a href="http://svnbook.red-bean.com/" title="Version Control with Subversion">subversion book</a> or use the command:</p>

<pre><code>svn help merge
</code></pre>

<p>Sounds easy. It is. But there are limitations to subversion&#8217;s merge command. Let me discuss two.</p>

<p>The first limitation becomes apparent when you repeatedly merge changes. It can happen that you merge the same change twice over. Sometimes this is not a problem. If subversion sees that the relevant file already has the relevant change then it does nothing. But suppose the change has been made <em>but has been further modified.</em> Merging a second time will produce a conflict. The problem arises because subversion doesn&#8217;t remember what changes have already been merged into the trunk and so attempts to merge these again.</p>

<p>The second limitation is the inability to exclude a previous revision form being merged. This is particularly relevant to writers. Suppose you are writing a paper and have been invited to give a talk based on that material. It is natural to create a branch. It is also natural to eliminate some things from the talk like footnotes. You do this and commit the change. But suppose in writing the talk you hit upon things that should be in the paper. Suppose commit these changes as well. You would now want to merge these changes into the paper, which is in the trunk. However, you cannot tell svn merge to merge only those changes, and to not merge the previous changes. So with svn merge you would end up losing the footnotes in the original paper.</p>

<p>It is partly for these reasons that <a href="http://markelikalderon.com/blog/2007/05/18/parting-observation/">Linus Torvalds regards subversion as broken by design</a>. It is true that these problems do not arise in distributed models of version control such as <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a> and <a href="http://selenic.com/mercurial" title="Mercurial - Mercurial">Mercurial</a>.</p>

<p>Fortunately, for subversion users, these and related limiations are being addressed in the next major releas of subversion (1.5.0). But if you cannot wait until then, the script <a href="http://www.orcaware.com/svn/wiki/Svnmerge.py" title="Svnmerge.py - SubversionWiki">svnmerge.py</a> can help. svnmerge.py is a tool for automatic branch management that addresses these 
problems. It remembers which changes have already been merged and does the right thing by only merging the new changes. And it lists changes available for merging so that some, but not all, of these can be merged. I have been playing around with svnmerge.py, and will post more about is use.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/08/02/the-problem-with-merging/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Bleg. Blech!</title>
		<link>http://markelikalderon.com/2007/07/18/bleg-blech/</link>
		<comments>http://markelikalderon.com/2007/07/18/bleg-blech/#comments</comments>
		<pubDate>Wed, 18 Jul 2007 00:48:41 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/07/18/bleg-blech/</guid>
		<description><![CDATA[I hate blegging, but I have been asked to write an article for PracTeX on LaTeX and subversion. Most of this material is drawn from some of my recent posts, though rewritten and reorganized. Any comments would be greatly appreciated. The present draft can be found here.]]></description>
			<content:encoded><![CDATA[<p>I hate blegging, but I have been asked to write an article for <a href="http://www.tug.org/pracjourn/" title="The PracTeX Journal - TeX Users Group">PracTeX</a> on LaTeX and subversion. Most of this material is drawn from some of my recent posts, though rewritten and reorganized. Any comments would be greatly appreciated. The present draft can be found <a href='http://markelikalderon.com/wp-content/uploads/2007/07/mark.pdf' title='mark.pdf'>here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/07/18/bleg-blech/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Versions</title>
		<link>http://markelikalderon.com/2007/06/17/versions/</link>
		<comments>http://markelikalderon.com/2007/06/17/versions/#comments</comments>
		<pubDate>Sun, 17 Jun 2007 22:44:02 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Hybrid Application]]></category>
		<category><![CDATA[Versions]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svnX]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/06/17/versions/</guid>
		<description><![CDATA[Subversion is a great command line utility waiting for decent GUI. While the GUI&#8217;s supplanting the command line represents the triumph of the Image over the Word, the GUI has its place&#8212;even in text editing. With respect to subversion, there&#8217;s cognitive utility in being able to visualize the structure of your repository or working copy. [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://markelikalderon.com/wp-content/uploads/2007/06/sunset.jpg' alt='Versions Logo' /></p>

<p><a href="http://subversion.tigris.org/" title="subversion.tigris.org">Subversion</a> is a great command line utility waiting for decent <a href="http://en.wikipedia.org/wiki/Graphical_user_interface">GUI</a>. While the GUI&#8217;s supplanting the command line represents the <a href="http://markelikalderon.com/blog/2006/09/27/the-word/">triumph of the Image over the Word</a>, the GUI has its place&#8212;even in text editing. With respect to subversion, there&#8217;s cognitive utility in being able to visualize the structure of your repository or working copy. While there are GUI front ends to subversion, none are perfect. While on OS X <a href="http://www.subversionx.com/" title="Subversi&oacute;n X - Hasta la Muerte">svnX</a> works reasonably well, a compelling solution to graphically representing subversion repositories and working copies has yet to be found. The ideal <a href="http://markelikalderon.com/blog/2006/11/02/atpm-on-activity-monitor/">hybrid app</a> has yet to be written. (The situation is not unlike MP3 players before the iPod.) Fortunately, competition is good, and competition is emerging on the Mac platform. <a href="http://www.versionsapp.com/">Versions</a> promises a clean look and simple approach without compromising on functionality. A collaboration between João Pavão and <a href="http://www.madebysofa.com">madebysofa.com</a>, the beta of Versions is soon ready for a private trial. You can sign up for the private beta at <a href="http://www.versionsapp.com">versionsapp.com</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/06/17/versions/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Parting Observation</title>
		<link>http://markelikalderon.com/2007/05/18/parting-observation/</link>
		<comments>http://markelikalderon.com/2007/05/18/parting-observation/#comments</comments>
		<pubDate>Fri, 18 May 2007 14:48:44 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[git]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/05/18/parting-observation/</guid>
		<description><![CDATA[The current series of posts about subversion: Subversion Subversion, Serendipity, and Discipline Subversion and the Single User LaTeX and Subversion Circle Six Subversion Subverting Difference Subversion and TextMate have ended, but I wanted to make one last observation. For authors producing complex documents whose development they need to track, what&#8217;s important is version control, not [...]]]></description>
			<content:encoded><![CDATA[<p>The current series of posts about <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a>:</p>

<ul>
<li><p><a href="http://markelikalderon.com/blog/2007/03/29/subversion/">Subversion</a></p></li>
<li><p><a href="http://markelikalderon.com/blog/2007/03/30/subversion-serendipity-and-discipline/">Subversion, Serendipity, and Discipline</a></p></li>
<li><p><a href="http://markelikalderon.com/blog/2007/04/14/subversion-and-the-single-user/">Subversion and the Single User</a></p></li>
<li><p><a href="http://markelikalderon.com/blog/2007/04/14/latex-and-subversion/">LaTeX and Subversion</a></p></li>
<li><p><a href="http://markelikalderon.com/blog/2007/04/18/circle-six-subversion/">Circle Six Subversion</a></p></li>
<li><p><a href="http://markelikalderon.com/blog/2007/04/28/subverting-difference/">Subverting Difference</a></p></li>
<li><p><a href="http://markelikalderon.com/blog/2007/05/11/subversion-and-textmate/">Subversion and TextMate</a></p></li>
</ul>

<p>have ended, but I wanted to make one last observation. For authors producing complex documents whose development they need to track, what&#8217;s important is version control, not necessarily subversion. There are a variety of version control systems on the market, and while subversion suits my present needs, others may suit your needs better.</p>

<p>One important conceptual difference between version control systems is whether they use a centralized or distributed model. Subversion uses a centralized model. There is a central repository from which local working copies may be checked out. Intriguingly, other version control systems use a distributed model. <a href="http://git.or.cz/" title="Git - Fast Version Control System">Git</a> and <a href="http://www.selenic.com/mercurial/" title="Mercurial - Mercurial">Mercurial</a> are examples. If you are interested in a version control system based on a distributed model have a look at Mercurial and Mark Adams <a href="http://raysend.com/mark/2007/05/15/mercurial-for-solo-developers/">post</a> about Mercurial and the single user. And if you have a spare hour (and a thick enough skin to persist through his abusive personality&#8212;apparently subversion users are stupid and ugly), here is Linus Torvalds explaining the virtues of git&#8217;s distributed model:</p>

<p><object width="425" height="350"><param name="movie" value="http://www.youtube.com/v/4XpnKHJAok8"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/4XpnKHJAok8" type="application/x-shockwave-flash" wmode="transparent" width="425" height="350"></embed></object></p>

<p><strong>Update</strong> Forgot to mention, if you are using TextMate and are curious about Mercurial, there is a Mercurial bundle that you might try.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/05/18/parting-observation/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Subversion and TextMate</title>
		<link>http://markelikalderon.com/2007/05/11/subversion-and-textmate/</link>
		<comments>http://markelikalderon.com/2007/05/11/subversion-and-textmate/#comments</comments>
		<pubDate>Fri, 11 May 2007 22:09:11 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[FileMerge]]></category>
		<category><![CDATA[Text]]></category>
		<category><![CDATA[Text Editor]]></category>
		<category><![CDATA[TextMate]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[fmdiff]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/05/11/subversion-and-textmate/</guid>
		<description><![CDATA[Another post in my series on subversion, a free, open source version control system: Subversion Subversion, Serendipity, and Discipline Subversion and the Single User LaTeX and Subversion Circle Six Subversion Subverting Difference Today we&#8217;ll look at three ways that subversion interacts with my favorite text editor, TextMate: TextMate&#8217;s subversion repository TextMate&#8217;s subversion integration Keeping local [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://markelikalderon.com/wp-content/uploads/2007/05/subversion_logo_hor-468x64.png' alt='subversion' /></p>

<p><img src='http://markelikalderon.com/wp-content/uploads/2007/05/textmate.jpg' alt='TextMate' /></p>

<p>Another post in my series on <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a>, a free, open source version control system:</p>

<ul>
<li><a href="http://markelikalderon.com/blog/2007/03/29/subversion/">Subversion</a></li>
<li><a href="http://markelikalderon.com/blog/2007/03/30/subversion-serendipity-and-discipline/">Subversion, Serendipity, and Discipline</a></li>
<li><a href="http://markelikalderon.com/blog/2007/04/14/subversion-and-the-single-user/">Subversion and the Single User</a></li>
<li><a href="http://markelikalderon.com/blog/2007/04/14/latex-and-subversion/">LaTeX and Subversion</a></li>
<li><a href="http://markelikalderon.com/blog/2007/04/18/circle-six-subversion/">Circle Six Subversion</a></li>
<li><a href="http://markelikalderon.com/blog/2007/04/28/subverting-difference/">Subverting Difference</a></li>
</ul>

<p>Today we&#8217;ll look at three ways that subversion interacts with my favorite text editor, <a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X">TextMate</a>:</p>

<ol>
<li><a href="#repository">TextMate&#8217;s subversion repository</a></li>
<li><a href="#integration">TextMate&#8217;s subversion integration</a></li>
<li><a href="#sync">Keeping local modifications to TextMate in sync across multiple computers with subversion</a></li>
</ol>

<h1 id="repository">TextMate&#8217;s Subversion Repository</h1>

<p>In Prefences &#x2192; Software Update you can set TextMate to automatically check for updates (recommended). You can also set it to watch for <em>cutting edge</em> updates. Cutting edge updates add advanced functionality and some bundles require this setting. In a way, the label is misleading, since the cutting edge updates tend to be very stable. If, however, you want the <em>bleeding edge</em> of TextMate development, you will have to access TextMate&#8217;s subversion repository, <a href="http://macromates.com/svn/Bundles/trunk/">http://macromates.com/svn/Bundles/trunk/</a>. There you will find bundles, plugins, support files, themes, tools, and more. Instructions about how to checkout bundles from the subversion repository can be found in the <a href="http://macromates.com/textmate/manual/bundles">manual</a> (RTFM, baby), and the <a href="http://macromates.com/wiki/Main/SubversionCheckout">wiki</a>. These should definitely be read. But above all check out <a href="http://skiadas.dcostanet.net/afterthought/">Haris Skiadas</a>&#8217; excellent <a href="http://skiadas.dcostanet.net/afterthought/2006/12/20/subversion-and-textmate/">tutorial</a>.</p>

<h1 id="integration">TextMate&#8217;s Subversion Integration</h1>

<p>TextMate, like other advanced editors on OS X such as <a href="http://www.barebones.com/" title="Welcome to Bare Bones Software">BBEdit</a> and <a href="http://aquamacs.org/" title="Aquamacs: Emacs for Mac OS X">Aquamacs</a>, enjoys subversion integration. So instead of working with subversion from the command line or with a subversion front end like <a href="http://www.lachoseinteractive.net/en/community/subversion/svnx/" title="La Chose : web agency and software maker – agence web et développement de logiciels">svnX</a>, it is possible to work with subversion directly from your text editor. &#x2303; &#x21E7; A brings up a menu with common subversion commands. If you have opened your working copy as a TextMate project, then selecting the root of that directory and selecting `status&#8217; will bring up an HTML window with the output of the command:</p>

<pre><code>svn status
</code></pre>

<p>Click on the thumbnail below for a picture.</p>

<p><a href='http://markelikalderon.com/wp-content/uploads/2007/05/status.jpg' title='svn status'><img src='http://markelikalderon.com/wp-content/uploads/2007/05/status.thumbnail.jpg' alt='svn status' /></a></p>

<p>As you can see, the HTML window not only shows the relevant files and their status, but it allows you to perform certain actions&#8212;you can add, revert, diff, and commit. The diff command displays line differences&#8212;not great for prose, as I have emphasized <a href="http://markelikalderon.com/blog/2007/02/15/diff-programs-diffed/">here</a> and <a href="http://markelikalderon.com/blog/2007/04/28/subverting-difference/">here</a>. Fortunately, selecting commit brings up the following dialogue window:</p>

<p><a href='http://markelikalderon.com/wp-content/uploads/2007/05/commit.jpg' title='svn commit'><img src='http://markelikalderon.com/wp-content/uploads/2007/05/commit.thumbnail.jpg' alt='svn commit' /></a></p>

<p>Notice that you can diff from here as well. However, this will use whatever diff program you have assigned as the value of the shell variable</p>

<pre><code>TM_SVN_DIFF_CMD 
</code></pre>

<p>in Preferences &#x2192; Advanced &#x2192; Shell Variables. Setting the value of this variable to <a href="http://ssel.vub.ac.be/ssel/internal:fmdiff">fmdiff</a> will allow you to display word differences graphically in <a href="http://en.wikipedia.org/wiki/Apple_FileMerge#FileMerge">FileMerge</a>.</p>

<h1 id="sync">Keeping TextMate in Sync</h1>

<p>One of the great things about TextMate is how easily configurable it is. Even if you are not a programmer, after a while you will find yourself writing snippets, commands, and maybe even entire bundles. Suppose, however, you work on more than one machine&#8212;say, at home and at work. It would be great if you could keep these local modifications in sync. (Frustration is an essential tab trigger that works on one but not another copy of TextMate.) Fortunately there is an easy solution. Just commit:</p>

<pre><code>~/Libray/Application Support/TextMate
</code></pre>

<p>and</p>

<pre><code>svn up
</code></pre>

<p>will keep you up to date on whatever machine you are on.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/05/11/subversion-and-textmate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Subverting Difference</title>
		<link>http://markelikalderon.com/2007/04/28/subverting-difference/</link>
		<comments>http://markelikalderon.com/2007/04/28/subverting-difference/#comments</comments>
		<pubDate>Sat, 28 Apr 2007 18:20:22 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[FileMerge]]></category>
		<category><![CDATA[diff]]></category>
		<category><![CDATA[fmdiff]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svn diff]]></category>
		<category><![CDATA[version control]]></category>
		<category><![CDATA[wdiff]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/04/28/subverting-difference/</guid>
		<description><![CDATA[Subversion allows you to compare the differences between revisions of a given document with the command: svn diff Let&#8217;s begin with the simplest and most common use of this command. But first a bit of terminology. Each time a change is committed to the repository its revision number increments. Revision keywords can be used instead [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://markelikalderon.com/wp-content/uploads/2007/04/fetchphp.gif' alt='FileMerge' /></p>

<p><a href="http://subversion.tigris.org/" title="subversion.tigris.org">Subversion</a> allows you to compare the differences between revisions of a given document with the command:</p>

<pre><code>svn diff
</code></pre>

<p>Let&#8217;s begin with the simplest and most common use of this command. But first a bit of terminology. Each time a change is committed to the repository its <em>revision number</em> increments. <em>Revision keywords</em> can be used instead of revision numbers. <em>BASE</em> is a revision keyword and refers to the pristine copy of an item in a working copy. The pristine copy of a file is a copy of your file as it was the last time your working copy was updated. It resides in the .svn directory within your file&#8217;s directory. So if your file is foo and it resides in directory bar, then running:</p>

<pre><code>ls -a
</code></pre>

<p>in directory bar will reveal:</p>

<pre><code>.svn
foo
</code></pre>

<p>.svn is an administrative directory that subversion makes use of and you should never modify it. Other useful revision keywords are:</p>

<ul>
<li>HEAD&#8212;the latest revision in the repository</li>
<li>COMMITTED&#8212;the last revision in which the file changed before BASE</li>
<li>PREV&#8212;the revision that precedes the last revision in which the file changed before BASE, that is, COMMITTED - 1.</li>
</ul>

<p>The command:</p>

<pre><code>svn diff foo
</code></pre>

<p>will compare the foo with BASE, that is, its pristine copy. So it will reveal the changes you have made to foo since you last updated your working copy. This is one of the more common uses of svn diff since it provides information necessary to write an informative commit message.</p>

<p>That&#8217;s pretty useful. But sometimes you may want to do something more. Fortunately, svn diff comes with a slew of options that allow for a fair amount of flexibility.</p>

<p>First, suppose you want to compare the modifications that you made to your file with an older revision, say, revision 17. The command:</p>

<pre><code>svn diff -r 17 foo
</code></pre>

<p>allows you to do just that. It compares foo as it was in revision 17 with foo as it presently is in your working copy.</p>

<p>Second, suppose you want to compare the differences between to older revisions, say revisions 17 and 23. The command:</p>

<pre><code>svn diff -r 17:23 http://url/of/your/repository/foo
</code></pre>

<p>will display these differences.</p>

<p>One really useful option is &#8211;diff-cmd. This option allows you to pass arguments to an external diff program. Why is this useful? Well svn diff only displays <em>line</em> differences. If you are writing prose in a text editor, paragraphs are long lines. What would be more useful is for <em>word</em> differences to be displayed. The option &#8211;diff-cmd allows you to use an external diff program that displays word differences.</p>

<p>I like to use Apple&#8217;s <a href="http://the.taoofmac.com/space/Applications/FileMerge" title="The Tao of Mac - Applications/FileMerge">FileMerge</a>, a graphical diff program that can be opened from the command line with:</p>

<pre><code>opendiff
</code></pre>

<p>Unfortunately, opendiff and svn diff use different arguments. So to get opendiff to work with subversion requires a shell script wrapper. Fortunately, <a href="http://ssel.vub.ac.be/ssel/internal:fmdiff">Bruno De Fraine</a> has done the heavy lifting. His script fmdiff is just such a wrapper. fmdiff can be downloaded (or checked out) form this <a href="http://ssel.vub.ac.be/svn-gen/bdefrain/fmscripts/">link</a>. If you install fmdiff in /usr/local/bin or ~/bin as is your preference and make it executable, you could then run the command:</p>

<pre><code>svn diff diff-cmd fmdiff foo
</code></pre>

<p>to reveal the differences between foo and its pristine copy in FileMerge.</p>

<p>Bear in mind, if you want to use an external diff program, say, <a href="http://www.gnu.org/software/wdiff/wdiff.html" title="wdiff - GNU Project - Free Software Foundation (FSF)">GNU wdiff</a>, you may very well need to write a wrapper script to accommodate a difference in arguments.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/04/28/subverting-difference/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Circle Six Subversion</title>
		<link>http://markelikalderon.com/2007/04/18/circle-six-subversion/</link>
		<comments>http://markelikalderon.com/2007/04/18/circle-six-subversion/#comments</comments>
		<pubDate>Tue, 17 Apr 2007 23:11:00 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/04/18/circle-six-subversion/</guid>
		<description><![CDATA[I will continue to post about subversion, but for now, I thought I would point you to the Circle Six Blog, where Brett Terpstra of Circle Six Design and fellow TextMate user has a series of posts on subversion. While focused on web design, all interested in using subversion for version control could benefit. Highly [...]]]></description>
			<content:encoded><![CDATA[<p>I will continue to post about <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a>, but for now, I thought I would point you to the <a href="http://blog.circlesixdesign.com/">Circle Six Blog</a>, where Brett Terpstra of Circle Six Design and fellow <a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X">TextMate</a> user has a series of <a href="http://blog.circlesixdesign.com/tag/svn">posts</a> on subversion. While focused on web design, all interested in using subversion for version control could benefit. Highly recommended.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/04/18/circle-six-subversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LaTeX and Subversion</title>
		<link>http://markelikalderon.com/2007/04/14/latex-and-subversion/</link>
		<comments>http://markelikalderon.com/2007/04/14/latex-and-subversion/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 04:19:37 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[LaTeX]]></category>
		<category><![CDATA[Markup]]></category>
		<category><![CDATA[Text]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/04/14/latex-and-subversion/</guid>
		<description><![CDATA[LaTeX is great for complex documents. (Of course, other forms of markup are good as well. DocBook comes to mind.) When working on a complex LaTeX document, it is important, nay, imperative to keep it in some form of version control. (The necessity may not be apparent until you actually use version control&#8212;if you don&#8217;t, [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://markelikalderon.com/wp-content/uploads/2007/04/latexandsubversion.jpg' alt='LaTeX and Subversion' /></p>

<p>LaTeX is great for complex documents. (Of course, other forms of markup are good as well. <a href="http://www.docbook.org/" title="DocBook.org">DocBook</a> comes to mind.) When working on a complex LaTeX document, it is important, nay, <em>imperative</em> to keep it in some form of version control. (The necessity may not be apparent until you actually <em>use</em> version control&#8212;if you don&#8217;t, well, just trust me, at least for now.)</p>

<p>I have been posting about a popular, open source form of version control, <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a>. If you are keeping your complex LaTeX document in a subversion repository, it would be useful to include information about the current revision, the <a href="http://markelikalderon.com/blog/2007/04/14/subversion-and-the-single-user/#commit">&#8220;Who?&#8221;, &#8220;What?&#8221;, &#8220;When?&#8221;, and &#8220;Where?&#8221;</a> of the last committed change, within your document. You could enter this information by hand, but this would be tedious and unreliable. Fortunately, there are LaTeX packages that can help. There are three:</p>

<ol>
<li><p><a href="http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=svn">svn</a></p></li>
<li><p><a href="http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=svninfo">svninfo</a></p></li>
<li><p><a href="http://tug.ctan.org/cgi-bin/ctanPackageInformation.py?id=svn-multi">svn-multi</a> aka svnkw</p></li>
</ol>

<p>The svn package doesn&#8217;t work if your LaTeX document comprises multiple files. So that&#8217;s out. The svninfo and svnkw packages happily do not share this limitation. The svninfo package, however, has a terrible limitation IMHO. It only registers revision information when you <em>check out</em> the document. This means if you create a LaTeX document, add it to your working copy, and commit the addition, the revision information, the <a href="http://markelikalderon.com/blog/2007/04/14/subversion-and-the-single-user/#commit">&#8220;Who?&#8221;, &#8220;What?&#8221;, &#8220;When?&#8221;, and &#8220;Where?&#8221;</a>, will never be registered. So that&#8217;s out. That leaves svnkw&#8212;which worked well for me. Let me detail how I use it.</p>

<p>In the preamble, I have the following:</p>

<pre><code>\usepackage{svnkw}

\svnidlong

{$HeadURL$}

{$LastChangedDate$}

{$LastChangedRevision$}

{$LastChangedBy$}

\svnRegisterAuthor{kalderon}{Mark Eli Kalderon}
</code></pre>

<p>The first line:</p>

<pre><code>\usepackage{svnkw}
</code></pre>

<p>should be familiar to LaTeX users&#8212;it loads the svnkw package. The command:</p>

<pre><code>\svnidlong

{$HeadURL$}

{$LastChangedDate$}

{$LastChangedRevision$}

{$LastChangedBy$}
</code></pre>

<p>gets the url of the file in the repository, the date of the last revision, the last revision number in which the file was changed, and who made the change, from subversion.</p>

<hr />

<p><strong>Update</strong> Sorry, missed a crucial step here. To get this to interact with subversion, you need to enter the following in the Terminal:</p>

<pre><code>svn propset svn:keywords 'HeadURL LastChangedDate LastChangedRevision LastChangedBy' foo.tex
</code></pre>

<p>where foo.tex is the name of your LaTeX source. Once this is set, when you commit a change to your repository or receive a change by updating your working copy, this information will be registered. Apologies for the oversight.</p>

<hr />

<p>Who made the change is the username of the commiter. You might want to include the real name of the commiter. The command:</p>

<pre><code>\svnRegisterAuthor{username}{real name}
</code></pre>

<p>registers this information.</p>

<p>The commands:</p>

<pre><code>\svnidlong
</code></pre>

<p>and</p>

<pre><code>\svnRegisterAuthor
</code></pre>

<p>registers the information described above. Now we want to use this information. There are different ways to do this. See the package documentation for sknkw for more details. I find it useful to include this information in a footer. Here&#8217;s how I do it. In the preamble, I include the following:</p>

<pre><code>\usepackage{fancyhdr}

\pagestyle{fancy}

\lfoot{\tiny{URL: \url{\svnkw{HeadURL}} ; \space Last changed on: \svndate ; \space Revision: \svnrev ; \space Author: \svnFullAuthor*{\svnauthor}}}

\cfoot{}

\rfoot{}
</code></pre>

<p>The first line:</p>

<pre><code>\usepackage{fancyhdr}
</code></pre>

<p>loads the fancyhdr package. This package allows you to format headers and footers. The second line:</p>

<pre><code>\pagestyle{fancy}
</code></pre>

<p>loads the default pagestyle of the fanchdr package. fancyhdr divides footers into three fields:</p>

<ol>
<li><p>the left field</p></li>
<li><p>the center field</p></li>
<li><p>the right field</p></li>
</ol>

<p>To place content in these field you use the commands:</p>

<pre><code>\lfoot{}

\cfoot{}

\rfoot{}
</code></pre>

<p>respectively. Whatever is between the brackets is inserted in the relevant field. If nothing is between the brackets, then the field is blank. Since there is a lot of information to be placed in the footer, it makes sense to have it flush left, and so I left the center and right fields blank. Let&#8217;s take a closer look at the line that is doing all the work:</p>

<pre><code>\lfoot{\tiny{URL: \url{\svnkw{HeadURL}} ; \space Last changed on: \svndate ; \space Revision: \svnrev ; \space Author: \svnFullAuthor*{\svnauthor}}}
</code></pre>

<p>That&#8217;s a little daunting, so let&#8217;s build up to it, step by step. I want the information in the left field so, of course, I use the command:</p>

<pre><code>\lfoot{}
</code></pre>

<p>In the left field I want to include the url of the file, the date of the last change, the revision number of the last change, and the author of the revision. Let&#8217;s begin with the url. The command:</p>

<pre><code>\svnkw{HeadURL}
</code></pre>

<p>yields the value encoded by:</p>

<pre><code>{$HeadURL$}
</code></pre>

<p>in the preamble. LaTeX provides the means of nicely formatting urls. To do this we use the url package loaded in the preamble with:</p>

<pre><code>\usepackage{url}
</code></pre>

<p>and we use the command:</p>

<pre><code>\url{}
</code></pre>

<p>This gives us:</p>

<pre><code>\url{\svnkw{HeadURL}}
</code></pre>

<p>Next the date of the last revision. This is easier. The command:</p>

<pre><code>\svndate
</code></pre>

<p>yields the value encoded by:</p>

<pre><code>{$LastChangedDate$}
</code></pre>

<p>in the preamble. The revision number is easy as well. The command:</p>

<pre><code>\svnrev
</code></pre>

<p>yields the value encoded by:</p>

<pre><code>{$LastChangedRevision$}
</code></pre>

<p>in the preamble. The command:</p>

<pre><code>\svnauthor
</code></pre>

<p>gives the value encoded by:</p>

<pre><code>{$LastChangedBy$}
</code></pre>

<p>in the preamble. Remember, this is the username of the commiter. But, I wanted the full name of the commiter. The command:</p>

<pre><code>\svnFullAuthor*{\svnauthor}
</code></pre>

<p>gives the full name of the author registered with:</p>

<pre><code>\svnRegisterAuthor
</code></pre>

<p>and the asterisk is a switch that gives both the username and the full name of the commiter. So far, we now have:</p>

<pre><code>\lfoot{\url{\svnkw{HeadURL}} \svndate \svnrev \svnFullAuthor*{\svnauthor}}
</code></pre>

<p>Three further refinements are called for.</p>

<p>First, it is useful to label this information. Thus, for example, the value of:</p>

<pre><code>\svnrev
</code></pre>

<p>is just a number. A label would provide some useful context for understanding what the number represents. Similarly for the rest of this information. Moreover, it would be useful to clearly distinguish this information, so lets separate them with semicolons. This gives us:</p>

<pre><code>\lfoot{URL: \url{\svnkw{HeadURL}} ; Last changed on: \svndate ; Revision: \svnrev ; Author: \svnFullAuthor*{\svnauthor}}
</code></pre>

<p>Second, if you typeset your document at this point, a small problem will become evident. For some reason, the svnkw does not insert spaces between the values of its commands even if you have spaces between them in your document. To correct this we use the command:</p>

<pre><code>\space
</code></pre>

<p>and get the following:</p>

<pre><code>\lfoot{URL: \url{\svnkw{HeadURL}} ; \space Last changed on: \svndate ; \space Revision: \svnrev ; \space Author: \svnFullAuthor*{\svnauthor}}
</code></pre>

<p>Third, this information is really of editorial interest only. I want it to be there, but not in the way. So let&#8217;s make it really small. To do this we wrap the content with the command:</p>

<pre><code>\tiny{}
</code></pre>

<p>to get the final product:</p>

<pre><code>\lfoot{\tiny{URL: \url{\svnkw{HeadURL}} ; \space Last changed on: \svndate ; \space Revision: \svnrev ; \space Author: \svnFullAuthor*{\svnauthor}}}
</code></pre>

<p>One last thing. Suppose you are using pdflatex as your typesetting engine to directly generate a PDF of your LaTeX document. pdflatex is usefully used in conjunction with the hyperref package that does a lot of nifty things not least of which is turning urls into functional hyperlinks. If you do, then clicking on the url of the file will open that file in your browser. Of course, your browser will ask you for your username and password if it hasn&#8217;t already saved that information for you.</p>

<p>Here is a screen shot of the final result:</p>

<p><img src='http://markelikalderon.com/wp-content/uploads/2007/04/svnfooter.tiff' alt='svn footer' /></p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/04/14/latex-and-subversion/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Subversion and the Single User</title>
		<link>http://markelikalderon.com/2007/04/14/subversion-and-the-single-user/</link>
		<comments>http://markelikalderon.com/2007/04/14/subversion-and-the-single-user/#comments</comments>
		<pubDate>Sat, 14 Apr 2007 01:51:35 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[subversion]]></category>
		<category><![CDATA[svnX]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/04/14/subversion-and-the-single-user/</guid>
		<description><![CDATA[As promised, a post about subversion workflow, but first some basic concepts. Commit Remember being taught journalism in high school English class? A good story must provide answers to four questions: &#8220;Who?&#8221;, &#8220;What?&#8221;, &#8220;When?&#8221;, and &#8220;Where?&#8221; Or so we were taught. When you commit a change, subversion records four pieces of information: Subversion records WHO [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://markelikalderon.com/wp-content/uploads/2007/04/celeb_movie_keaton2.jpg' alt='Looking for Mister Goodbar' /></p>

<p>As promised, a post about subversion workflow, but first some basic concepts.</p>

<h1>Commit</h1>

<p>Remember being taught journalism in high school English class? A good story must provide answers to four questions: &#8220;Who?&#8221;, &#8220;What?&#8221;, &#8220;When?&#8221;, and &#8220;Where?&#8221; Or so we were taught.</p>

<p>When you commit a change, subversion records four pieces of information:</p>

<ol>
<li>Subversion records WHO committed the change</li>
<li>Subversion records WHAT the change was (a description of the change)</li>
<li>Subversion records WHEN the change was committed</li>
<li>Subversion records WHERE the change was made (which files or directories in your working copy were changed)</li>
</ol>

<p>With each change, subversion increments the revision number of the repository. You can then diff against a particular revision or retrieve a particular revision as you like.</p>

<p>The command:</p>

<pre><code>svn commit --message "Description of change" foo.txt
</code></pre>

<p>will record your change to foo.txt in your working copy and the &#8220;Who?&#8221;, &#8220;What?&#8221;, &#8220;When?&#8221;, and &#8220;Where?&#8221; of this change to your subversion repository.</p>

<h1>Update</h1>

<p>Not only will you want to sync revisions in your working copy to your repository, but sync revisions in your repository to your working copy. The command:</p>

<pre><code>svn update
</code></pre>

<p>allows you to do just that. Suppose that foo.txt has been changed since your last update, and it is the seventeenth revision of the repository, then the command will yield:</p>

<pre><code>U foo.txt
Updated to revision 17
</code></pre>

<p>This means that your working copy has been modified to reflect the changes to foo.txt and that it now reflects revision 17 of the repository. The letter code U is one of several codes that can be issued. These include:</p>

<ul>
<li>U foo&#8212;file foo has been updated</li>
<li>A foo&#8212;file or directory foo has been added</li>
<li>D foo&#8212;file or directory has been deleted</li>
<li>G foo&#8212;file foo has been updated but you have made local changes in your working copy not reflected in the repository but these changes do not intersect</li>
<li>C foo&#8212;file foo in your working copy has changes that conflict with the changes to foo in the reposiroty</li>
</ul>

<h1>Cha-Cha-Cha-Changes</h1>

<p>So far we have discussed committing changes to the repository, and updating the working copy to reflect the changes to the repository, but how do we make these changes.</p>

<p>There are two kinds of changes:</p>

<ol>
<li>Changes to individual files</li>
<li>Changes to the structure of the directory</li>
</ol>

<p>Changes to individual files is easy. Just make the changes in the appropriate editing program. You don&#8217;t need to issue in any subversion specific commands.</p>

<p>Changes to the structure of the directory, however, requires subversion&#8217;s help. Fortunately, the relevant commands are easy to understand.</p>

<p>The command:</p>

<pre><code>svn add foo
</code></pre>

<p>schedules the file or directory foo to be added to the repository next time you make a commit.</p>

<p>The command:</p>

<pre><code>svn delete foo
</code></pre>

<p>schedules the file or directory foo for deletion from the repository next time you commit.</p>

<p>The command:</p>

<pre><code>svn copy foo bar
</code></pre>

<p>creates a copy of foo called bar and bar is scheduled for addition to the repository next time you commit</p>

<p>The command:</p>

<pre><code>svn move foo bar
</code></pre>

<p>creates a copy of foo called bar and schedules bar for addition and schedules foo for deletion.</p>

<h1>Reviewing Changes</h1>

<p>Before committing your changes, it is a good idea to review the changes you made. Helpfully, subversion has provided some useful tools for ding this.</p>

<p>First up is the command:</p>

<pre><code>svn status
</code></pre>

<p>If this command is issued at the root of your working copy it will yield a description of all the changes that you have made since last updating. The command yields a list of files and directories preceded by letter codes indicating the nature of the changes made. These include:</p>

<ul>
<li>M foo&#8212;foo has been modified since last updating</li>
<li>A foo&#8212;foo is scheduled for addition</li>
<li>D foo&#8212;foo is scheduled for deletion</li>
<li>C foo&#8212;foo has conflicts with an update</li>
<li>? foo&#8212;subversion doesn&#8217;t know about foo. You may want to add it or remove it.</li>
</ul>

<p>If svn status indicates that foo.txt has been modified, you may want to examine these changes in detail in order to write a helpful commit message. The command:</p>

<pre><code>svn diff
</code></pre>

<p>run at the root of the working copy will print out a list of changes to modified files in diff format. As I observed in a previous <a href="http://markelikalderon.com/blog/2007/02/15/diff-programs-diffed/">post</a>, diff format displays <em>line</em> differences, not <em>word</em> differences. This is not great for prose since paragraphs in text files are long lines so multiple differences in a paragraph will not be adequately represented. Fortunately, subversion allows you to use external diff programs. I will make a separate post about this later.</p>

<p>One more tool. The command:</p>

<pre><code>svn revert foo
</code></pre>

<p>will roll back the changes you made to foo to the state foo was in when the working copy was last updated.</p>

<h1>The Workflow</h1>

<p>With these basic concepts in mind, we can now describe your workflow:</p>

<ol>
<li>Update your working copy</li>
<li>Make changes to your working copy</li>
<li>Review your changes</li>
<li>Resolve any conflicts (to be described in a separate post)</li>
<li>Commit your changes.</li>
</ol>

<p>Subversion was designed for multiple programmers to work on a given project. What benefits does all this provide the single user? Besides providing a database of all changes and a record of these, the workflow really comes into its own when working from multiple locations. Suppose you are working both at home and at work on different machines. Adhering to this workflow will make sure that you are always in sync. This is a vastly more efficient and non-ad hoc framework for keeping your mission critical files in sync than emailing them or keeping them on a flash drive. These methods are helpful, yes. But their ad hoc nature is ultimately a recipe for confusion.</p>

<p>One final thought. GUI front ends such as <a href="http://www.lachoseinteractive.net/en/community/subversion/svnx/" title="La Chose : web agency and software maker – agence web et développement de logiciels">svnX</a> are helpful, but you should try to master the command line basics. And always remember, the command:</p>

<pre><code>svn help
</code></pre>

<p>is your friend.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/04/14/subversion-and-the-single-user/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Subversion, Serendipity, and Discipline</title>
		<link>http://markelikalderon.com/2007/03/30/subversion-serendipity-and-discipline/</link>
		<comments>http://markelikalderon.com/2007/03/30/subversion-serendipity-and-discipline/#comments</comments>
		<pubDate>Fri, 30 Mar 2007 22:17:59 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[subversion]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/03/30/subversion-serendipity-and-discipline/</guid>
		<description><![CDATA[Serendipity can be good. After my last post, a discussion of the pros and cons of subversion emerged in this thread of the Textmate mailing list. Though focused on web development, many of the insights are generalizable. I am not involved in web development, nor am I a programmer. But I do keep LaTeX documents, [...]]]></description>
			<content:encoded><![CDATA[<p>Serendipity can be good. After my last <a href="http://markelikalderon.com/blog/2007/03/29/subversion/">post</a>, a discussion of the pros and cons of <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a> emerged in this <a href="http://lists.macromates.com/pipermail/textmate/2007-March/thread.html#18582">thread</a> of the <a href="http://macromates.com/" title="TextMate — The Missing Editor for Mac OS X">Textmate</a> mailing list. Though focused on web development, many of the insights are generalizable. I am not involved in web development, nor am I a programmer. But I do keep LaTeX documents, BibTeX files, a directory of PDFs, notes in markdown, and <a href="http://www.roaringpenguin.com/penguin/openSourceProducts/remind">remind</a> calendar files in a subversion repository. Whether or not you use subversion, if you are producing complex documents, some form of version control is a real godsend. Be it subversion, <a href="http://www.selenic.com/mercurial/" title="Mercurial - Mercurial">mercurial</a>, <a href="http://www.perforce.com">perforce</a>, <a href="http://abridgegame.org/darcs/" title="darcs">darcs</a>, or what have you, some form of version control should be at the center of a writer&#8217;s workflow.</p>

<p>Most academics might wonder what the big deal is. After all, many save versions of their latest research in an ad hoc fashion, say, with multiple Word files (shudder). The problem is that it is <em>ad hoc</em> and <em>unreliable</em>. Version control is not magic, it requires discipline, but it provides the framework for keeping track of revisions in a non-ad hoc manner. It may well save you a lot of grief.</p>

<p>In subversion, your files are kept in a subversion repository that can either reside locally on your machine or, ideally, on a server. Directories of files can be checked out. This is your working copy, and it resides locally on your machine. You edit the files in your working copy, and when satisfied, you commit your changes to the subversion repository. The working copy can also be updated to propagate the current state of the repository.</p>

<p>There are two aspects of committing that require discipline.</p>

<p>First, nothing is forcing you to commit your changes, and it is easy to get lazy. Personally, I commit and commit often. Remember, commits are free, and the more commits you make, the more detailed record you have of the revisions that you are making. I definitely commit <em>before</em> deleting anything, be it a section, a paragraph, or a memorable if misplaced line&#8212;just in case I want to access that material at a later time.</p>

<p>Second, subversion tracks changes to a <em>directory</em> of files. Each time you commit the revision number of the entire repository is incremented. When you commit you enter a commit message. If you commit changes to multiple files, your message must detail the changes to each of these. Fortunately, subversion provides tools to make this easier. Suppose you have been editing the files in your working copy and want to remind yourself what you have done. The command:</p>

<pre><code>svn status
</code></pre>

<p>will provide you with detailed information about how your working copy differs from its state when last updated, including which files have been modified, which have been added, and so on. Suppose you want to remind yourself of the changes made to a modified file. The command:</p>

<pre><code>svn diff
</code></pre>

<p>will reveal the local modifications in the working copy.</p>

<p>Remember, the more detailed your commit messages, they more useful they will be to you. At first the discipline can seem onerous. But beyond the utility of providing a detailed record of revisions, it is an occasion to reflect on what you have achieved, and what needs to be done. Like the confessional for Catholics, or the weekly review for GTD geeks, the exercise of formal reflection can be good for you.</p>

<p>Next time, I will detail a few more basic concepts of subversion and outline a typical single-user workflow.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/03/30/subversion-serendipity-and-discipline/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Subversion</title>
		<link>http://markelikalderon.com/2007/03/29/subversion/</link>
		<comments>http://markelikalderon.com/2007/03/29/subversion/#comments</comments>
		<pubDate>Wed, 28 Mar 2007 23:58:06 +0000</pubDate>
		<dc:creator>Mark Eli Kalderon</dc:creator>
				<category><![CDATA[Hybrid Application]]></category>
		<category><![CDATA[subversion]]></category>
		<category><![CDATA[svnX]]></category>
		<category><![CDATA[version control]]></category>

		<guid isPermaLink="false">http://markelikalderon.com/blog/2007/03/29/subversion/</guid>
		<description><![CDATA[In my first post, I reported my discovery that a lot of tools that programmers use are, in fact, readily adaptable to the task of writing. In a previous post I discussed diff programs&#8212;programs for comparing differences between text files. In this post, I will be discussing version control. Programmers and writers face at least [...]]]></description>
			<content:encoded><![CDATA[<p><img src='http://markelikalderon.com/wp-content/uploads/2007/03/svnx.jpg' alt='svnX' /></p>

<p>In my first <a href="http://markelikalderon.com/blog/2006/09/27/the-word/">post</a>, I reported my discovery that a lot of tools that programmers use are, in fact, readily adaptable to the task of writing. In a previous post I discussed <a href="http://markelikalderon.com/blog/2007/02/15/diff-programs-diffed/">diff programs</a>&#8212;programs for comparing differences between text files. In this post, I will be discussing <a href="http://en.wikipedia.org/wiki/Revision_control" title="Wikipedia Entry: Revision_control">version control</a>.</p>

<p>Programmers and writers face at least one common problem. In writing a complex program, programmers need to track small changes over time. In writing a complex document, writers need to track small changes over time. Programmers, being programmers, have written software to meet this particular need, software that can meet the writer&#8217;s corresponding need.</p>

<p>There are a variety of version control systems currently available, but I will be talking about <a href="http://subversion.tigris.org/" title="subversion.tigris.org">subversion</a>, a popular open source replacement for <a href="http://www.cvs.com/" title="CVS">CVS</a>. Subversion tracks changes to a directory, saving the differences in a database. Wish you hadn&#8217;t deleted that paragraph and somehow didn&#8217;t save it in the ad hoc versions of the paper you created? With subversion it is just a:</p>

<pre><code>svn cat
</code></pre>

<p>away.</p>

<p>This post will be covering installing subverion on Mac OS X. Subsequent posts will cover usage, and integration with the diff program of your choice.</p>

<p>Installation:</p>

<p><strong>STEP ONE</strong>: <a href="http://www.codingmonkeys.de/mbo/" title="Martin Ott">Martin Ott</a> of <a href="http://www.codingmonkeys.de/" title="TheCodingMonkeys">Coding Monkeys</a> has helpfully provided a binary for OS X. (One cool feature of the OS X version is its keychain integration.) Download the <a href="http://www.codingmonkeys.de/mbo/">Subversion.pkg</a>.</p>

<p><strong>STEP TWO</strong>: Unzip the subversion.pkg, click the pkg-installer and follow the instructions to install Subversion.</p>

<p><strong>STEP THREE</strong>: OK, let&#8217;s test it out. Open the Terminal (located in /Applications/Utilities), and type:</p>

<pre><code>svn help 
</code></pre>

<p>If successfully installed, you should see a helpful usage message. If not, then chances are that subversion is not in your path. (Don&#8217;t worry if you do not know what this means.) To add the relevant path do the following: Type:</p>

<pre><code>cd
</code></pre>

<p>in Terminal and hit return to navigate to your home directory. Type:</p>

<pre><code>ls -a 
</code></pre>

<p>and hit return to see the contents of your home directory (including the files beginning with a &#8216;.&#8217; normally hidden from the Finder). If a file called &#8216;.profile&#8217; exists open it up in your favorite text editor. If it doesn&#8217;t exist, create it. Now just add the following line:</p>

<pre><code>export PATH=$PATH:/usr/local/bin
</code></pre>

<p>Save .profile and type</p>

<pre><code>source .profile
</code></pre>

<p>and hit return.</p>

<pre><code>svn help
</code></pre>

<p>should now return the help message.</p>

<p><strong>STEP FOUR</strong>: First a bit of terminology. A subversion repository is where all your files are stored. Your working copy is a local copy of its contents where changes are made. If you are happy with them, you commit them to the repository. It is possible to have a local repository on your machine, but having your repository on a server allows for some interesting possibilities (such as syncing your files on multiple machines). <a href="https://opensvn.csie.org/">OpenSVN</a> is a free subversion server. It worked well for me. (Though now mine is on <a href="http://textdrive.com/" title="Welcome to TextDrive &#8211; Reliable, high performance web hosting you can trust">TextDrive</a> which isn&#8217;t free.) A comprehensive list of subversion servers can be found on this <a href="http://subversion.tigris.org/links.html#hosting">page</a> of the subversion website. If you are using <a href="https://opensvn.csie.org/">OpenSVN</a>, click on the link called &#8216;Create a New Project&#8217; and follow the instructions.</p>

<p><strong>STEP FIVE</strong>: Subversion can be managed on the command line. You should take the time to learn how to do so. However, like diff programs (and arguably text editing), there&#8217;s a point to using a GUI environment. There are several GUI front ends for subversion. None of the interfaces are ideal. (The killer GUI front end for subversion has yet to be written.) However, <a href="http://www.lachoseinteractive.net/en/community/subversion/svnx/features/">svnX</a> is by far the best I have seen on OS X. And it is free. Download it <a href="http://www.lachoseinteractive.net/en/community/subversion/svnx/download/">here</a>.</p>

<p><strong>STEP SIX</strong>: When you open up svnX you will see two windows. In the window entitled &#8216;Repositories&#8217;, add the url and login name and password from your subversion server.</p>

<p><strong>STEP SEVEN</strong>: OK, you are in the home stretch now. You have installed subversion, created a subversion repository on a subversion server, and have a GUI program to manage your subversion repository and working copy. Now all that you have to do is import your project directory into your subversion repository. Once more to the Terminal. (After this, most everything can be handled through svnX.) Type:</p>

<pre><code>svn import -m "import message" /path/to/your/project/directory /url/of/your/repository
</code></pre>

<p>(making the appropriate substitutions for the import message and path and url) and hit return.</p>

<p><strong>STEP EIGHT</strong>: Now we need to create the working copy. Move your project directory to the Trash. (Don&#8217;t worry, you don&#8217;t have to empty the trash just yet.) In svnX, click on the name of your repository in the repository window. This will open a new window. Select root and click on &#8216;svn checkout&#8217;. In the dialogue window, select where you want your working copy to live and click &#8216;open&#8217;. Now in the window entitled &#8216;Working Copies&#8217; add the path of the working copy you just created and the login information from the subversion server.</p>

<p>Congratulations! You are now set up. Subsequent posts will describe usage and integrating with the diff tool of your choice. I you can&#8217;t wait check out the <a href="http://www.macdevcenter.com/pub/a/mac/2004/08/10/subversion.html">tutorial</a> at O&#8217;REILLY macdevcenter.com and the subversion <a href="http://svnbook.red-bean.com/">book</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://markelikalderon.com/2007/03/29/subversion/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

