<?xml version="1.0" encoding="UTF-8"?>
<feed xml:lang="en-US" xmlns="http://www.w3.org/2005/Atom">
  <id>tag:refactormycode.com,2007:users414</id>
  <link type="application/atom+xml" href="http://refactormycode.com/users/414" rel="self"/>
  <title>philippe.rathe.myopenid.com</title>
  <updated>Fri Dec 21 03:27:18 +0000 2007</updated>
  <entry>
    <id>tag:refactormycode.com,2007:Refactor1228</id>
    <published>2007-12-21T03:27:18+00:00</published>
    <title>[JavaScript] On Repetitive Calculator Code</title>
    <content type="html">&lt;p&gt;First of all, you should use a JavaScript api like Prototype or jQuery to do DOM manipulation. Your code will become more clean. Take a look at jQuery.com&lt;/p&gt;

&lt;pre&gt;&lt;/pre&gt;</content>
    <author>
      <name>philippe.rathe.myopenid.com</name>
      <email>prathe@gmail.com</email>
    </author>
    <link type="text/html" href="http://refactormycode.com/codes/191-repetitive-calculator-code/refactors/1228" rel="alternate"/>
  </entry>
  <entry>
    <id>tag:refactormycode.com,2007:Refactor1191</id>
    <published>2007-12-18T13:43:40+00:00</published>
    <title>[Ruby] On script for subversion status manipulation</title>
    <content type="html">&lt;p&gt;Hey thanks for your reply. Using xargs may be a good thing if using bash for that kind of script was a good idea, though it would be much less cleaner as you said. But I'm very careful doing batch operations on my repository and showing an output of what the command will do when piping to a shell interpreter makes me feel more confident.&lt;/p&gt;

&lt;p&gt;Happy that you've liked it.&lt;/p&gt;

&lt;pre&gt;&lt;/pre&gt;</content>
    <author>
      <name>philippe.rathe.myopenid.com</name>
      <email>prathe@gmail.com</email>
    </author>
    <link type="text/html" href="http://refactormycode.com/codes/186-script-for-subversion-status-manipulation/refactors/1191" rel="alternate"/>
  </entry>
  <entry>
    <id>tag:refactormycode.com,2007:Code186</id>
    <published>2007-12-17T19:01:42+00:00</published>
    <updated>2007-12-18T13:43:44+00:00</updated>
    <title>[Ruby] script for subversion status manipulation</title>
    <content type="html">&lt;p&gt;For those who work with subversion, here is a little interface to subversion status command. I've made it to facilitate my svn operation on files, because sometimes when you do a &amp;quot;svn st&amp;quot; command and there is many files with a common status you would want to play with it, it is easier to use that kind of command. You can read a small article on my blog about how to use it (&lt;a href="http://philrathe.com/2007/11/27/svndo-to-do-less-svn-typing/" target="_blank"&gt;http://philrathe.com/2007/11/27/svndo-to-do-less-svn-typing/&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;Thanks Marc-Andr&#233; for your help on this.&lt;/p&gt;

&lt;p&gt;Happy hacking! &lt;/p&gt;

&lt;pre&gt;#!/usr/bin/ruby -w

status, *cmd = ARGV

`svn st`.each do |line|
  if matches = /^#{Regexp.escape(status)}\s+(.*)$/.match(line)
    tmp = cmd.map {|c| c.gsub(/\$/,matches[1])}
    tmp &amp;lt;&amp;lt; matches[1] if tmp == cmd
    puts tmp.join(' ')
  end
end
&lt;/pre&gt;</content>
    <author>
      <name>philippe.rathe.myopenid.com</name>
      <email>prathe@gmail.com</email>
    </author>
    <link type="text/html" href="http://refactormycode.com/codes/186-script-for-subversion-status-manipulation" rel="alternate"/>
  </entry>
</feed>
