lib/mercurial-ruby/config_file.rb in mercurial-ruby-0.7.6 vs lib/mercurial-ruby/config_file.rb in mercurial-ruby-0.7.7

- old
+ new

@@ -1,12 +1,12 @@ module Mercurial # - # Represents +.hg/hgrc+ configuration file stored in the repository. + # Represents +.hg/hgrc+ configuration from the repository. # Useful for adding/removing various settings. # - # You can read more about hgrc here: + # For general information on hgrc: # # http://www.selenic.com/mercurial/hgrc.5.html # class ConfigFile @@ -17,21 +17,21 @@ def initialize(repository) @repository = repository end # - # Returns absolute path to the config file: + # Returns an absolute path to the config file: # # config.path # => /home/ilya/repos/fancyrepo/.hg/hgrc # def path File.join(repository.path, '.hg', 'hgrc') end # # Returns true if the config file actually exists on disk. - # For new repositories it's missing by default. + # The file is usually missing in new repositories. # def exists? File.exists?(path) end @@ -45,11 +45,11 @@ # # Adds specified setting to a specified section of the config: # # config.add_setting('merge-tools', 'kdiff3.executable', '~/bin/kdiff3') # - # It will write the following content to the +hgrc+: + # will write the following content to hgrc: # # [merge-tools] # kdiff3.executable = ~/bin/kdiff3 # def add_setting(header, name, value) @@ -66,21 +66,21 @@ end end end # - # Removes specified setting from the hgrc: + # Removes specified setting from hgrc: # # config.delete_setting!('merge-tools', 'kdiff3.executable') # def delete_setting!(header, name) write do contents.gsub(find_setting(header, name), '') end end # - # Returns true if specified setting exists in specified group. + # Returns true if a specified setting exists in specified group. # # config.setting_exists?('hooks', 'changegroup') # def setting_exists?(header, name) !!find_setting(header, name)