$c->changelog = $bridge->getCommitMessage();
$c->changeby = $this->authUser->email; //???
$c->changeby_id = $this->authUser->id; //???
+ $c->branch = $bridge->branch;
//print_r($bridge);exit;
$c->ctime = isset($bridge->props['Date']) ? strtotime($bridge->props['Date']) : time();
$c->fileActions = $bridge->fileActions;
{
var $repo;
-
+ var $branch = "";
var $files = array();
var $log = array();
var $commits = array();
while (($line = fgets(STDIN)) !== false) {
echo "got: $line\n";
list($old, $new, $ref) = explode(' ', trim($line), 3);
+ $this->branch = $ref;
$this->commits[] = $new;
if (preg_match('/^0+$/',$old)) {
/** who committed this revision */
public $changeby;
-
+
+ /** branch for this revision */
+ public $branch;
/** when this revision was committed */
public $ctime;
$lines = explode("\n", $commit);
$line = array_shift($lines);
- if (!preg_match("/^commit\s+(\S+)$/", $line, $M)) {
+ if (!preg_match("/^commit\s+(\S+)\s+(\S+)$/", $line, $M)) {
return false;
}
$ent->rev = $M[1];
-
- $ent->branches = array(); // FIXME
+ $ent->branch = $M[2] ;
$ent->tags = array(); // FIXME
$ent->files = array();
}
// fixme..
if (!count($ent->branches)) {
- $ent->branches[] = 'master';
+ $ent->branches[] = $this->branch; //'master';
}
$ent->files_array = array_values($ent->files);
return $ent;
$args[] = "--no-abbrev";
$args[] = "--numstat";
$args[] = "--date=rfc";
+ $args[] = "--source"; // show the branch..
//echo '<PRE>';print_r($args);echo '</PRE>';
$commit = null;
while (true) {
$line = fgets($fp);
- if ($line === false) {
+ if ($line === false) { //end of file..
if ($commit !== null) {
$commits[] = $commit;
}