Indefero

Indefero Commit Details


Date:2009-01-20 06:12:17 (15 years 11 months ago)
Author:Loic d'Anterroches
Branch:dev, 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:df086f7a61c4c054c4552a6c59fecf4aa12eebc0
Parents: bab9ec661d69577cdf14fd99ce8ef65afc0b6557
Message:Improved Subversion and Mercurial backend performance.

Changes:

File differences

src/IDF/Scm/Mercurial.php
275275
276276
277277
278
279
278
279
280
280281
281
282
282283
283
284
284
285
286
287
285288
286289
287290
/**
* Get commit details.
*
* @param string Commit ('HEAD').
* @return array Changes.
* @param string Commit ('HEAD')
* @param bool Get commit diff (false)
* @return array Changes
*/
public function getCommit($commit='tip')
public function getCommit($commit='tip', $getdiff=false)
{
$cmd = sprintf('hg log -p -r %s -R %s', escapeshellarg($commit), escapeshellarg($this->repo));
$tmpl = ($getdiff) ?
'hg log -p -r %s -R %s' : 'hg log -r %s -R %s';
$cmd = sprintf($tmpl,
escapeshellarg($commit), escapeshellarg($this->repo));
$out = array();
IDF_Scm::exec($cmd, $out);
$log = array();
src/IDF/Scm/Svn.php
266266
267267
268268
269
270
269
270
271
271272
272
273
273274
274275
275276
......
279280
280281
281282
282
283283
284284
285285
286286
287
287
288288
289
290
291289
292290
293291
/**
* Get commit details.
*
* @param string Commit ('HEAD').
* @return array Changes.
* @param string Commit ('HEAD')
* @param bool Get commit diff (false)
* @return array Changes
*/
public function getCommit($rev='HEAD')
public function getCommit($rev='HEAD', $getdiff=false)
{
$res = array();
$cmd = sprintf('svn log --xml -v --username=%s --password=%s %s@%s',
escapeshellarg($rev));
$xmlRes = IDF_Scm::shell_exec($cmd);
$xml = simplexml_load_string($xmlRes);
$res['author'] = (string) $xml->logentry->author;
$res['date'] = gmdate('Y-m-d H:i:s', strtotime((string) $xml->logentry->date));
$res['title'] = (string) $xml->logentry->msg;
$res['commit'] = (string) $xml->logentry['revision'];
$res['changes'] = $this->getDiff($rev);
$res['changes'] = ($getdiff) ? $this->getDiff($rev) : '';
$res['tree'] = '';
return (object) $res;
}

Archive Download the corresponding diff file

Page rendered in 0.08062s using 13 queries.