Class: Mercurial::Repository

Inherits:
Object
  • Object
show all
Defined in:
lib/core_ext/mercurial-ruby/repository.rb

Class Method Summary collapse

Class Method Details

.open(destination) ⇒ Object

Raises:

  • (Mercurial::RepositoryNotFound)


5
6
7
8
9
10
# File 'lib/core_ext/mercurial-ruby/repository.rb', line 5

def self.open(destination)
  # Mercurial::Repository.open patched to be Ruby 3.2+ compatible
  raise Mercurial::RepositoryNotFound, destination unless File.exist?(destination)

  new(destination)
end