Skip to content
Browse files

Fix identification of remote repository formats

  • Loading branch information...
1 parent eebba91 commit 1e3ba54c4792298f47aad3d1c7b30a79fc75445c @purcell committed Mar 4, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 darcs-to-git
View
4 darcs-to-git
@@ -438,8 +438,8 @@ def darcs2_repo?(repo)
false
end
else
- format_file = File.read(repo.scan(/^(.*?)\/?$/).flatten.first + "/_darcs/format") rescue nil
- return format_file && !(format_file =~ /darcs-1\./)
+ format_file = open(repo.scan(/^(.*?)\/?$/).flatten.first + "/_darcs/format") { |f| f.read }
+ return format_file && (format_file =~ /darcs-2(?:\.|$)/)
end
end

0 comments on commit 1e3ba54

Please sign in to comment.
Something went wrong with that request. Please try again.