<commit_before><?php
/*
 * Copyright (c) 2012, <NAME>, http://www.xrstf.de/
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

/**
 * Result class for `hg heads`
 *
 * @see     http://selenic.com/hg/help/heads
 * @package libhg.Command.Heads
 */
class libhg_Command_Heads_Result extends libhg_Command_BaseResult {
	/**
	 * list of heads (libhg_Changeset objects)
	 *
	 * @var array
	 */
	public $heads;

	public function __construct(array $heads, $code) {
		parent::__construct($code);
		$this->heads = $heads;
	}

	public function getNodes() {
		return $this->getHeadProperty('node');
	}

	public function getHeadProperty($prop) {
		$result = array();

		foreach ($this->heads as $head) {
			$result[] = $head->$prop;
		}

		return $result;
	}
}<commit_msg>use the changegroup result<commit_after><?php
/*
 * Copyright (c) 2012, <NAME>, http://www.xrstf.de/
 *
 * This file is released under the terms of the MIT license. You can find the
 * complete text in the attached LICENSE file or online at:
 *
 * http://www.opensource.org/licenses/mit-license.php
 */

/**
 * Result class for `hg heads`
 *
 * @see     http://selenic.com/hg/help/heads
 * @package libhg.Command.Heads
 */
class libhg_Command_Heads_Result extends libhg_Command_ChangegroupResult {
	/* empty yet */
}
{'fraction_non_alphanumeric': 0.14095371669004209, 'fraction_numerical': 0.005610098176718092, 'mean_word_length': 3.573717948717949, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4529113', 'n_tokens_mistral': 504, 'n_tokens_neox': 463, 'n_words': 130}