def stats(cmd_options={})
      raw = hg(["log -r ? --stat --template '{node}\n'", hash_id], cmd_options)
      result = raw.scan(/(\d+) files changed, (\d+) insertions\(\+\), (\d+) deletions\(\-\)$/).flatten.map{|r| r.to_i}
      return {} if result.empty? # that commit has no stats
      {
        'files'     => result[0],
        'additions' => result[1],
        'deletions' => result[2],
        'total'     => result[1] + result[2]
      }
    end
def stats(cmd_options={})
      raw = hg(["log -r ? --stat --template '{node}\n'", hash_id], cmd_options)
      result = raw.scan(/(\d+) files changed, (\d+) insertions\(\+\), (\d+) deletions\(\-\)$/).flatten.map{|r| r.to_i}
      return {} if result.empty? # that commit has no stats
      {
        'files'     => result[0],
        'additions' => result[1],
        'deletions' => result[2],
        'total'     => result[1] + result[2]
      }
    end
Returns a Hash of diffstat-style summary of changes for the commit.