Sha256: b1d0c505142ec83f05024de015f52fed0b63f62d0042107aae2d9cfd13c0081d

Contents?: true

Size: 515 Bytes

Versions: 6

Compression:

Stored size: 515 Bytes

Contents

module Rubycritic
  module SourceControlSystem
    class Mercurial < Base
      register_system

      def self.supported?
        `hg verify 2>&1` && $?.success?
      end

      def self.to_s
        'Mercurial'
      end

      def revisions_count(path)
        `hg log #{path.shellescape} --template '1'`.size
      end

      def date_of_last_commit(path)
        `hg log #{path.shellescape} --template '{date|isodate}' --limit 1`.chomp
      end

      def revision?
        false
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rubycritic-2.9.2 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.9.1 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.9.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.8.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.7.1 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.7.0 lib/rubycritic/source_control_systems/mercurial.rb