Wednesday, August 30, 2006

svn merge hell!

svn: REPORT request failed on '/svn/rhg/!svn/vcc/default'
svn: Working copy path 'path/to/afile/in/your/project/a_file_that_is_broken' does not exist in repository


If you've ever seen this error you've probably resorted to 'rm -rf'

Thanks to some of the great minds of revolution we have a simple fix that involves editing the .svn/entries file and locating an incorrect attribute revision="0"

And to automate this I wrote a little ruby script. It uses libxml-ruby because I wanted to get fimilar with the API, which thankfully is very similar to the C API.

Note: This only applies to subversion 1.3 client, the newer 1.4 client does not generate xml property files.
#!/usr/bin/env ruby
require 'find'
require 'pathname'
require 'rubygems'

require 'xml/libxml'
# going to search through all the folders in the current project
# and locate all .svn/entries files. Parse each file looking for
# bad entries
# a bad entry is defined as
# any entry with a revision="0"

# that is not scheduled="add"


def start_doc
end

def start_element(name,attrs, entry_path)

if( name == "entry" && attrs["revision"] == "0" && attrs["schedule"] != "add" )

puts "Potential Error in #{entry_path}"
end
end

def end_element(name)

end

def chars
end
def comments
end


subversion_folder = /\.svn$/i

root_path = Pathname.new(".").realpath
Find.find(root_path) do |file_name|

if subversion_folder.match(file_name)
Find.find(file_name) do |sub_file|

entry_file = File.basename(sub_file)
if entry_file == "entries"

entry_path = "#{file_name}/#{entry_file}"
parser = XML::SaxParser.new

parser.on_start_element {|name,attrs| start_element( name, attrs, entry_path ) }

parser.on_end_element {|name| end_element(name) }
parser.filename = entry_path

parser.parse
break
end
end
end

end

Sunday, August 20, 2006

Proc Tell

I was looking at my win32 machine tonight and realized I didn't know what a few of the processes I had running were. I googled them and decided it would be really nice if I i didn't have to type the process name into google. ProcTell is a little XULRunner app that will list all running processes and a google search box. When double clicking on one of the process in the list it runs a google search query in a browser frame.



Try it out

Tuesday, August 01, 2006

SimoHealth 1.2

It was a pretty quiet release, but after many months we've release 1.2. It runs on top of XULRunner, the Firefox based runtime environment. We choose to use the XULRunner 1.8 tree instead of the 1.8.0 tree, so that we could make use of some of the new features like nsISAXMLReader.

New features in the product include it's ability to manage multiple insurance plans per record. Meaning we support splitting a doctors bill between multiple insurance comapies - something our competitors don't handle. Also, we reduced the footprint to only 6.9 megs from 8.04 megs. The download is free with registration.

Reading list