Hglib::

VersionInfo

module

Version information methods for Repos and the top-level module.

Public Instance Methods

anchor
extension_enabled?( name )

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
anchor
extension_versions()

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
anchor
version()

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
anchor
versions()

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