Indefero

Indefero Commit Details


Date:2010-11-16 18:53:17 (14 years 1 month ago)
Author:Thomas Keller
Branch:develop, feature-issue_links, feature.better-home, feature.content-md5, feature.diff-whitespace, feature.download-md5, feature.issue-links, feature.issue-of-others, feature.issue-summary, feature.search-filter, feature.webrepos, feature.wiki-default-page, master, release-1.1, release-1.2, release-1.3
Commit:70e8d1242032c410aa3033b34cbd2f5cac3376c0
Parents: ad15b13f7ebc6925fd38707160df5e1285c75a80
Message:Output the branch a particular commit is on; this is easy for mercurial and monotone, but slightly harder till impossible to do properly for git and svn. Please review and eventually adapt the code to make it work better (partially fixes issue 450)

Changes:

File differences

src/IDF/Scm/Git.php
436436
437437
438438
439
440
439441
440442
441443
$out = self::parseLog($out);
$out[0]->changes = '';
}
$out[0]['branch'] = $this->inBranches($commit, null);
return $out[0];
}
src/IDF/Scm/Mercurial.php
429429
430430
431431
432
433
432434
433435
434436
......
443445
444446
445447
448
446449
447450
448451
$c['author'] = $match[2];
} elseif ($match[1] == 'summary') {
$c['title'] = $match[2];
} elseif ($match[1] == 'branch') {
$c['branch'] = $match[2];
} else {
$c[$match[1]] = trim($match[2]);
}
}
}
$c['tree'] = !empty($c['commit']) ? trim($c['commit']) : '';
$c['branch'] = empty($c['branch']) ? 'default' : $c['branch'];
$c['full_message'] = !empty($c['full_message']) ? trim($c['full_message']) : '';
$res[] = (object) $c;
return $res;
src/IDF/Scm/Monotone.php
141141
142142
143143
144
144
145145
146146
147147
148148
149
149
150150
151151
152152
......
174174
175175
176176
177
177
178178
179179
180180
......
545545
546546
547547
548
548
549549
550550
551551
......
623623
624624
625625
626
626627
628
627629
628630
629631
......
682684
683685
684686
685
687
686688
687689
688690
public function getArchiveStream($commit, $prefix='repository/')
{
$revs = $this->_resolveSelector($commit);
// sanity: this should actually not happen, because the
// sanity: this should actually not happen, because the
// revision is validated before already
if (count($revs) == 0) {
return new Pluf_HTTP_Response_NotFound();
}
return new IDF_Scm_Monotone_ZipRender($this->stdio, $revs[0]);
return new IDF_Scm_Monotone_ZipRender($this->stdio, $revs[0]);
}
/**
$cache = Pluf_Cache::factory();
$cachekey = 'mtn-plugin-certs-for-rev-' . $rev;
$certs = $cache->get($cachekey);
if ($certs === null) {
$out = $this->stdio->exec(array('certs', $rev));
if ($stanza[0]['values'][0] != $file)
continue;
$file = $this->_fillFileEntry($stanza);
return (object) $file;
}
$res['title'] = $split[0];
$res['full_message'] = (isset($split[1])) ? trim($split[1]) : '';
$res['branch'] = implode(', ', $certs['branch']);
$res['commit'] = $revs[0];
$res['changes'] = ($getdiff) ? $this->_getDiff($revs[0]) : '';
return (object) $res;
__("revision %s has no branch cert - cannot start ".
"logging from this revision"), $rev
));
}
}
$initialBranches = $certs['branch'];
}
src/IDF/Scm/Svn.php
415415
416416
417417
418
418419
419420
420421
$res['commit'] = (string) $xml->logentry['revision'];
$res['changes'] = ($getdiff) ? $this->getDiff($commit) : '';
$res['tree'] = '';
$res['branch'] = '';
return (object) $res;
}
src/IDF/templates/idf/source/commit.html
1010
1111
1212
13
14
15
1316
1417
1518
<th><strong>{trans 'Author:'}</strong></th><td>{showuser $rcommit.get_author(), $request, $cobject.author}</td>
</tr>
<tr>
<th><strong>{trans 'Branch:'}</strong></th><td>{$cobject.branch}</td>
</tr>
<tr>
<th><strong>{trans 'Commit:'}</strong></th><td class="mono"><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}" title="{trans 'View corresponding source tree'}">{$cobject.commit}</a></td>
</tr>
<tr>

Archive Download the corresponding diff file

Page rendered in 0.09990s using 14 queries.