<?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>dead fish &#187; Coding</title>
	<atom:link href="http://www.thomaskeller.biz/blog/category/coding/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thomaskeller.biz/blog</link>
	<description>only dead fish swim with the stream</description>
	<lastBuildDate>Wed, 28 Jul 2010 11:13:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>New local pre-commit hook in monotone</title>
		<link>http://www.thomaskeller.biz/blog/2010/07/19/new-local-pre-commit-hook-in-monotone/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/07/19/new-local-pre-commit-hook-in-monotone/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 17:13:06 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=724</guid>
		<description><![CDATA[There was only one hook in monotone until now which could be &#8220;reused&#8221; to interact with the commit process and validate the changeset that should be committed, the validate_commit_message hook. But this was a bit clumsy as it was actually designed to validate the commit message (as the name suggests) and not the changeset, thus [...]]]></description>
			<content:encoded><![CDATA[<p>There was only one hook in monotone until now which could be &#8220;reused&#8221; to interact with the commit process and validate the changeset that should be committed, the <code>validate_commit_message</code> hook. But this was a bit clumsy as it was actually designed to validate the commit message (as the name suggests) and not the changeset, thus the hook was called <em>after</em> the commit message was entered in the editor (or was given with <code>--message</code> or <code>--message-file</code>).</p>

<p>Now monotone (from 0.99 onwards) gained a new commit hook which is called before the commit message processing takes place, but after the logic validated the changeset and branch to which it should be committed. Its named simply <code>validate_changes</code> and takes two parameters, the revision to be committed as full text (parsable in the hook via <code>parse_basic_io</code>) as the first and the name of the branch to which the revision should be committed as the second. Just as <code>validate_commit_message</code>, it is expected to return a tupel containing a boolean which denotes if the change is valid or not and an optional string which explains the reason if not and which is displayed to the committer afterwards.</p>

<p>With this new installment, it should feel natural e.g. to create a pre-commit hook which ensures that none of the patched or added sources contains Windows line endings:</p>

<p><pre>
function validate_changes(revdata, branchname)
  local parsed = parse_basic_io(revdata)
  for _,stanza in ipairs(parsed) do
    if stanza.name == "add_file" or
       stanza.name == "patch" then
      local file = stanza.values[1]
      if not guess_binary_file_contents(file) then
        local fp = assert(io.open(file, "r"))
        local contents = fp:read("*all")
        fp:close()
        if string.find(contents, "\r\n") then
          return false, "CRLF detected"
        end
      end
    end
  end
  return true, ""
end
</pre></p>

<p>Unfortunately its not yet possible to call <code>mtn_automate</code>, the lua interface to monotone&#8217;s automation commands, from hooks like this. Then we could have saved the <code>read("*all")</code> call and would only have to scan the output of <code>automate content_diff</code>, which should be a little faster than doing a full string search in lua for bigger files. We, i.e. the monotone devs, are <a href="http://thread.gmane.org/gmane.comp.version-control.monotone.devel/17881">aware of the problem</a> though and will come up with a solution sooner or later.</p>

<p>I hope this new hook will still be useful for some of you until then.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/07/19/new-local-pre-commit-hook-in-monotone/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mailing list roundup</title>
		<link>http://www.thomaskeller.biz/blog/2010/07/14/mailing-list-roundup/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/07/14/mailing-list-roundup/#comments</comments>
		<pubDate>Wed, 14 Jul 2010 11:31:43 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=722</guid>
		<description><![CDATA[I&#8217;ve just set up a new mailing list specifically for monotone users, who find the (sometimes endless) developer discussions too boring or are annoyed of ticket spam. You can find the new list&#8217;s interface here. The plan is to do basic first level support on this list and move developer-relevant parts via cross-posting over to [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just set up a <a href="http://lists.nongnu.org/mailman/listinfo/monotone-users">new mailing list</a> specifically for monotone users, who find the (sometimes endless) developer discussions too boring or are annoyed of ticket spam. You can find the new list&#8217;s interface <a href="http://lists.nongnu.org/mailman/listinfo/monotone-users">here</a>.</p>

<p>The plan is to do basic first level support on this list and move developer-relevant parts via cross-posting over to the old <a href="http://lists.nongnu.org/mailman/listinfo/monotone-devel">monotone-devel</a> list. While I&#8217;m already subscribed to the new list, I encourage a couple of other developers to subscribe there as well, in case I&#8217;m not available.</p>

<p>I also registered monotone-users and the pre-existing one for the <a href="http://lists.nongnu.org/mailman/listinfo/monotone-users">Debian packaging team</a> on Gmane, but it will take a bit more time until they set them up over there, so please be patient.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/07/14/mailing-list-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>guitone and monotone 0.48</title>
		<link>http://www.thomaskeller.biz/blog/2010/07/07/guitone-and-monotone-0-48/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/07/07/guitone-and-monotone-0-48/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 08:40:32 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[guitone]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=710</guid>
		<description><![CDATA[The current fourth release candidate of guitone doesn&#8217;t work out of the box with monotone 0.48. The reason is that the minor interface version changed slightly and my version check is too strict in this regard. But there is an option for the rescue &#8211; simply check &#8220;relaxed version check&#8221; in the preferences and guitone [...]]]></description>
			<content:encoded><![CDATA[<p>The current fourth release candidate of guitone doesn&#8217;t work out of the box with monotone 0.48. The reason is that the minor interface version changed slightly and my version check is too strict in this regard. But there is an option for the rescue &#8211; simply check &#8220;relaxed version check&#8221; in the preferences and guitone will happily work with monotone 0.48 and later versions, unless a major change lets something break there:</p>

<div style="text-align: center"><a href="http://www.thomaskeller.biz/blog/wp-content/uploads/2010/07/relaxed_version_check.png"><img class="aligncenter size-full wp-image-711" title="&quot;relaxed version check&quot; option" src="http://www.thomaskeller.biz/blog/wp-content/uploads/2010/07/relaxed_version_check.png" alt="" width="379" height="257" /></a></div>

<p>The final version of guitone will probably take a little longer, since I want to synchronize this release with the release of 0.99 / 1.0 of monotone, so stay tuned. Other development continues in the meantime, I&#8217;m currently working on including support to query remote databases from guitone, which will likely make it into guitone 1.1.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/07/07/guitone-and-monotone-0-48/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sender verification failed &#8211; or How you should treat your customers correctly</title>
		<link>http://www.thomaskeller.biz/blog/2010/06/24/sender-verification-failed-or-how-you-should-treat-your-customers-correctly/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/06/24/sender-verification-failed-or-how-you-should-treat-your-customers-correctly/#comments</comments>
		<pubDate>Thu, 24 Jun 2010 22:08:50 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Rants]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=699</guid>
		<description><![CDATA[For a couple of years now, one of the easiest, yet very powerful anti-spam techniques is sender verification. Often spam is sent from bogus email addresses which contain random strings and are therefor also hard to blacklist. In this process the receiving mail server simply checks the From: header of every mail and asks the [...]]]></description>
			<content:encoded><![CDATA[<p>For a couple of years now, one of the easiest, yet very powerful anti-spam techniques is sender verification. Often spam is sent from bogus email addresses which contain random strings and are therefor also hard to blacklist. In this process the receiving mail server simply checks the <code>From:</code> header of every mail and asks the sending mail server if it actually knows the sending user. If not, the receiving mail server will most likely immediately discard the message with a &#8220;550: sender verify failed&#8221;. To not put a high load on the sending server, the result is cached in the receiving one, so if you receive 20 mails from bob@foo.com, its sending server is probably only asked once (or not at all if it has been asked before).</p>

<p>My exim instance has sender verification enabled by default and I like it, because ~90% of the spam doesn&#8217;t even need to get scanned by spamassassin, which in return means lower server load. However, sender verification also makes problems sometimes, especially if automatically crafted emails from, lets call them &#8220;legacy&#8221;, systems should reach me. You can of course replace &#8220;legacy&#8221; with &#8220;simple PHP mail script&#8221; or &#8220;shop frontend&#8221; if you like, as administrators or developers of these systems are apparently completely unaware of the bad job they do, if they fulfil the requirement &#8220;hey, the user should get this notification email, but ensure that he won&#8217;t spam the support with questions about it, so use an invalid address&#8230;&#8221;</p>

<p>You know what follows: The novice, or sometimes also not so novice developer / administrator, simply goes ahead and sets <code>noreply@host.com</code> as <code>From:</code> address. Especially in shared hosting environments there is usually an MX server configured for the hosted domain which allows local relaying, so sending a mail from a PHP script like this</p>

<p><pre code="php">
mail("joe@otherhost.com", "Hello", "It works!",
     "From: noreply@host.com\r\n");
</pre></p>

<p>seems so simple. Of course most of the time it gets completly forgotten to give the mail server of the <code>host.com</code> domain a notice that there is suddenly a new (bogus) mail user available within one of his managed domains! So how do you fulfil the &#8220;don&#8217;t spam the support&#8221; requirement then?</p>

<p>Well, the simplest way is to use an existing mail address which is known within the sending mail server and then also add a <code>Reply-To:</code> header to your mail which may then contain the bogus address. If the user clicks on &#8220;reply&#8221; in his mail client, this reply-to address will pop up in the <code>To:</code> field and you practically achieve the same effect.</p>

<p>But probably the best way is of course to convince your management that it should not ignore customer inquiries by stupid procedures like this&#8230;</p>

<p>As a customer of several online services I have encountered this and similar mail problems a lot in the past. I cannot remember exactly when I actually stopped informing the individual webmaster or support team about the problems they had with their mail setup, simply because my inquiries had been ignored most of the time. See this blog post as a silent rant for all the crappy configured setups out there.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/06/24/sender-verification-failed-or-how-you-should-treat-your-customers-correctly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>monotone 0.48 released</title>
		<link>http://www.thomaskeller.biz/blog/2010/06/14/monotone-0-48-released/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/06/14/monotone-0-48-released/#comments</comments>
		<pubDate>Sun, 13 Jun 2010 23:01:28 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=696</guid>
		<description><![CDATA[We, the monotone developers, are very proud to announce the new 0.48 release of our distributed version control system. This release comes with dozens of bug fixes &#8211; a fall-out of joint efforts during a bug hunt fest earlier this year &#8211; and some interesting new features, such as an improved changelog editing view and [...]]]></description>
			<content:encoded><![CDATA[<p>We, the <a href="http://monotone.ca">monotone developers</a>, are very proud to announce the new 0.48 release of our distributed version control system.</p>

<p>This release comes with dozens of bug fixes &#8211; a fall-out of joint efforts during a <a href="http://www.thomaskeller.biz/blog/2010/05/11/bugfest-analysis/">bug hunt fest earlier</a> this year &#8211; and some interesting new features, such as an improved changelog editing view and <a href="http://www.thomaskeller.biz/blog/2010/05/27/database-management-made-easy/">new database management features</a>.</p>

<p>Please check as always the <a href="http://monotone.ca/NEWS">NEWS file</a> for a detailed list of changes and improvements. Binaries will be posted as they come in and will be retrievable from the <a href="http://monotone.ca/downloads.php">Downloads page</a>.</p>

<p>For the next version of monotone expect further stabilization work and UI improvements as well as completed localizations. We plan to make another minor release and are approaching 1.0&#8230; finally!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/06/14/monotone-0-48-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>monotone translators needed</title>
		<link>http://www.thomaskeller.biz/blog/2010/06/09/monotone-translators-needed/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/06/09/monotone-translators-needed/#comments</comments>
		<pubDate>Wed, 09 Jun 2010 10:55:06 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=694</guid>
		<description><![CDATA[So you can&#8217;t code C++, but still want to help out our little version control system? Fine, then maybe you&#8217;re fluent or even native with a foreign language &#8211; if so, our translation team could really need your help! Right now monotone ships with five active translations, Swedish (maintained by Richard Levitte) , Italian (maintained [...]]]></description>
			<content:encoded><![CDATA[<p>So you can&#8217;t code C++, but still want to help out our little <a href="http://monotone.ca">version control</a> system? Fine, then maybe you&#8217;re fluent or even native with a foreign language &#8211; if so, our translation team could really need your help!</p>

<p>Right now monotone ships with five active translations, Swedish (maintained by Richard Levitte) , Italian (maintained by Lapo Luchini), Spanish (maintained by Nicolas Ruiz), Portuguese (maintained by Américo Monteiro) and German (maintained by myself, Thomas Keller). Especially the first three maintainers are currently a bit behind and short on time, so if you are capable to help out, just drop me a note or send a message to <a href="mailto:monotone-i18n@nongnu.org">monotone-i18n@nongnu.org</a>.</p>

<p>We also have two more &#8220;inactive&#8221; translations, French and Japanese, lurking around in our source tree which you could pick up and complete, but its a bit more work to finish these.</p>

<p>Beside that you can also start with a completely new translation and I&#8217;d be happy to assist you with everything you need for that. Again, just drop me a note or send a message to the <a href="mailto:monotone-i18n@nongnu.org">group</a>, we&#8217;ll quickly set you up!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/06/09/monotone-translators-needed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Makefile-based InnoSetup automation with QMake</title>
		<link>http://www.thomaskeller.biz/blog/2010/06/03/makefile-based-innosetup-automation-with-qmake/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/06/03/makefile-based-innosetup-automation-with-qmake/#comments</comments>
		<pubDate>Thu, 03 Jun 2010 20:57:21 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[Qt]]></category>
		<category><![CDATA[guitone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=681</guid>
		<description><![CDATA[Over the last couple of weeks I did several major improvements to the QMake-based build setup guitone uses: The project file comes now with one target to create a tarball, one to create a Mac OS X disk image containing all the needed Qt libraries and one target to install the application, which can be [...]]]></description>
			<content:encoded><![CDATA[<p>Over the last couple of weeks I did several major improvements to the QMake-based build setup <a href="http://guitone.thomaskeller.biz">guitone</a> uses: The project file comes now with one target to create a tarball, one to create a Mac OS X disk image containing all the needed Qt libraries and one target to install the application, which can be configured to use all the options you know from autotool-based projects (like PREFIX, BINDIR or DESTDIR, to name a few).</p>

<p>But yes, there was one task which was yet missing there &#8211; one to automatically create a Win32 installer. The steps to produce that had been so far:</p>

<ol>
<li>enter the to-be-packaged version in the InnoSetup script file</li>
<li>convert the supplied text files from Unix to DOS line endings, while giving them a .txt extension</li>
<li>call the InnoSetup compiler on the script file and create the executable</li>
</ol>

<p>Especially the first and second action looked hard to automate, given the fact that Windows does not come with a rich set of tools to process text streams &#8211; and requiring a Cygwin installation just for using <code>sed</code> seemed awkward to me. Obviously other people had similar problems before and <a href="http://stackoverflow.com/questions/127318/is-there-any-sed-like-utility-for-cmd-exe">somebody proposed</a> to emulate sed with a VBScript which would be executed by the Windows Scripting Host (WSH). Wow, cool thing &#8211; if I&#8217;d just remember my broken Visual Basic knowledge. But didn&#8217;t Microsoft have this Javascript Look-a-Like, JScript? Shouldn&#8217;t this be executable as well?</p>

<p>Apparently it was and I sat down to hack an improved JScript <code>sed</code> version:</p>

<pre><code>var patterns  = new Array();
var replacements = new Array();
var argcount = 0;

for (var i=0; i&lt;WScript.Arguments.length; ++i)
{
    pat = WScript.Arguments(i).split("/");
    if (pat.length != 4)
        continue;

    patterns[argcount] = new RegExp(pat[1]);
    replacements[argcount] = pat[2];  
    ++argcount;
}

while (!WScript.StdIn.AtEndOfStream)
{
    var line = WScript.StdIn.ReadLine();
    for (var i=0; i&lt;argcount; ++i)
    {
        line = line.replace(patterns[i], replacements[i]);
    }
    WScript.Echo(line);
}
</code></pre>

<p></p>

<p>Now the only thing what was left was to fiddle around with the WSH command line tool <code>cscript</code> and to combine everything for a proper QMake target. Here we go:</p>

<p><pre>
DOCFILES="NEWS README README.driver COPYING"
...
win32 {
    isEmpty(QTDIR):QTDIR           = "c:\Qt\4.6.2"
    isEmpty(MINGWDIR):MINGWDIR     = "c:\MinGW"
    isEmpty(OPENSSLDIR):OPENSSLDIR = "c:\OpenSSL"
    isEmpty(ISCC):ISCC = "c:\Program Files\Inno Setup 5\ISCC.exe"
&nbsp;&nbsp;&nbsp;&nbsp;
    win32setup.depends  = make_first
    win32setup.target   = win32setup
    win32setup.commands = \
        cscript //NoLogo res\win32\sed.js \
            s/@@VERSION@@/$${VERSION}/ \
            s/@@QTDIR@@/$${QTDIR}/ \
            s/@@MINGWDIR@@/$${MINGWDIR}/ \
            s/@@OPENSSLDIR@@/$${OPENSSLDIR}/ \
            &lt; res\win32\guitone.iss.in > res\win32\guitone.iss &amp;&amp; \
        ( for %%f in ($$DOCFILES) do \
            cscript //NoLogo res\win32\sed.js \
                s/\n\$$/\r\n/ \
                &lt; %%f > %%f.txt ) &amp;&amp; \
        \"$$ISCC\" res\win32\guitone.iss &amp;&amp; \
        ( for %%f IN ($$DOCFILES) do del %%f.txt )
&nbsp;&nbsp;&nbsp;&nbsp;
    QMAKE_EXTRA_TARGETS += win32setup
}
</pre></p>

<p>So if you know enough Javascript you can probably emulate whatever tool you're missing on Win32 without having to depend on any external dependency. Very cool!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/06/03/makefile-based-innosetup-automation-with-qmake/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mtn-browse 0.70 and accompanying Perl monotone library released</title>
		<link>http://www.thomaskeller.biz/blog/2010/05/31/mtn-browse-0-70-and-accompanying-perl-monotone-library-released/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/05/31/mtn-browse-0-70-and-accompanying-perl-monotone-library-released/#comments</comments>
		<pubDate>Mon, 31 May 2010 20:45:28 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=674</guid>
		<description><![CDATA[Tony Cooper writes on monotone-devel: I would like to announce the 0.70 release of mtn-browse: Monotone browser (mtn-browse) is an application for browsing Monotone VCS databases without the need for a workspace. The interface allows one to: Easily select a revision from within a branch Find a revision using complex queries Navigate the contents of [...]]]></description>
			<content:encoded><![CDATA[<p>Tony Cooper writes on monotone-devel:</p>

<blockquote>
I would like to announce the 0.70 release of mtn-browse:
<br /><br />
Monotone browser (mtn-browse) is an application for browsing Monotone VCS databases without the need for a workspace. The interface allows one to:

<ul>
<li>Easily select a revision from within a branch</li>
<li>Find a revision using complex queries</li>
<li>Navigate the contents of a revision using a built in file manager</li>
<li>Display file contents, either using the internal viewer or an external helper application</li>
<li>Compare the changes between different revisions or versions of a file either using the internal difference viewer or an external application</li>
<li>Find files within a revision based on detailed search criteria</li>
<li>Display file annotations and easily refer back to the corresponding change documentation</li>
<li>Save files to disk</li>
<li>Browse remote databases via the netsync protocol</li>
<li>Support for Monotone version 0.35 up to 0.47</li>
<li>Extensive built in help</li>
<li>In English with additional German locale</li>
</ul>

This version brings many bug fixes and locale support improvements along with support for the newer versions of Monotone. The source can be <a href="http://sourceforge.net/projects/mtn-browse
">downloaded from here</a>.
<br /><br />
Monotone::AutomateStdio is an object oriented Perl library module that allows Perl applications to easily interface with Monotone&#8217;s automate stdio interface. This library supports Monotone versions 0.35 
up to and including 0.47. All of the automate stdio functions are available via this library. The source and documentation can be <a href="http://search.cpan.org/perldoc?Monotone::AutomateStdio
">downloaded from here</a>.
<br /><br />
Both projects currently support Linux and Mac OS X, but should also work on Solaris and other Unixes. They are considered stable (well at least by me) so let me know if you run into problems.
</blockquote>

<p>Keep up the good work, Tony!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/05/31/mtn-browse-0-70-and-accompanying-perl-monotone-library-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>guitone 1.0rc4: we have a winner! (updated)</title>
		<link>http://www.thomaskeller.biz/blog/2010/05/30/guitone-1-0rc4-we-have-a-winner/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/05/30/guitone-1-0rc4-we-have-a-winner/#comments</comments>
		<pubDate>Sat, 29 May 2010 23:53:52 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[guitone]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=665</guid>
		<description><![CDATA[This fourth release candidate is dedicated to Lena, the Eurovision Song Contest Winner of 2010 . It comes with a few new nifty features like an improved changeset browser and enhanced certificate support, as well as a couple of other smaller improvements and bugfixes. The Tarball and a Mac OS X disk image can already [...]]]></description>
			<content:encoded><![CDATA[<p>This fourth release candidate is dedicated to Lena, <a href="http://www.eurovision.tv/">the Eurovision Song Contest Winner of 2010</a> <img src='http://www.thomaskeller.biz/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> . It comes with a few new nifty features like an improved changeset browser and enhanced certificate support, as well as a couple of other smaller improvements and bugfixes.</p>

<p>The Tarball and a Mac OS X disk image can already be downloaded at the <a href="http://guitone.thomaskeller.biz/g/download">usual location</a>, the Windows installer will follow shortly. <b>[Update:</b> The Windows installer has been added.<b>]</b></p>

<p>As always, <a href="https://guitone.thomaskeller.biz/g/tracker">please report bugs</a> if possible. And while guitone now comes with one new translation, Portuguese, thanks to Américo Monteiro, I&#8217;m still looking for more translators &#8211; if you&#8217;re interested, drop me a note!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/05/30/guitone-1-0rc4-we-have-a-winner/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Database management made easy</title>
		<link>http://www.thomaskeller.biz/blog/2010/05/27/database-management-made-easy/</link>
		<comments>http://www.thomaskeller.biz/blog/2010/05/27/database-management-made-easy/#comments</comments>
		<pubDate>Thu, 27 May 2010 08:58:16 +0000</pubDate>
		<dc:creator>Thomas Keller</dc:creator>
				<category><![CDATA[Coding]]></category>
		<category><![CDATA[monotone]]></category>

		<guid isPermaLink="false">http://www.thomaskeller.biz/blog/?p=656</guid>
		<description><![CDATA[I&#8217;ve just merged a new feature to monotone&#8216;s mainline which introduces database management features in the next major version. &#8220;Huh, database management? What are you talking about?&#8221; you might ask. Well, let me explain: If you work with monotone you know that it has a strong concept of keeping workspace and repository distinct from each [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve just merged a new feature to <a href="http://monotone.ca">monotone</a>&#8216;s mainline which introduces database management features in the next major version. &#8220;Huh, database management? What are you talking about?&#8221; you might ask. Well, let me explain:</p>

<p>If you work with monotone you know that it has a strong concept of keeping workspace and repository distinct from each other, unlike for example git, where you can accidentially destroy unpushed changes if you remove your workspace. On the other hand separate databases make monotone workspaces also very lightweight, because checking out a new feature branch is a matter of seconds with an existing database.</p>

<p>Regular monotone users also keep separate projects in separate databases, because that eases the synchronization with other nodes (you don&#8217;t have to define complex include / exclude patterns for this then). But they may now face the problem that they have many databases with even more checked out workspaces in different places. Questions like &#8220;Uh, have I pulled this already? Where is my workspace again&#8230;? What branch is checked out there again&#8230;?&#8221; may arise &#8211; and working with long relative or absolute paths to use the correct database is not easier as well.</p>

<p>Monotone for the rescue! In the upcoming release monotone offers a way to manage regular databases in pre-defined places and allows access to these databases only by giving the file or base name as an argument for the <code>--database</code> option. Additionally, a new command <code>mtn list databases</code> (or <code>mtn ls dbs</code> for short) lists all available databases and shows the known workspaces of these databases.</p>

<h4>Give me an example, already!</h4>

<p>Lets do an example and create a new project:
<pre>$ mtn setup -b my.test.branch test-branch
mtn: initializing new database '/home/thomas/.monotone/databases/default.mtn'</pre>
Several things happened here: Just like the <code>clone</code> command, <code>setup</code> will also create a database if no database is explicitely given, but it will not put this database in the bookkeeping directory as <code>clone</code> did in the past versions. Instead, it looks if a default database with the name &#8220;default.mtn&#8221; (this is configurable via a hook, named <code>get_default_database_alias</code>) exists in the first found default location and if not, creates it. Subsequent calls to <code>setup</code> and <code>clone</code> will use the same database unless otherwise specified.</p>

<p>The default locations where monotone looks for managed databases is configurable through another hook, named <code>get_default_database_locations</code>. This hook defaults to <code>%APPDIR%\monotone\databases</code> on Windows and <code>$HOME/.monotone/databases</code> on Linux.</p>

<p>If you now look at <code>_MTN/options</code> of your new workspace, you&#8217;ll see that the database option does not contain an absolute path, but a so-called alias which is used by monotone internally to look up the actual location of the database:
<pre>$ cat test-branch/_MTN/options
database ":default.mtn"
  branch "my.test.branch"
  keydir "/home/thomas/.monotone/keys"</pre>
Aliases always start with a colon and are followed by the name or basename of the database. The following commands are therefor all use the same database:
<pre>$ mtn ls branches -d :default.mtn
$ mtn ls branches -d :default
$ mtn ls branches -d ~/.monotone/databases/default.mtn</pre></p>

<h4>Where are my workspaces?</h4>

<p>Now as promised monotone is also smart about knowing what workspaces you have created for a particular database. Whenever the database option of a workspace is changed, it removes the workspace path from the old database and adds it to the new one.</p>

<p>Lets look at the current output of the new list databases command:
<pre>$ mtn ls dbs
:default.mtn (in /home/thomas/.monotone/databases)
    my.test.branch (in /home/thomas/test-branch)</pre>
If you want to change the database of the workspace, all you have to do is calling a command which uses a workspace (f.e. <code>status</code>) with the new database option:
<pre>$ mtn db init -d :test
$ cd test-branch &amp;&amp; mtn status -d :test
[... output of mtn status ...]</pre>
Now if we check the output of the <code>list databases</code> command again, we see the following:
<pre>$ mtn ls dbs
:default.mtn (in /home/thomas/.monotone/databases):
        no known valid workspaces
:test.mtn (in /home/thomas/.monotone/databases):
        my.test.branch (in /home/thomas/test-branch)</pre>
One thing monotone can&#8217;t automatically catch and handle is if you move a workspace within the file system. For this use case, two utility commands have been added, <code>register_workspace</code> and <code>unregister_workspace</code>:
<pre>$ ( cd test-branch &amp;&amp; mtn unregister_workspace )
$ mv test-branch my-test-branch
$ ( cd my-test-branch &amp;&amp; mtn register_workspace )</pre>
Thanks to the manual (de)registration, the output of <code>list databases</code> is still correct:
<pre>$ mtn ls dbs
:default.mtn (in /home/thomas/.monotone/databases):
        no known valid workspaces
:test.mtn (in /home/thomas/.monotone/databases):
        my.test.branch (in /home/thomas/my-test-branch)</pre>
Thats it. I&#8217;d love to hear your comments on this new feature. Thanks for reading!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thomaskeller.biz/blog/2010/05/27/database-management-made-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
