<?xml version="1.0" encoding="utf-8" ?>

<rss version="2.0" 
   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
   xmlns:admin="http://webns.net/mvcb/"
   xmlns:dc="http://purl.org/dc/elements/1.1/"
   xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
   xmlns:wfw="http://wellformedweb.org/CommentAPI/"
   xmlns:content="http://purl.org/rss/1.0/modules/content/"
   >
<channel>
    <title>Code Kills - DrProject</title>
    <link>http://blog.codekills.net/</link>
    <description></description>
    <dc:language>en</dc:language>
    <admin:errorReportsTo rdf:resource="mailto:david@wolever.net" />
    <generator>Serendipity 1.1.3 - http://www.s9y.org/</generator>
    <pubDate>Wed, 16 Apr 2008 18:47:35 GMT</pubDate>

    <image>
        <url>http://blog.codekills.net/templates/default/img/s9y_banner_small.png</url>
        <title>RSS: Code Kills - DrProject - </title>
        <link>http://blog.codekills.net/</link>
        <width>100</width>
        <height>21</height>
    </image>

<item>
    <title>Another reason I like SVK</title>
    <link>http://blog.codekills.net/archives/37-Another-reason-I-like-SVK.html</link>
            <category>DrProject</category>
            <category>Work</category>
    
    <comments>http://blog.codekills.net/archives/37-Another-reason-I-like-SVK.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=37</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.codekills.net/rss.php?version=2.0&amp;type=comments&amp;cid=37</wfw:commentRss>
    

    <author>david@wolever.net (David Wolever)</author>
    <content:encoded>
    &lt;p&gt;I got a fairly significant patch to DrProject today.  I wanted to show it to the other developers so they could give it a look over.  How&#039;d I do it?&lt;/p&gt;

&lt;p&gt;&lt;html&gt;&lt;/p&gt;

&lt;pre&gt;
    $ patch -p0 &lt; patch
    ... check that it works ...
    &lt;font color=&quot;green&quot;&gt;# Create a new branch for the patch&lt;/font&gt;
    $ svk cp //drp/trunk //drp/branches/patch -m &quot;Created branch for patch&quot;
    &lt;font color=&quot;green&quot;&gt;# Do an in-place switch of my repository (which takes about 2 seconds,
    # versus the minute or two it would take to check the entire tree out)&lt;/font&gt;
    $ svk switch //drp/branches/patch 
    &lt;font color=&quot;green&quot;&gt;# Because switch doesn&#039;t revert modified files, the changes are still here,
    # ready to be checked in&lt;/font&gt;
    $ svk ci -m &quot;Checking in patched code&quot;
&lt;/pre&gt;

&lt;p&gt;&lt;/html&gt;&lt;/p&gt;

&lt;p&gt;Now they can use &lt;a href=&quot;http://www.drproject.org/&quot;&gt;DrProject&#039;s&lt;/a&gt; fancy online changeset viewer, checkout the code for themselves, use &lt;code&gt;svn diff&lt;/code&gt;... The list is endless.&lt;/p&gt;

&lt;p&gt;Now that rocks SO much more than mailing around &lt;code&gt;.diff&lt;/code&gt; files (and makes life happier when it comes time to pull it back into trunk).&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Wed, 16 Apr 2008 14:47:35 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/37-guid.html</guid>
    
</item>
<item>
    <title>Reverting Changes in SVN (or: it's not as easy as svn up -r)</title>
    <link>http://blog.codekills.net/archives/33-Reverting-Changes-in-SVN-or-its-not-as-easy-as-svn-up-r.html</link>
            <category>DrProject</category>
            <category>Python</category>
            <category>Work</category>
    
    <comments>http://blog.codekills.net/archives/33-Reverting-Changes-in-SVN-or-its-not-as-easy-as-svn-up-r.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=33</wfw:comment>

    <slash:comments>2</slash:comments>
    <wfw:commentRss>http://blog.codekills.net/rss.php?version=2.0&amp;type=comments&amp;cid=33</wfw:commentRss>
    

    <author>david@wolever.net (David Wolever)</author>
    <content:encoded>
    &lt;p&gt;If there is one thing that I&#039;ve found universally confusing about version control systems, it&#039;s how to revert back to a previous revision, then move on from there.  Conventional wisdom would dictate that &lt;code&gt;svn up -r $OLD&lt;/code&gt; with some additional flag that says &lt;code&gt;pretend that we&#039;re still at HEAD&lt;/code&gt; would do the trick... But, alas, there exists no such flag.&lt;/p&gt;

&lt;p&gt;So, besides &lt;code&gt;svn cat -r $OLD $FILE &amp;gt; $FILE&lt;/code&gt;, what&#039;s the best way to revert a file (or entire tree) to an older revision?  Well, it turns out that &lt;strong&gt;merge&lt;/strong&gt; is the tool you&#039;re looking for.&lt;/p&gt;

&lt;p&gt;The trick is that you can &lt;code&gt;diff&lt;/code&gt; backwards as well as forwards:&lt;/p&gt;

&lt;pre&gt;
[wolever@thebes] ~/test_dr/All svn diff -r &lt;strong&gt;2:1&lt;/strong&gt;
Index: stuff
===================================================================
--- stuff       (revision 2)
+++ stuff       (revision 1)
@@ -1,4 +1,3 @@
 Let us endeavor so to live that when we come to die even the undertaker will be
 sorry.
                -- Mark Twain, &quot;Pudd&#039;nhead Wilson&#039;s Calendar&quot;
-Increased knowledge will help you now.  Have mate&#039;s phone bugged.
Index: docs.html
&lt;/pre&gt;

&lt;p&gt;Which means that &lt;strong&gt;merge&lt;/strong&gt; will work both ways as well:&lt;/p&gt;

&lt;pre&gt;
[wolever@thebes] ~/test_dr/All svn &lt;strong&gt;merge -r 2:1&lt;/strong&gt; stuff
U    stuff
[wolever@thebes] ~/test_dr/All svn ci -m &quot;reverted changes&quot; stuff
[wolever@thebes] ~/test_dr/All svn diff -r 1:3 stuff
[wolever@thebes] ~/test_dr/All

&lt;/pre&gt;

&lt;p&gt;Of course, this will also work with the myriad of other version control tools out there.  In fact, if you&#039;re still using SVN, reverting old changes is probably the least of your problems... At least compared to, say, merging different branches ^_^&lt;/p&gt;

&lt;p&gt;But that&#039;s a post for another day -- I need to stop writing about merging and actually get on with, err, &lt;a href=&quot;https://www.drproject.org/DrProject/ticket/1236&quot;&gt;doing it&lt;/a&gt;...&lt;/p&gt;
 
    </content:encoded>

    <pubDate>Fri, 08 Feb 2008 11:57:24 -0500</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/33-guid.html</guid>
    
</item>
<item>
    <title>DrProject/Trac Wiki Syntax Highlighting for Vim</title>
    <link>http://blog.codekills.net/archives/22-DrProjectTrac-Wiki-Syntax-Highlighting-for-Vim.html</link>
            <category>DrProject</category>
            <category>Vim</category>
    
    <comments>http://blog.codekills.net/archives/22-DrProjectTrac-Wiki-Syntax-Highlighting-for-Vim.html#comments</comments>
    <wfw:comment>http://blog.codekills.net/wfwcomment.php?cid=22</wfw:comment>

    <slash:comments>0</slash:comments>
    <wfw:commentRss>http://blog.codekills.net/rss.php?version=2.0&amp;type=comments&amp;cid=22</wfw:commentRss>
    

    <author>david@wolever.net (David Wolever)</author>
    <content:encoded>
    &lt;p&gt;After being frustrated with boring &lt;a href=&quot;http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/spectro-html.html&quot;&gt;white-on-almost-black&lt;/a&gt; (&lt;a href=&quot;http://www.cs.cmu.edu/~maverick/VimColorSchemeTest/spectro.vim&quot;&gt;spectro&lt;/a&gt;) while working with &lt;a href=&quot;http://drproject.org&quot;&gt;DrProject&lt;/a&gt; wiki files, I broke down and wrote a Vim plugin to make the syntax pretty.  It will also parse most of the &lt;a href=&quot;http://trac.edgewall.org&quot;&gt;Trac&lt;/a&gt; syntax (and more should be easy to add).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Get it:&lt;/strong&gt; &lt;a href=&quot;http://wolever.net/~wolever/drpwiki.vim&quot;&gt;http://wolever.net/~wolever/drpwiki.vim&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Using it:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Save it to ~/.vim/syntax/drpwiki.vim (create the directory if it doesn&#039;t exist)
&lt;li&gt;In Vim, enter `:set filetype=drpwiki`
&lt;/ol&gt;
 
    </content:encoded>

    <pubDate>Thu, 16 Aug 2007 10:39:27 -0400</pubDate>
    <guid isPermaLink="false">http://blog.codekills.net/archives/22-guid.html</guid>
    
</item>

</channel>
</rss>