Permalink
Browse files

Handle unnamed patches (thanks Kartik Agaram)

  • Loading branch information...
1 parent 9685ea2 commit 44ea0ae0563433051a4f1da8dde22f3504d4cca0 @purcell committed Nov 22, 2007
Showing with 1 addition and 1 deletion.
  1. +1 −1 darcs-to-git
View
@@ -40,7 +40,7 @@ class DarcsPatch
self.date = darcs_date_to_git_date(patch_xml.attribute('date').to_s)
self.inverted = (patch_xml.attribute('inverted').to_s == 'True')
self.identifier = patch_xml.attribute('hash').to_s
- self.name = patch_xml.get_elements('name').first.get_text.value
+ self.name = patch_xml.get_elements('name').first.get_text.value rescue 'Unnamed patch'
self.comment = patch_xml.get_elements('comment').first.get_text.value rescue nil
if (self.is_tag = (self.name =~ /^TAG (.*)/))
self.git_tag_name = $1.gsub(/[\s:]+/, '_')

0 comments on commit 44ea0ae

Please sign in to comment.