Method: Mercurial::CommitFactory#count_range

Defined in:
lib/mercurial-ruby/factories/commit_factory.rb

#count_range(hash_a, hash_b, cmd_options = {}) ⇒ Object

Count changesets in the range from hash_a to hash_b in the repository.

Example:

repository.commits.count_range(hash_a, hash_b)


69
70
71
72
73
# File 'lib/mercurial-ruby/factories/commit_factory.rb', line 69

def count_range(hash_a, hash_b, cmd_options={})
  hg_to_array([%Q[log -r ?:? --template "{node}\n"], hash_a, hash_b], {}, cmd_options) do |line|
    line
  end.size
end