<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="/stylesheets/rss.css" type="text/css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>Tom Moertel's Weblog: Tag darcs</title>
    <link>http://blog.moertel.com/articles/tag/darcs?tag=darcs</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description>Quality rants on programming theory and stuff geeks like</description>
    <item>
      <title>How I stopped missing Darcs and started loving Git</title>
      <description>&lt;p&gt;About three years ago, I &lt;a href="http://blog.moertel.com/articles/2005/02/12/source-code-management-with-darcs-a-first-look"&gt;switched to
Darcs&lt;/a&gt;
as my primary source-code management system.  It was simple,
intuitive, and powerful, and it made managing my projects more fun and
less frustrating than any centralized &lt;span class="caps"&gt;VCS&lt;/span&gt; ever had.  That it was
written in Haskell, one of my favorite programming languages, made
it even better.  I was hooked.&lt;/p&gt;


	&lt;p&gt;Since then, the distributed &lt;span class="caps"&gt;SCM&lt;/span&gt; landscape has changed.  Darcs hasn&amp;#8217;t
improved much, but its competitors have made long strides, especially
&lt;a href="http://git.or.cz/"&gt;Git&lt;/a&gt; and
&lt;a href="http://www.selenic.com/mercurial/"&gt;Mercurial&lt;/a&gt;.  Both
are crazy fast, vigorously developed, and widely used on large, highly
active real-world projects, such as the Linux kernel and Mozilla 2.
In comparison, Darcs has
stagnated.&lt;/p&gt;


	&lt;p&gt;When I started working for a new company recently, I had to consider
whether to advocate Darcs or something else.  In the end, I decided
that Darcs would be a hard sell.  Nobody else at the company uses
Haskell, and having to explain how to &lt;a href="http://wiki.darcs.net/DarcsWiki/ConflictsFAQ#head-476c7079246558936930568621a39f83295b3846"&gt;avoid the occasional corner
case&lt;/a&gt;
seemed liked a losing proposition.&lt;/p&gt;


	&lt;p&gt;After researching and playing around with Git and Mercurial, I settled
on Git.  I like Git&amp;#8217;s underlying hashed-blobs model better than
Mercurial&amp;#8217;s revlogs, and Git seems to have slightly more development
momentum.  Still, it was a close call.  Either choice would have been
completely reasonable.&lt;/p&gt;


	&lt;h3&gt;Missing Darcs&lt;/h3&gt;


	&lt;p&gt;When I started using Git on real projects, the one thing I &lt;em&gt;really&lt;/em&gt;
missed was the ability to easily amend earlier patches, something
Darcs made trivial.  Let me
explain.  The typical development workflow goes something like this:&lt;/p&gt;


	&lt;ol&gt;
	&lt;li&gt;Checkout copy of upstream code base.&lt;/li&gt;
		&lt;li&gt;Implement feature X.&lt;/li&gt;
		&lt;li&gt;Commit.&lt;/li&gt;
		&lt;li&gt;Implement independent feature Y.&lt;/li&gt;
		&lt;li&gt;Commit.&lt;/li&gt;
		&lt;li&gt;Implement independent feature Z.&lt;/li&gt;
		&lt;li&gt;Commit.&lt;/li&gt;
		&lt;li&gt;Push new features back upstream.&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;Now, what really happens is that when I&amp;#8217;m implementing Y or Z,
I&amp;#8217;ll realize that I made a mistake in X.  The trick is then
fixing X so that my fix is part of the changeset/patch for X that
ultimately gets pushed upstream in the last step.  That way, the
upstream folks will see only a single, clean patch for feature X &amp;#8211; not
a mishmash of patches that together represent X.&lt;/p&gt;


	&lt;p&gt;In Darcs, amending the original patch is easy because its patch theory
lets me tweak the patch for X independently of the other patches.
Darcs will simply ask me which patch I want to amend, and I&amp;#8217;ll select
the orignal patch for X:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ emacs               # fix X
$ darcs amend-record  # amend original patch for X

Mon Dec 10 14:43:13 EST 2007  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Implemented Z
Shall I amend this patch? [yNvpq], or ? for help: n

Mon Dec 10 14:42:12 EST 2007  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Implemented Y
Shall I amend this patch? [yNvpq], or ? for help: n

Mon Dec 10 14:41:46 EST 2007  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Implemented X
Shall I amend this patch? [yNvpq], or ? for help: y
hunk ./x 1
-X1
+X2
Shall I add this change? (1/?)  [ynWsfqadjkc], or ? for help: y
Finished amending patch:
Mon Dec 10 14:43:25 EST 2007  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Implemented X
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;That&amp;#8217;s it.  The exact same process will work regardless of when I
realize I need to fix X: before I start Y, while I&amp;#8217;m implementing Y,
after I&amp;#8217;ve committed Y, while I&amp;#8217;m working on Z, or after I&amp;#8217;ve committed
Z.&lt;/p&gt;


	&lt;h3&gt; Learning to love Git&lt;/h3&gt;


	&lt;p&gt;With Git, however, I can amend a commit only if I haven&amp;#8217;t committed anything else before making my fix. In Git&amp;#8217;s mind, Y depends on X, and Z
depends on Y, even if they really are independent of one another.&lt;/p&gt;


	&lt;p&gt;So if I commit the original patch for X and then immediately realize I
need to make a fix, before I start working on Y or Z, it&amp;#8217;s easy:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ emacs               # implement X
$ git commit -m 'Implemented X'

# discover problem in X

$ emacs               # fix X
$ git commit --amend  # amend original patch
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;More typically, it&amp;#8217;s only while I&amp;#8217;m working on Y that I&amp;#8217;ll
realize I need to fix X.  Then it&amp;#8217;s more complicated
to amend the original commit:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ emacs               # implement X
$ git commit -m 'Implemented X'
$ emacs               # start working on Y

# discover problem in X

$ git stash           # stash away half-completed work on Y
$ emacs               # fix X
$ git commit --amend  # amend original patch for X
$ git stash apply     # restore work on Y
$ emacs               # continue working on Y
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;While not as convenient as Darcs&amp;#8217;s workflow, it&amp;#8217;s perfectly workable.&lt;/p&gt;


Now let&amp;#8217;s consider another fairly typical case:  I commit X and Y and
then start working on Z before I notice the problem in X.  I used to
think that Git couldn&amp;#8217;t handle this  case, but it can, thanks to
&lt;code&gt;git rebase --interactive&lt;/code&gt;:

&lt;pre&gt;&lt;code&gt;$ emacs               # implement X
$ git commit -m 'Implemented X'
$ emacs               # implement Y
$ git commit -m 'Implemented Y'
$ emacs               # start working on Z

# discover problem in X

$ git stash           # stash away half-completed work on Z
$ emacs               # fix X
$ git commit -m 'Fixed X'
$ git rebase --interactive HEAD~3  # see comments below
$ git stash apply     # restore work on Z
$ emacs               # continue working on Z
&lt;/code&gt;&lt;/pre&gt;

The &lt;code&gt;git rebase --interactive&lt;/code&gt; command is &lt;em&gt;powerful&lt;/em&gt;.  What the
command does, as called in the snippet above, is invoke my editor of
choice on a text file describing the last 3 commits (that&amp;#8217;s the
&lt;code&gt;HEAD~3&lt;/code&gt; part):

&lt;pre&gt;&lt;code&gt;# Rebasing 3ad99a7..b9a8405 onto 3ad99a7
#
# Commands:
#  pick = use commit
#  edit = use commit, but stop for amending
#  squash = use commit, but meld into previous commit
#
# If you remove a line here THAT COMMIT WILL BE LOST.
#
pick 0885540 Implemented X
pick 320b115 Implemented Y
pick b9a8405 Fixed X
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;I can then edit the file to reorder, merge (squash), and/or remove
the commits.  In this example, I want to merge the fix for X into
the original commit that implemented X.  So I edit the file like so:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;pick 0885540 Implemented X
squash b9a8405 Fixed X
pick 320b115 Implemented Y
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Then I save the file, at which point Git takes over and makes the
requested changes, merging the fix for X into the
original commit for X.  Now the log shows the original implementation
and fix as one commit:&lt;/p&gt;


&lt;pre&gt;&lt;code&gt;$ git log
commit f387d650976246c0854d028b040cca40e542be56
Author: Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
Date:   Mon Dec 10 15:11:26 2007 -0500

    Implemented Y

commit 82a1c849ffd1bd688d5bc9d99be0e63548a89c4c
Author: Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
Date:   Mon Dec 10 15:13:03 2007 -0500

    Implemented X

    Fixed X

commit 3ad99a7ef537b7ae99e435e0d2b4b0d03de92c65
Author: Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
Date:   Mon Dec 10 15:11:14 2007 -0500

    Initial checkin
&lt;/code&gt;&lt;/pre&gt;

	&lt;p&gt;Once I figured out how to use &lt;code&gt;git rebase --interactive&lt;/code&gt;, I stopped
missing Darcs and started loving Git.&lt;/p&gt;</description>
      <pubDate>Mon, 10 Dec 2007 16:52:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:65f0fc3e-71c6-4f9e-9100-3d1333b7967a</guid>
      <author>Tom Moertel</author>
      <link>http://blog.moertel.com/articles/2007/12/10/how-i-stopped-missing-darcs-and-started-loving-git</link>
      <category>programming</category>
      <category>haskell</category>
      <category>scm</category>
      <category>darcs</category>
      <category>git</category>
      <category>dvcs</category>
      <trackback:ping>http://blog.moertel.com/articles/trackback/655</trackback:ping>
    </item>
    <item>
      <title>Practical differences between Darcs and Git/Mercurial</title>
      <description>&lt;p&gt;On the Darcs Users mailing list, I ran across an interesting thread: &lt;a href="http://thread.gmane.org/gmane.comp.version-control.darcs.user/11201"&gt;practical differences between darcs&amp;#8217; patch model and git/mercurial&amp;#8217;s?&lt;/a&gt;&lt;/p&gt;


	&lt;p&gt;Among the interesting points of discussion:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Do the mechanics that give rise to Darcs&amp;#8217;s strong cherry-picking abilities also make it susceptible to naughty time-complexity behavior?&lt;/li&gt;
		&lt;li&gt;When you merge non-conflicting changes in Git or Mercurial, you must record a merge patch, which binds the two in the development timeline, but in Darcs the respective patches are free to commute. Which behavior is better for real-world development?&lt;/li&gt;
	&lt;/ul&gt;


	&lt;p&gt;If you&amp;#8217;re interested in distributed source-code management, it&amp;#8217;s an interesting thread to follow.&lt;/p&gt;</description>
      <pubDate>Thu, 25 Oct 2007 16:26:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:9bd93d19-ad1f-4462-9210-11df880ad696</guid>
      <author>Tom Moertel</author>
      <link>http://blog.moertel.com/articles/2007/10/25/practical-differences-between-darcs-and-git-mercurial</link>
      <category>programming</category>
      <category>vcs</category>
      <category>darcs</category>
      <category>mercurial</category>
      <category>git</category>
      <category>patches</category>
      <trackback:ping>http://blog.moertel.com/articles/trackback/606</trackback:ping>
    </item>
    <item>
      <title>Some recent reviews of distributed source-code-management systems</title>
      <description>&lt;p&gt;&lt;a href="http://changelog.complete.org/"&gt;John Goerzen&lt;/a&gt; recently compared a
bunch of distributed source-code-management systems in &lt;a href="http://changelog.complete.org/posts/528-Whose-Distributed-VCS-Is-The-Most-Distributed.html"&gt;Whose
Distributed &lt;span class="caps"&gt;VCS&lt;/span&gt; Is The Most
Distributed?&lt;/a&gt;
His comparison includes all of the major contenders except for
&lt;a href="http://svk.elixus.org/"&gt;&lt;span class="caps"&gt;SVK&lt;/span&gt;&lt;/a&gt; and &lt;a href="http://venge.net/monotone/"&gt;monotone&lt;/a&gt;.
He ends up favoring &lt;a href="http://darcs.net/"&gt;Darcs&lt;/a&gt;, which I also prefer and
use to manage my projects&amp;#8217; code.
If you&amp;#8217;re looking for a quick overview of distributed &lt;span class="caps"&gt;SCM&lt;/span&gt; options,
check out John&amp;#8217;s comparison.&lt;/p&gt;


	&lt;p&gt;Also check out Bryce &amp;#8220;Zooko&amp;#8221; Wilcox-O&amp;#8217;Hearn&amp;#8217;s &lt;a href="http://zooko.com/revision_control_quick_ref.html"&gt;Quick Reference Guide to Free Software Decentralized Revision Control Systems&lt;/a&gt;, which is updated regularly.  (He also likes Darcs.)&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; fixed small typo.&lt;/p&gt;</description>
      <pubDate>Mon, 14 Aug 2006 13:50:00 -0400</pubDate>
      <guid isPermaLink="false">urn:uuid:aeb7fedc-2aa0-4556-afc3-fe7641904535</guid>
      <author>Tom Moertel</author>
      <link>http://blog.moertel.com/articles/2006/08/14/some-recent-reviews-of-distributed-source-code-management-systems</link>
      <category>programming</category>
      <category>reviews</category>
      <category>scm</category>
      <category>vcs</category>
      <category>darcs</category>
      <trackback:ping>http://blog.moertel.com/articles/trackback/153</trackback:ping>
    </item>
    <item>
      <title>Source code management with darcs: a first look</title>
      <description>&lt;p&gt;I have been managing the &lt;a href="http://community.moertel.com/ss/space/LectroTest"&gt;LectroTest&lt;/a&gt; project with the
&lt;a href="http://www.venge.net/monotone/"&gt;monotone&lt;/a&gt; revision control
system.  For the last few months, monotone has been undergoing some
growing pains that have made it less stable than I would like for everyday
use.  Thus I thought that I would give &lt;a href="http://community.moertel.com/ss/space/darcs"&gt;darcs&lt;/a&gt; a try.&lt;/p&gt;
&lt;p&gt;I have been following the progress of darcs since it was first
announced on the Haskell-Cafe mailing list on 9 April 2003.  Darcs is
written in &lt;a href="http://community.moertel.com/ss/space/Haskell"&gt;Haskell&lt;/a&gt;, one of my favorite programming languages, and
that was my initial draw.  Still, until yesterday I had never
used it for any of my projects because I felt it was immature and
needed some more real-world testing before I committed work to it.&lt;/p&gt;&lt;p class="paragraph"&gt;In the last three months, Darcs has gained mainstream attention
(triggered by a &lt;a href="http://lwn.net/Articles/110516/"&gt;favorable write-up in Linux Weekly News&lt;/a&gt;) and a growing user base.  Under
the gaze of these new eyeballs, darcs has matured much.  I thought it
was time for another look.&lt;/p&gt;&lt;p class="paragraph"&gt;Darcs has a small, easy-to-understand command set and yet offers
"modern" source-code management features such as distributed
development (via HTTP, ssh, and email), change sets, and cherry
picking.  Want to start an experimental branch of your project?  Just
check out another copy and use it for the branch.  Each working copy
is a complete, independent repo. Want to publish a project repository
to the world?  Just copy it to a public web server.  Want to start
working on someone else's project?  A single "darcs get
http://other.project.com/project" gives you a complete, stand-alone
copy.  Your own personal branch.  Start hacking.&lt;/p&gt;&lt;p class="paragraph"&gt;To try darcs on something I was familiar with, I decided manage my
&lt;a href="http://community.moertel.com/ss/space/LectroTest"&gt;LectroTest&lt;/a&gt; development with it.  The first thing I did was change to
the LT working directory and use "darcs init" to create a darcs
repository there.&lt;/p&gt;

&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur Flippi]$ &lt;strong&gt;cd ~/work/research/perl/qc/  # LT root dir&lt;/strong&gt;
[tom@bifur qc]$ &lt;strong&gt;darcs init&lt;/strong&gt;
[tom@bifur qc]$ &lt;strong&gt;l&lt;/strong&gt;
blib/                       mt.db
_build/                     mtdb.dump
Build*                      perl-Test-LectroTest-0.2007-1.src.rpm
Build.PL                    pod2htmd.tmp
Build.PL~                   pod2htmi.tmp
buildrpm*                   posts/
buildrpm~                   prop2.pl
Changes                     prop2.pl~
Changes~                    README
checkpods*                  t/
checkpods~                  Test-LectroTest-0.2001.tar.gz
ctime.pl                    Test-LectroTest-0.2002.tar.gz
ctime.pl~                   Test-LectroTest-0.2003.tar.gz
CVS/                        Test-LectroTest-0.2004.tar
_darcs/                     Test-LectroTest-0.2004.tar.gz
Example1.pl~                Test-LectroTest-0.2005.tar.gz
lib/                        Test-LectroTest-0.2006.tar.gz
Makefile.PL                 Test-LectroTest-0.2007.tar.gz
MANIFEST                    Test-LectroTest-0.2008.tar.gz
MANIFEST~                   Test-LectroTest-0.2009.tar.gz
MANIFEST.bak                Test-LectroTest-0.201.tar.gz
MANIFEST.SKIP               tex/
MANIFEST.SKIP~              THANKS
META.yml                    THANKS~
monotone.db                 TODO
monotone.db.bak             TODO~
monotone.db.pre-changesets  toms-notes.txt
monotone.db-pre-sql3        toms-notes.txt~
MT/&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;You can see that there is a lot of accumulated cruft
in my working directory, including &lt;span class="caps"&gt;CVS&lt;/span&gt;, monotone, and
now darcs revision-control artifacts.  To prevent
Perl&amp;#8217;s Module::Build from thinking the _darcs
directory is meaningful, I added it to the manifest-skip file.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;echo '\b_darcs\b' &amp;gt;&amp;gt; MANIFEST.SKIP&lt;/strong&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;Next I added my LectroTest sources, docs, and related files
to the darcs repo.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;darcs add Build.PL buildrpm Changes \
    checkpods MANIFEST MANIFEST.SKIP tex THANKS TODO \
    toms-notes.txt tex/Makefile tex/titlepage.ltx&lt;/strong&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;The &amp;#8220;darcs whatsnew&amp;#8221; command asks darcs to tell me what is
changed in the working directory with respect to the repository
state.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;darcs whatsnew -s&lt;/strong&gt;
A ./Build.PL
A ./Changes
A ./MANIFEST
A ./MANIFEST.SKIP
A ./THANKS
A ./TODO
A ./buildrpm
A ./checkpods
A ./tex/
A ./tex/Makefile
A ./tex/titlepage.ltx
A ./toms-notes.txt&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;The files that I added are new because I had not yet recorded
them to the repository.  Before I did that, I added the
remaining LT assets.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;darcs add t  # add the tests dir&lt;/strong&gt;
[tom@bifur qc]$ &lt;strong&gt;darcs add t/*.t&lt;/strong&gt;
[tom@bifur qc]$ &lt;strong&gt;darcs add lib&lt;/strong&gt;
[tom@bifur qc]$ &lt;strong&gt;cd lib&lt;/strong&gt;
[tom@bifur lib]$ &lt;strong&gt;l&lt;/strong&gt;
Test/
[tom@bifur lib]$ &lt;strong&gt;darcs add Test&lt;/strong&gt;
[tom@bifur lib]$ &lt;strong&gt;cd Test&lt;/strong&gt;
[tom@bifur Test]$ &lt;strong&gt;l&lt;/strong&gt;
LectroTest/    LectroTest.pm~     LectroTest::Tutorial.pod~
LectroTest.pm  LectroTest.pm.bak
[tom@bifur Test]$ &lt;strong&gt;darcs add LectroTest LectroTest.pm&lt;/strong&gt;
[tom@bifur Test]$ &lt;strong&gt;cd LectroTest&lt;/strong&gt;
[tom@bifur LectroTest]$ &lt;strong&gt;l&lt;/strong&gt;
Compat.pm      Generator.pm~     Simple.pm~         Tutorial.pod
Compat.pm~     Generator.pm.bak  Test.pm~           Tutorial.pod~
Compat.pm.bak  Property.pm       TestRunner.pm      Tutorial.pod.bak
CVS/           Property.pm~      TestRunner.pm~
Generator.pm   Property.pm.bak   TestRunner.pm.bak
[tom@bifur LectroTest]$ &lt;strong&gt;darcs add *.pm *.pod&lt;/strong&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;At this point, it looked like I had all of the files under
darcs&amp;#8217;s watchful eye.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur LectroTest]$ &lt;strong&gt;darcs w -s  # abbreviated: w -&amp;gt; whatsnew&lt;/strong&gt;
A ./Build.PL
A ./Changes
A ./MANIFEST
A ./MANIFEST.SKIP
A ./THANKS
A ./TODO
A ./buildrpm
A ./checkpods
A ./lib/
A ./lib/Test/
A ./lib/Test/LectroTest/
A ./lib/Test/LectroTest.pm
A ./lib/Test/LectroTest/Compat.pm
A ./lib/Test/LectroTest/Generator.pm
A ./lib/Test/LectroTest/Property.pm
A ./lib/Test/LectroTest/TestRunner.pm
A ./lib/Test/LectroTest/Tutorial.pod
A ./t/
A ./t/001.t
A ./t/002.t
A ./t/003.t
A ./t/004.t
A ./t/005.t
A ./t/compat.t
A ./tex/
A ./tex/Makefile
A ./tex/titlepage.ltx
A ./toms-notes.txt

[tom@bifur LectroTest]$ &lt;strong&gt;cd ../../..  # back up to project home&lt;/strong&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;That looked right.  It was time to record my changes.
This was straightforward.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;darcs record --all    # record all changes&lt;/strong&gt;

Darcs needs to know what name (conventionally an email address) to use
as the patch author, e.g. 'Fred Bloggs &amp;lt;fred@bloggs.invalid&amp;gt;'.
If you provide one now it will be stored in the file
'_darcs/prefs/author' and used as a default in the future.  To change
your preferred author address, simply delete or edit this file.

What is your email address? &lt;strong&gt;Tom Moertel &amp;lt;tom@moertel.com&amp;gt;&lt;/strong&gt;
What is the patch name? &lt;strong&gt;Initial checkin of sources&lt;/strong&gt;
Do you want to add a long comment? [yn] &lt;strong&gt;n&lt;/strong&gt;
Finished recording patch 'Initial checkin of sources'&lt;/pre&gt;&lt;/div&gt;

&lt;p class="paragraph"&gt;Now what did darcs think has changed?&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;darcs w -s&lt;/strong&gt;
No changes!&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;Excellent.&lt;/p&gt;&lt;p class="paragraph"&gt;One cool feature of darcs is that every working directory
is also a complete, independent repository.  To make a branch,
then, is as simple as checking out a new repository.&lt;/p&gt;&lt;p class="paragraph"&gt;Of course, because there is no central repository in the darcs model,
&amp;#8220;checking out&amp;#8221; is a concept that does not really apply.  Rather, what
I must do is set up a new repository and then &amp;#8220;push&amp;#8221; my existing
repository&amp;#8217;s patches to it.  I can push in many ways, including
via ssh to a remotely hosted repository, but here I will just set up
a new repo in /tmp and push to it on the local filesystem.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;mkdir /tmp/lt &amp;amp;&amp;amp; pushd /tmp/lt&lt;/strong&gt;
/tmp/lt ~/work/research/perl/qc
[tom@bifur lt]$ &lt;strong&gt;darcs init   # set up new repo at /tmp/lt&lt;/strong&gt;
[tom@bifur lt]$ &lt;strong&gt;popd&lt;/strong&gt;
~/work/research/perl/qc
[tom@bifur qc]$ &lt;strong&gt;darcs push /tmp/lt   # push to repo at /tmp/lt&lt;/strong&gt;
Sat Feb 12 01:26:15 EST 2005  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Initial checkin of sources
Shall I push this patch? (1/1) [ynWvxqadjk], or ? for help: y
Finished applying...&lt;/pre&gt;&lt;/div&gt;

&lt;p class="paragraph"&gt;Now, I can begin working on my new branch in the /tmp/lt working
directory.&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur qc]$ &lt;strong&gt;cd /tmp/lt&lt;/strong&gt;
[tom@bifur lt]$ &lt;strong&gt;l&lt;/strong&gt;
Build.PL  Changes    _darcs/  MANIFEST       posts/  tex/    TODO
buildrpm  checkpods  lib/     MANIFEST.SKIP  t/      THANKS  toms-notes.txt
[tom@bifur lt]$ &lt;strong&gt;emacs lib/Test/LectroTest.pm   # fix typo&lt;/strong&gt;
[tom@bifur lt]$ &lt;strong&gt;darcs record&lt;/strong&gt;
hunk ./lib/Test/LectroTest.pm 38
-of your software.  LectroTest then checks your software see whether
+of your software.  LectroTest then checks your software to see whether
Shall I record this patch? (1/1) [ynWsfqadjk], or ? for help: &lt;strong&gt;y&lt;/strong&gt;

What is the patch name? &lt;strong&gt;Fixed stupid typo in intro text of T::LectroTest.pm&lt;/strong&gt;
Do you want to add a long comment? [yn] &lt;strong&gt;n&lt;/strong&gt;
Finished recording patch 'Fixed stupid typo in intro text of T::LectroTest.pm'&lt;/pre&gt;&lt;/div&gt;

&lt;p class="paragraph"&gt;Now my branch repository contains two patches:&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur lt]$ &lt;strong&gt;darcs changes&lt;/strong&gt;
Sat Feb 12 13:20:07 EST 2005  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Fixed stupid typo in intro text of T::LectroTest.pm
Sat Feb 12 01:26:15 EST 2005  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Initial checkin of sources&lt;/pre&gt;&lt;/div&gt;&lt;p class="paragraph"&gt;Because the typo that I fixed is not unique to my new branch, I ought
to make sure that the original branch gets the fix, too.  To do so, I
just push it:&lt;/p&gt;&lt;div class="code"&gt;&lt;pre&gt;[tom@bifur lt]$ &lt;strong&gt;darcs push ~/work/research/perl/qc&lt;/strong&gt;
Pushing to /home/thor/work/research/perl/qc...
Sat Feb 12 13:20:07 EST 2005  Tom Moertel &amp;lt;tom@moertel.com&amp;gt;
  * Fixed stupid typo in intro text of T::LectroTest.pm
Shall I push this patch? (1/1) [ynWvxqadjk], or ? for help: &lt;strong&gt;y&lt;/strong&gt;
Finished applying...&lt;/pre&gt;&lt;/div&gt;

&lt;p class="paragraph"&gt;And now my patch has been pushed back up to the mainstream
branch!  This is an attractive development model.&lt;/p&gt;&lt;p class="paragraph"&gt;So far, I like darcs.  Its source code&amp;#8211;management model is
simple and powerful.  Its command set is small enough to actually
grok.  Using darcs has me wondering why other &lt;span class="caps"&gt;SCM&lt;/span&gt; systems have made
the problem seem so complicated.  My life is complicated enough as it
is.&lt;/p&gt;&lt;p class="paragraph"&gt;I think I just switched to darcs.&lt;/p&gt;</description>
      <pubDate>Sat, 12 Feb 2005 12:00:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:9aee241770964656d442d1c561d5ec69</guid>
      <author>Tom Moertel</author>
      <link>http://blog.moertel.com/articles/2005/02/12/source-code-management-with-darcs-a-first-look</link>
      <category>programming</category>
      <category>haskell</category>
      <category>scm</category>
      <category>darcs</category>
      <category>source</category>
      <category>monotone</category>
      <trackback:ping>http://blog.moertel.com/articles/trackback/50</trackback:ping>
    </item>
  </channel>
</rss>
