class RubyCritic::SourceControlSystem::Mercurial

Public Class Methods

supported?() click to toggle source
# File lib/rubycritic/source_control_systems/mercurial.rb, line 8
def self.supported?
  `hg verify 2>&1` && $CHILD_STATUS.success?
end
to_s() click to toggle source
# File lib/rubycritic/source_control_systems/mercurial.rb, line 12
def self.to_s
  'Mercurial'
end

Public Instance Methods

date_of_last_commit(path) click to toggle source
# File lib/rubycritic/source_control_systems/mercurial.rb, line 20
def date_of_last_commit(path)
  `hg log #{path.shellescape} --template '{date|isodate}' --limit 1`.chomp
end
revision?() click to toggle source
# File lib/rubycritic/source_control_systems/mercurial.rb, line 24
def revision?
  false
end
revisions_count(path) click to toggle source
# File lib/rubycritic/source_control_systems/mercurial.rb, line 16
def revisions_count(path)
  `hg log #{path.shellescape} --template '1'`.size
end