<?xml version="1.0" encoding="UTF-8"?>
<feed
  xmlns="http://www.w3.org/2005/Atom"
  xmlns:thr="http://purl.org/syndication/thread/1.0"
  xml:lang="en"
   >
  <title type="text">Code Kills</title>
  <subtitle type="text"></subtitle>

  <updated>2012-01-22T21:05:58Z</updated>
  <generator uri="http://blogofile.com/">Blogofile</generator>

  <link rel="alternate" type="text/html" href="http://blog.codekills.net" />
  <id>http://blog.codekills.net/feed/atom/</id>
  <link rel="self" type="application/atom+xml" href="http://blog.codekills.net/feed/atom/" />
  <entry>
    <author>
      <name>David Wolever</name>
      <uri>http://blog.codekills.net</uri>
    </author>
    <title type="html">SVK + Unicode == :(</title>
    <link rel="alternate" type="text/html" href="http://blog.codekills.net/2008/05/06/svk-+-unicode-----(" />
    <id>http://blog.codekills.net/2008/05/06/svk-+-unicode-----(</id>
    <updated>2008-05-06T21:43:00Z</updated>
    <published>2008-05-06T21:43:00Z</published>
    <category scheme="http://blog.codekills.net" term="Fixed-it" />
    <category scheme="http://blog.codekills.net" term="Work" />
    <summary type="html">SVK + Unicode == :(</summary>
    <content type="html" xml:base="http://blog.codekills.net/2008/05/06/svk-+-unicode-----(">

&lt;p&gt;I was not impressed when I tried to check out a UTF-8 encoded file with SVK, then got the helpful message &lt;code&gt;Can&#39;t encode path as ascii&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ svk up
Syncing //drp/trunk(/drp/trunk) in /home/wolever/Trunk to 5388.
Can&#39;t encode path as ascii.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I was even less impressed when I searched Google for &lt;a href=&#34;http://google.ca/search?q=svk+unicode&#34;&gt;svk unicode&lt;/a&gt; and this blog was the first hit.&lt;/p&gt;
&lt;p&gt;Fortunately my Google-foo is high today, and I was able to find &lt;a href=&#34;http://wiki.opengarden.org/User:PeteE/Synchronizing_SVN_Repositories_With_Svk#section_7&#34;&gt;a page&lt;/a&gt; that gives a solution:  Making sure that your locale is set to something similar to &lt;code&gt;en_US.UTF-8&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;On Debian, here&#39;s how I do it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ sudo apt-get install locales # Ubuntu 6.06 didn&#39;t have it...
...
$ export LANG=&#34;en_US.UTF-8&#34;
$ export LANGUAGE=&#34;$LANG&#34;
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And, of course, it may be good to put those two &lt;code&gt;export&lt;/code&gt;s in &lt;code&gt;~/.bashrc&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Oh, but wait!&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ svk up
Syncing //drp/trunk(/drp/trunk) in /home/wolever/Trunk to 5388.
Can&#39;t encode path as ascii.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;It still doesn&#39;t work!&lt;/p&gt;
&lt;p&gt;It turns out that, for what ever reason, something was upset.  Eventually I got it working by deleting the offending directory, then using &lt;code&gt;svk revert&lt;/code&gt; to revert it:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ rm -r hacking/
$ svk revert -R hacking
...
Reverted hacking/utf8_爱的
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Hurra!&lt;/p&gt;
</content>
  </entry>
  <entry>
    <author>
      <name>David Wolever</name>
      <uri>http://blog.codekills.net</uri>
    </author>
    <title type="html">Another reason I like SVK</title>
    <link rel="alternate" type="text/html" href="http://blog.codekills.net/2008/04/16/another-reason-i-like-svk" />
    <id>http://blog.codekills.net/2008/04/16/another-reason-i-like-svk</id>
    <updated>2008-04-16T18:47:00Z</updated>
    <published>2008-04-16T18:47:00Z</published>
    <category scheme="http://blog.codekills.net" term="DrProject" />
    <category scheme="http://blog.codekills.net" term="Work" />
    <summary type="html">Another reason I like SVK</summary>
    <content type="html" xml:base="http://blog.codekills.net/2008/04/16/another-reason-i-like-svk">

&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&#39;d I do it?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;</content>
  </entry>
  <entry>
    <author>
      <name>David Wolever</name>
      <uri>http://blog.codekills.net</uri>
    </author>
    <title type="html">How SVK has made my life happy</title>
    <link rel="alternate" type="text/html" href="http://blog.codekills.net/2008/04/04/how-svk-has-made-my-life-happy" />
    <id>http://blog.codekills.net/2008/04/04/how-svk-has-made-my-life-happy</id>
    <updated>2008-04-04T19:40:00Z</updated>
    <published>2008-04-04T19:40:00Z</published>
    <category scheme="http://blog.codekills.net" term="Work" />
    <summary type="html">How SVK has made my life happy</summary>
    <content type="html" xml:base="http://blog.codekills.net/2008/04/04/how-svk-has-made-my-life-happy">

&lt;p&gt;SVK, despite some of it&#39;s shortcomings, has proved worthy of my use in the last couple of days.  Here is a quick script which shows how I&#39;ve been using it, and how it&#39;s rocked the pants off of SVN:&lt;/p&gt;
&lt;p&gt;&lt;font color=&#34;red&#34;&gt;red = commands with SVN&lt;/font&gt;&lt;br /&gt;
&lt;font color=&#34;blue&#34;&gt;blue = equivalent SVK commands&lt;/font&gt;&lt;br /&gt;
&lt;font color=&#34;green&#34;&gt;green = comment&lt;/font&gt;&lt;br /&gt;&lt;/p&gt;
&lt;pre&gt;
&lt;font color=&#34;green&#34;&gt;# Mirror the DrP repository to //dpr&lt;/font&gt;
&lt;font color=&#34;red&#34;&gt;$ # No equivilent&lt;/font&gt;
&lt;font color=&#34;blue&#34;&gt;$ svk mirror https://drproject.org/drproject/DrProject/ //drp/&lt;/font&gt;

&lt;font color=&#34;green&#34;&gt;# Create the tags branch&lt;/font&gt;
&lt;font color=&#34;red&#34;&gt;$ svn cp https://drproject.org/drproject/DrProject/tunk \
         https://drproject.org/drproject/DrProject/branches/tags&lt;/font&gt;
&lt;font color=&#34;blue&#34;&gt;$ svk cp //drp/trunk //drp/branches/tags&lt;/font&gt;

&lt;font color=&#34;green&#34;&gt;# Check out the branch&lt;/font&gt;
&lt;font color=&#34;red&#34;&gt;$ svn co https://drproject.org/drproject/DrProject/branches/tags Tags&lt;/font&gt;
&lt;font color=&#34;blue&#34;&gt;$ svk co //drp/branches/tags Tags&lt;/font&gt;

&lt;font color=&#34;green&#34;&gt;# Some changes are made to the tags branch&lt;/font&gt;

&lt;font color=&#34;green&#34;&gt;# Checkin those changes&lt;/font&gt;
&lt;font color=&#34;red&#34;&gt;$ svn ci -m &#34;Made some changes to tags branch&#34;&lt;/font&gt;
&lt;font color=&#34;blue&#34;&gt;$ svk ci -m &#34;Made some changes to tags branch&#34;&lt;/font&gt;
&lt;font color=&#34;green&#34;&gt;# In this case, SVK is not being used in decentralized
# mode, so the changes will be pushed upstream to the
# SVN repository, just like the svn commit does.&lt;/font&gt;

&lt;font color=&#34;green&#34;&gt;# Changes have also been made to trunk.
# Time to merge those changes in.

# First, a merge with SVN:&lt;/font&gt;
&lt;font color=&#34;red&#34;&gt;$ svn log --stop-on-copy&lt;/font&gt;
&lt;font color=&#34;green&#34;&gt;# Look for either the last revision which trunk was merged
# You can&#39;t always use the base revision, otherwise conflicts
# may ensue.&lt;/font&gt;
&lt;font color=&#34;red&#34;&gt;$ svn merge -r $REV:HEAD https://drproject.org/drproject/DrProject/tunk .&lt;/font&gt;
&lt;font color=&#34;green&#34;&gt;# Hope that there are no trivial conflicts to sort out,
# then test and commit the merge. &lt;/font&gt;
&lt;font color=&#34;red&#34;&gt;$ svn ci -m &#34;Merged trunk into tags.&#34;&lt;/font&gt;

&lt;font color=&#34;green&#34;&gt;# And now, exactly the same operation with SVK:&lt;/font&gt;
&lt;font color=&#34;blue&#34;&gt;$ svk pull&lt;/font&gt;
&lt;font color=&#34;green&#34;&gt;# ... changes are merged ...&lt;/font&gt;
&lt;font color=&#34;blue&#34;&gt;$ &lt;/font&gt;
&lt;/pre&gt;
&lt;p&gt;I don&#39;t think I need to say any more &lt;img src=&#34;/templates/default/img/emoticons/smile.png&#34; alt=&#34;:-)&#34; style=&#34;display: inline; vertical-align: bottom;&#34; class=&#34;emoticon&#34; /&gt;&lt;/p&gt;
&lt;p&gt;(Yes, I realize that there are tools like &lt;a href=&#34;http://www.orcaware.com/svn/wiki/Svnmerge.py&#34;&gt;svnmerge.py&lt;/a&gt; which make SVN merges less painful... But that&#39;s one extra command to run.  And you&#39;ve still got those stinking &lt;tt&gt;.svn&lt;/tt&gt; directories everywhere.)&lt;/p&gt;

&lt;!-- EXTENDED BODY --&gt;
&lt;a id=&#34;extended&#34;&gt;&lt;/a&gt;&lt;p&gt;[edit]
Fixed up the coloring so it may work a little bit better, and my stylesheet doesn&#39;t destroy the layout of the comments section.
[/edit]&lt;/p&gt;
</content>
  </entry>
  <entry>
    <author>
      <name>David Wolever</name>
      <uri>http://blog.codekills.net</uri>
    </author>
    <title type="html">Reverting Changes in SVN (or: it&#39;s not as easy as svn up -r)</title>
    <link rel="alternate" type="text/html" href="http://blog.codekills.net/2008/02/08/reverting-changes-in-svn-(or--it's-not-as-easy-as-svn-up--r)" />
    <id>http://blog.codekills.net/2008/02/08/reverting-changes-in-svn-(or--it's-not-as-easy-as-svn-up--r)</id>
    <updated>2008-02-08T16:57:00Z</updated>
    <published>2008-02-08T16:57:00Z</published>
    <category scheme="http://blog.codekills.net" term="DrProject" />
    <category scheme="http://blog.codekills.net" term="Python" />
    <category scheme="http://blog.codekills.net" term="Work" />
    <summary type="html">Reverting Changes in SVN (or: it&#39;s not as easy as svn up -r)</summary>
    <content type="html" xml:base="http://blog.codekills.net/2008/02/08/reverting-changes-in-svn-(or--it's-not-as-easy-as-svn-up--r)">

&lt;p&gt;If there is one thing that I&#39;ve found universally confusing about version control systems, it&#39;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&#39;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&#39;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&#39;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, &#34;Pudd&#39;nhead Wilson&#39;s Calendar&#34;
-Increased knowledge will help you now.  Have mate&#39;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 &#34;reverted changes&#34; 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&#39;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&#39;s a post for another day -- I need to stop writing about merging and actually get on with, err, &lt;a href=&#34;https://www.drproject.org/DrProject/ticket/1236&#34;&gt;doing it&lt;/a&gt;...&lt;/p&gt;
</content>
  </entry>
</feed>

