<?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>Isshen, LLC: Tag tools</title>
    <link>http://blog.isshen.com/articles/tag/tools</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Subversion 1.4.4 upgrade</title>
      <description>&lt;p&gt;Adam had recently got a MacBookPro. We no longer have to mess with InstantRails on Windows. It also means he can use native Subversion and SVK. However, &lt;a href="http://homepage.mac.com/hiirem/svkbuilds.html"&gt;the OSX-native package&lt;/a&gt; uses Subversion 1.4. Our servers uses Subversion 1.3.x. To be fully compatible, that would mean compiling a custom copy of Subversion 1.3.&lt;/p&gt;

&lt;p&gt;After reading about the &lt;a href="http://subversion.tigris.org/svn_1.4_releasenotes.html"&gt;feature additions for Subversion 1.4&lt;/a&gt;, I decided it would be much easier for me to upgrade the server and my dev laptop to 1.4. Gentoo masks 1.4.4, but most Subversion upgrades are fairly transparent. There are two main benefits from the upgrade I wanted. Subversion 1.4 claims to be better at storing and transmitting binary data. We version a lot of raw data, so this would work out well. Subversion 1.4 also has a &lt;tt&gt;svnsync&lt;/tt&gt; command that works like SVK's svn mirroring. It lets you move or clone a repository. Maybe Linus Torvald's &lt;a href="http://codicesoftware.blogspot.com/2007/05/linus-torvalds-on-git-and-scm.html"&gt;acerbic comments about Subversion&lt;/a&gt; has been getting noticed.&lt;/p&gt;



&lt;p&gt;Upgrading to Subversion 1.4 on Gentoo is a piece of cake. You add:&lt;/p&gt;

&lt;blockquote&gt; &lt;tt&gt;echo "=dev-util/subversion-1.4.4-r3" &gt;&gt; /etc/portage/package.keywords&lt;/tt&gt;
&lt;/blockquote&gt;

&lt;p&gt;and then &lt;/p&gt;

&lt;blockquote&gt; &lt;tt&gt;emerge =dev-util/subversion-1.4.4-r3&lt;/tt&gt;&lt;/blockquote&gt;

&lt;p&gt;You can run &lt;tt&gt;revdep-rebuild&lt;/tt&gt; to make sure all the library references are working, but I found that this was not necessary, even with the SVK installed. (With the &lt;tt&gt;perl&lt;/tt&gt; use-flag set on Subversion, all the Perl bindings gets automatically updated on the system.)&lt;/p&gt;

&lt;p&gt;To take advantage of the more-efficient binary storage, all the repositories needed to be upgraded. I shut down Apache to prevent anyone from making commits, backed up my repository, and moved the repository to a different directory while I setup the new repository directories. I then wrote two quick-and-dirty shell scripts to do this:&lt;/p&gt;

&lt;blockquote&gt;&lt;tt&gt;#!/bin/sh&lt;br/&gt;
&lt;br/&gt;
mkdir tmp_dumps&lt;br/&gt;
for repo in `ls repos-1.3.x`; do&lt;br/&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;svnadmin dump repos-1.3.x/${repo} &gt; tmp_dumps/${i}&lt;br/&gt;
done&lt;br/&gt;&lt;/tt&gt;&lt;/blockquote&gt;

&lt;p&gt;and&lt;/p&gt;

&lt;blockquote&gt;&lt;tt&gt;
#!/bin/sh&lt;br/&gt; 
&lt;br/&gt;
for repo in `ls tmp_dumps`; do&lt;br/&gt; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;svnadmin create --fs-type fsfs repos/${repo}&lt;br/&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;svnadmin load repos/${repo} &lt; tmp_dumps/${repo}&lt;br/&gt;
done&lt;br/&gt;
&lt;/tt&gt;&lt;/blockquote&gt;

&lt;p&gt;Note the &lt;tt&gt;--fs-type fsfs&lt;/tt&gt; flag. You will have to change that if you are using the BerkeleyDB storage engine. These two scripts essentially creates a dump of all the repositories found in &lt;tt&gt;repos&lt;/tt&gt; directory, then reloads them. During the reload, Subversion 1.4's &lt;tt&gt;svnadmin create&lt;/tt&gt; command creates a new repository. The newly reloaded repository uses the more efficient binary storage scheme.&lt;/p&gt;

&lt;p&gt;Lastly, I upgraded all of my local working copies. Subversion does this transparently, but I have a number of large repositories I use often. A simple &lt;tt&gt;svn update&lt;/tt&gt; on each of the working copies upgrades the working copy to 1.4. Some of them take ten minutes to upgrade -- I do this now so I don't have to wait, later on.&lt;/p&gt;

&lt;p&gt;Ho-Sheng Hsiao&lt;br/&gt;
Isshen, LLC&lt;/p&gt;</description>
      <pubDate>Sat, 25 Aug 2007 20:23:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:6ea27de3-32c5-4587-9d3b-71f65c690f0c</guid>
      <author>Hosh</author>
      <link>http://blog.isshen.com/articles/2007/08/25/subversion-1-4-4-upgrade</link>
      <category>Subversion/SVK</category>
      <category>svn</category>
      <category>svk</category>
      <category>gentoo</category>
      <category>tools</category>
    </item>
    <item>
      <title>Useful tricks with script/console</title>
      <description>&lt;p&gt;One of my favorite tools for Rails is script/console. It lets me test out snippets of code to make sure things work the way they are supposed to work. I found two useful things this morning:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tab completion&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Tab completion works in script/console. &lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;script/console&lt;br/&gt;
    user = User.find :first&lt;br/&gt;
    user.up[tab]&lt;br/&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;You have no idea how happy that makes me.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;reload!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;After I found out about tab completion, I found myself making some heavy code changes, and testing them out in the console. I kept having to quit and restart the console. Out on a lark, I hit 'r' and hit tab ... and found 'reload!'. I always wanted that command, but I had thought it was 'reload' not 'reload!'. Go figure.&lt;/p&gt;</description>
      <pubDate>Wed, 01 Aug 2007 06:43:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:8a737b95-992b-4b86-9507-cb9d9b2def39</guid>
      <author>Hosh</author>
      <link>http://blog.isshen.com/articles/2007/08/01/useful-tricks-with-script-console</link>
      <category>Ruby on Rails</category>
      <category>ruby_on_rails</category>
      <category>debugging</category>
      <category>tools</category>
    </item>
    <item>
      <title>How to do http + ssh with Subversion on Windows</title>
      <description>Many public hotspots block svn traffic, even those accessed via http. This predicament can lead many (like me) that must develop in a Windows-based environment in an unfortunate place while on the road. &lt;br /&gt;

Accessing subversion shares, need not be a headache, there is a simple solution.&lt;br /&gt;
&lt;br /&gt;
First you should install &lt;a href="tortoisesvn.tigris.org/"&gt; TortoiseSVN &lt;/a&gt; and verify it is working.&lt;br /&gt;
&lt;br /&gt;
Then right click on the desktop (or an explorer window) highlight &#8220;TortoiseSVN&#8221; then click Settings. &lt;br /&gt;
&lt;br /&gt;
Click the &#8220;Network&#8221; tab&lt;br /&gt;
&lt;br /&gt;
Check the &#8220;Enable Proxy Server&#8221; box, and in the &#8220;Server Address:&#8221; field place &#8220;localhost&#8221; and in the &#8220;Port&#8221; field place an unused port greater than 1024 (remember this number!). Click &#8220;Apply&#8221; then &#8220;OK&#8221;&lt;br /&gt;
&lt;br /&gt;
I recommend &lt;a href="http://www.xs4all.nl/~whaa/putty/"&gt;Putty Tray&lt;/a&gt; and their suite, including their improved version of Pagaent, for reasons that will soon become obvious for the next section.&lt;br /&gt;
&lt;br /&gt;
Open Pageant, then open your keyfile in it.&lt;br /&gt;
&lt;br /&gt;
Continuing on, open up Putty, fill in your server address (make sure SSH is filled in). Then go to Connection -&gt; SSH -&gt; Tunnels. Under &#8220;Source Port&#8221; place the same number you filled in earlier, and in destination, place the address of your server and port 80, ie: my.server.net:80, Click Add. Go back too the session tab, save and name your connection (don&#8217;t want too do this every time).&lt;br /&gt;
&lt;br /&gt;
Click Open.&lt;br /&gt;
&lt;br /&gt;
You should then be able too use TortoiseSVN normally, though remember you will &lt;strong&gt;always&lt;/strong&gt; need the SSH connection running too use it, it will not work otherwise (unless you clear the proxy in the settings).
&lt;br /&gt;&lt;br /&gt;
This is why &lt;a href="http://www.xs4all.nl/~whaa/putty/"&gt;Putty Tray&lt;/a&gt; is so great, you can minimize it too the system tray, and have one less window cluttering your developing environment, until you absolutely need too do something on that command line.&lt;br /&gt;
&lt;br /&gt;
As a &#8216;best practice&#8217; rule, I have learned too set the background colour on my tunnel window to something other (and obviously not) black, and not use it for much of anything besides tunnels.&lt;br /&gt;
&lt;br /&gt;
Good Luck!

&lt;h2&gt;References:&lt;/h2&gt;
&lt;ol&gt;
&lt;li&gt;&lt;a href="http://blog.isshen.com/articles/2006/12/16/how-to-do-http-ssh-with-subversion"&gt;How to do HTTP+SSH with Subversion on Linux&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;
</description>
      <pubDate>Fri, 27 Jul 2007 20:31:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:84168559-3886-4227-8f75-8248c2446d11</guid>
      <author>Adam</author>
      <link>http://blog.isshen.com/articles/2007/07/27/svn-http-via-ssh-from-xp</link>
      <category>Subversion/SVK</category>
      <category>Windows</category>
      <category>tools</category>
      <category>svn</category>
      <category>TortoiseSVN</category>
      <category>putty</category>
    </item>
    <item>
      <title>Ruby beautifier</title>
      <description>&lt;p&gt;I use jEdit for Ruby on Rails development. I only need three things from it:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Project Viewer / File tree panel (like on TextMate)&lt;/li&gt;
&lt;li&gt;Search in directory. The "find" command is OK, but the jEdit HyperSearch will take me directly to the line number in the file.&lt;/li&gt;
&lt;li&gt;Autoformatting and autoindenting.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I am not particular to syntax highlighting. I don't need to have integrated SQL, log windows, or Subversion/SVK integration -- I use Tilda, a drop-down Gnome terminal bound to function keys. &lt;/p&gt;

&lt;p&gt;jEdit 4.2final does (1) and (2) well. It does not do (3) well. I may get fed up enough to find a new editor soon to work with Ruby on Rails. Now, I can work with the broken autocompletions, but I have difficulty working with the broken autoindents. It looks fine when I see it in jEdit, but the resulting text does not output correctly. Probably because I did not set the indent options properly. &lt;strong&gt;Update&lt;/strong&gt;: Yep, need to set "soft indent" and emulate indents with spaces.&lt;/p&gt;

&lt;p&gt;Fortunately, there is a command-line script that will &lt;a href="http://www.arachnoid.com/ruby/rubyBeautifier.html"&gt;beautify Ruby scripts.&lt;/a&gt; It may not work in all the weird cases, but I can bind it to a rake task and apply it to the entire app/ directory.&lt;/p&gt;</description>
      <pubDate>Thu, 26 Jul 2007 02:11:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:97f9a0c6-9b09-4db6-a644-14ed60768a79</guid>
      <author>Hosh</author>
      <link>http://blog.isshen.com/articles/2007/07/26/ruby-beautifier</link>
      <category>Ruby on Rails</category>
      <category>tools</category>
      <category>ruby_on_rails</category>
      <category>ruby</category>
    </item>
    <item>
      <title>LightBox</title>
      <description>&lt;p&gt;Someone at #rubyonrails mentioned &lt;a href="http://stickmanlabs.com/lightwindow/"&gt;LightBox&lt;/a&gt;, a Javascript library for doing in-page popups. It looks nice and gaudy -- I may replace the less flashy in-page popup we have on our &lt;a href="http://www.christinesgourmet.com/calendar"&gt;Calendar app&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I'd definitely change the style a bit. I can't stand the Web Tweeny-bopper look.&lt;/p&gt;</description>
      <pubDate>Sun, 22 Jul 2007 21:34:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:96df4330-d651-4708-832a-a9b7af15c2b1</guid>
      <author>Hosh</author>
      <link>http://blog.isshen.com/articles/2007/07/22/lightbox</link>
      <category>Javascript</category>
      <category>javascript</category>
      <category>tools</category>
    </item>
    <item>
      <title>How to do http + ssh with Subversion on Linux</title>
      <description>&lt;p&gt;Originally posted on a private mailing list.&lt;/p&gt;

&lt;p&gt;One of the consequences of having a mobile development station is being able to go to places such as &lt;a href="http://www.panera.com"&gt;Panera's&lt;/a&gt; or the local coffee shop to do development work. These days, it is trivially easy for people to get something similar to Kismet and do packet sniffing ... so I tend to proxy my internet connection through ssh. Fortunately, most of the GUI programs does this -- Firefox, Thunderbird, Gaim, Xchat2.&lt;/p&gt;

&lt;p&gt;Unfortunately, Subversion doesn't.&lt;/p&gt;

&lt;p&gt;We have it set up so that Subversion runs through Apache in order to take advantage of authenticating (but not authorizing) against a MySQL database. In this way, svn+ssh is not an option. However, the svn command line does not understand SOCKS4 or SOCKS5. This is where a transparent socks proxy comes in. I'm using something called &lt;a href="http://proxychains.sourceforge.net/"&gt;proxychains&lt;/a&gt;, though &lt;a href="http://tsocks.sourceforge.net/"&gt;tsocks&lt;/a&gt; is also available on the internet. You set it up by writing into ~/.proxychains/proxychains.conf with:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;DynamicChain&lt;br/&gt;
    tcp_read_time_out 15000&lt;br/&gt;
    tcp_connect_time_out 10000&lt;br/&gt;&lt;/p&gt;
    
    &lt;p&gt;[ProxyList]&lt;br/&gt;
    socks5 127.0.0.1 1080&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;and then you have two methods for accessing it. For svn commands, you can do:&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;proxychain svn ls http://svn.mydomain.com/project/trunk/&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;but I prefer just setting the environment variable,&lt;/p&gt;

&lt;blockquote&gt;
    &lt;p&gt;export LD_PRELOAD=/usr/lib/libproxychains.so&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Update 2007-07-22&lt;/strong&gt;: I now put in my .bashrc file alias svn="proxychains svn" and alias svk="proxychains svk"&lt;/p&gt;

&lt;p&gt;The library intercepts TCP connect calls and reroutes them through a socks proxy. Transparent, effect, ... and kinda scary, considering how easy it is to replace DLL calls like that. In any case, although I did this mainly because I have a laptop and &lt;a href="http://www.panera.com"&gt;Panera's&lt;/a&gt; uses an http proxy, I
think I'll need to do this for my workstation as well. Then require a proxy to access the Subversion server.&lt;/p&gt;

&lt;h2&gt;References:&lt;/h2&gt;

&lt;p&gt;&lt;ul&gt;
&lt;li&gt;&lt;a href="http://blog.isshen.com/articles/2007/07/27/svn-http-via-ssh-from-xp"&gt;How to do HTTP+SSH with Subversion on Windows&lt;/a&gt;&lt;/p&gt;</description>
      <pubDate>Sat, 16 Dec 2006 08:30:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:d4ea5845-496b-49c9-a350-132c6e33dbf1</guid>
      <author>Hosh</author>
      <link>http://blog.isshen.com/articles/2006/12/16/how-to-do-http-ssh-with-subversion</link>
      <category>Subversion/SVK</category>
      <category>svk</category>
      <category>svn</category>
      <category>proxychains</category>
      <category>socks5</category>
      <category>linux</category>
      <category>tools</category>
    </item>
  </channel>
</rss>
