Version information methods for Repos and the top-level module.
Returns true
if the extension with the given name
is enabled in the current (global) configuration.
# File lib/hglib/version_info.rb, line 34
def extension_enabled?( name )
return self.extension_versions.key?( name.to_sym )
end
Fetch the version of the Mercurial extensions that're being used as a Hash.
# File lib/hglib/version_info.rb, line 23
def extension_versions
ext_info = self.versions[ :extensions ]
return ext_info.each_with_object({}) do |ext, hash|
ext = ext.dup
hash[ ext.delete(:name).to_sym ] = ext
end
end
Fetch the version of Mercurial that's being used as a String.
# File lib/hglib/version_info.rb, line 17
def version
return self.versions[ :ver ]
end
Fetch a Hash of version information about the Mercurial that is being used.
# File lib/hglib/version_info.rb, line 10
def versions
response = self.server.run_with_json_template( :version )
return response.first
end