<commit_before><?
	# $Id: commit_log_ports.php,v 1.1.2.7 2002-04-12 05:11:47 dan Exp $
	#
	# Copyright (c) 1998-2001 DVL Software Limited
	#


// base class for commit_log_ports
class Commit_Log_Ports {

	var $dbh;

	var $id;
	var $message_id;
	var $commit_date;
    var $description;
	var $committer;
	var $encoding_losses;

	var $result;

	function Commit_Log_Ports($dbh) {
		$this->dbh	= $dbh;
	}

	function FetchInitialise($port_id) {

		# get ready to fetch all the commit_log_ports for this port
		# return the number of commits found

		$sql = "select	commit_log.id, 
						port_id,
						message_id,
					    to_char(commit_date - SystemTimeAdjust(), 'DD Mon YYYY HH24:MI:SS')  as commit_date,
						description,
						committer,
						encoding_losses
				   from commit_log, commit_log_ports
				  where commit_log.id             = commit_log_ports.commit_log_id
					and commit_log_ports.port_id  =  $port_id
				  order by commit_log.commit_date desc ";

		$this->result = pg_exec($this->dbh, $sql);
		if (!$this->result) {
			echo pg_errormessage() . " $sql";
		}
		$numrows = pg_numrows($this->result);

		return $numrows;
	}

	function FetchNthCommit($N) {
		#
		# call FetchInitialise first.
		# then call this function N times, where N is the number
		# returned by FetchInitialise.
		#

		$myrow = pg_fetch_array($this->result, $N);

		$this->id				= $myrow["id"];
		$this->port_id			= $myrow["port_id"];
		$this->message_id		= $myrow["message_id"];
		$this->commit_date		= $myrow["commit_date"];
		$this->description		= $myrow["description"];
		$this->committer		= $myrow["committer"];
		$this->encoding_losses	= $myrow["encoding_losses"];
	}

}<commit_msg>Include version+revision in fetched details<commit_after><?
	# $Id: commit_log_ports.php,v 1.1.2.8 2002-05-18 15:33:53 dan Exp $
	#
	# Copyright (c) 1998-2001 DVL Software Limited
	#


// base class for commit_log_ports
class Commit_Log_Ports {

	var $dbh;

	var $id;
	var $message_id;
	var $commit_date;
    var $description;
	var $committer;
	var $encoding_losses;
	var $port_version;
	var $port_revision;

	var $result;

	function Commit_Log_Ports($dbh) {
		$this->dbh	= $dbh;
	}

	function FetchInitialise($port_id) {

		# get ready to fetch all the commit_log_ports for this port
		# return the number of commits found

		$sql = "select	commit_log.id, 
						port_id,
						message_id,
					    to_char(commit_date - SystemTimeAdjust(), 'DD Mon YYYY HH24:MI:SS')  as commit_date,
						description,
						committer,
						encoding_losses,
						port_version,
						port_revision
				   from commit_log, commit_log_ports
				  where commit_log.id             = commit_log_ports.commit_log_id
					and commit_log_ports.port_id  =  $port_id
				  order by commit_log.commit_date desc ";

		$this->result = pg_exec($this->dbh, $sql);
		if (!$this->result) {
			echo pg_errormessage() . " $sql";
		}
		$numrows = pg_numrows($this->result);

		return $numrows;
	}

	function FetchNthCommit($N) {
		#
		# call FetchInitialise first.
		# then call this function N times, where N is the number
		# returned by FetchInitialise.
		#

		$myrow = pg_fetch_array($this->result, $N);

		$this->id				= $myrow["id"];
		$this->port_id			= $myrow["port_id"];
		$this->message_id		= $myrow["message_id"];
		$this->commit_date		= $myrow["commit_date"];
		$this->description		= $myrow["description"];
		$this->committer		= $myrow["committer"];
		$this->encoding_losses	= $myrow["encoding_losses"];
		$this->port_version		= $myrow["port_version"];
		$this->port_revision	= $myrow["port_revision"];
	}

}
{'fraction_non_alphanumeric': 0.13226621735467564, 'fraction_numerical': 0.015725919685481607, 'mean_word_length': 3.4974747474747474, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 31, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '1079077', 'n_tokens_mistral': 1546, 'n_tokens_neox': 1324, 'n_words': 284}