Sha256: cd17f1a15701eda6789fe707088fabfea767f53718f7b5472770d906fdd59d87

Contents?: true

Size: 517 Bytes

Versions: 12

Compression:

Stored size: 517 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

12 entries across 12 versions & 1 rubygems

Version Path
rubycritic-2.6.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.5.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.4.1 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.4.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.3.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.2.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.1.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-2.0.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-1.4.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-1.3.0 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-1.2.1 lib/rubycritic/source_control_systems/mercurial.rb
rubycritic-1.2.0 lib/rubycritic/source_control_systems/mercurial.rb