Finally Paid by the iTMS

Though my 99¢ iPhone app continues to be downloaded dozens of times per week, they are spread out through so many different locales that I did not hit the minimum dollar amount to get paid until this month, in the U.S. market.  I’m owed at least double this amount, if the other locales were consolidated.  I can understand the accounting reasons for Apple working like this, but it sure does feel like a shady way for them to make money, and interest on said money, on earnings that rightfully belong to third party developers.

image

Ignoring Line Ending Style with TextMate Subversion Diff

Are you like me?  Does it annoy you when trying to track the changes in a file’s history, and hitting one revision where a contributor’s text editor used different line endings, and the entire file is shown as being changed?  It kind of makes tracking revisions useless.  Thankfully, in version 1.4+ of Subversion, you can instruct it to ignore line endings in the command line:

  1. $ svn diff -x --ignore-eol-style foo.php

I tend to do all of my work in TextMate, though, so a command line option isn’t handy.  Thanks to TextMate’s open Bundle architecture, I was able to easily modify the Subversion bundle to ignore line ending style, but only when I want it to.  Here’s how:

Right click on your TextMate application icon and select Show Package Contents.  Navigate to Contents/SharedSupport/Bundles and copy Subversion.tmbundle to your desktop or another convenient location.  Right click this copied bundle and select Show Package Contents.  Open Support/svn_diff.rb in TextMate.  Around line 34 you’ll see:

  1. diff_arg = diff_cmd ? "--diff-cmd #{diff_cmd}" : ''

Below this, add the following:

  1. ignore_eol = (ENV['SVN_DIFF_IGNORE_EOL'] == 'TRUE') ? '-x --ignore-eol-style' : ''

And modify line 42 (now line 43) from:

  1. res = %x{#{e_sh svn} 2>&1 diff "-r#{revision}" #{diff_arg} #{e_sh target_path}}

to:

  1. res = %x{#{e_sh svn} 2>&1 diff #{ignore_eol} "-r#{revision}" #{diff_arg} #{e_sh target_path}}

Now in your TextMate Preferences, click Advanced, Shell Variables, and create a new shell variable named SVN_DIFF_IGNORE_EOL, and set it to TRUE to ignore line ending style, or FALSE (or any other value) if you do not wish to ignore line ending style.  Note that these are not real boolean values, but text values, hence why the TRUE in the assignment of the ignore_eol variable in modified Ruby is quoted; it’s a string after all.

Save the file, and then just double-click your modified copy of the bundle, which will install it non-destructively, and your svn diffs will now respect your preference for whether or not you care about the line endings when examining differences between files under version control.