Indefero

Indefero Commit Details


Date:2009-01-20 09:26:36 (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:e1591854652d072b01205fdee3759e8482128374
Parents: df086f7a61c4c054c4552a6c59fecf4aa12eebc0
Message:Restructured the control of the large commits.

Changes:

File differences

src/IDF/Scm/Git.php
287287
288288
289289
290
291
292
293
290
294291
295292
296
293
297294
298
295
299296
300297
301298
......
316313
317314
318315
319
316
320317
321318
322319
}
/**
* Get commit size.
*
* Get the sum of all the added/removed lines and the number of
* affected files.
* Check if a commit is big.
*
* @param string Commit ('HEAD')
* @return array array(added, removed, affected)
* @return bool The commit is big
*/
public function getCommitSize($commit='HEAD')
public function isCommitLarge($commit='HEAD')
{
$cmd = sprintf('GIT_DIR=%s git log --numstat -1 --pretty=format:%s %s',
escapeshellarg($this->repo),
$added+=$a;
$removed+=$r;
}
return array($added, $removed, $affected);
return ($affected > 100 or ($added + $removed) > 20000);
}
/**
src/IDF/Scm/Mercurial.php
306306
307307
308308
309
310
311
312
309
313310
314311
315
312
316313
317
314
318315
319
316
320317
321318
322319
}
/**
* Get commit size.
*
* Get the sum of all the added/removed lines and the number of
* affected files.
* Check if a commit is big.
*
* @param string Commit ('HEAD')
* @return array array(added, removed, affected)
* @return bool The commit is big
*/
public function getCommitSize($commit='HEAD')
public function isCommitLarge($commit='HEAD')
{
return array(0, 0, 0);
return false;
}
/**
src/IDF/Scm/Svn.php
290290
291291
292292
293
294
295
296
293
297294
298295
299
296
300297
301
298
302299
303
300
301
302
303
304
305
306
307
308
309
310
311
304312
305313
306314
}
/**
* Get commit size.
*
* Get the sum of all the added/removed lines and the number of
* affected files.
* Check if a commit is big.
*
* @param string Commit ('HEAD')
* @return array array(added, removed, affected)
* @return bool The commit is big
*/
public function getCommitSize($commit='HEAD')
public function isCommitLarge($commit='HEAD')
{
return array(0, 0, 0);
if (substr($this->repo, 0, 7) != 'file://') {
return false;
}
// We have a locally hosted repository, we can query it with
// svnlook
$repo = substr($this->repo, 7);
$cmd = sprintf('svnlook changed -r %s %s',
escapeshellarg($commit),
escapeshellarg($repo));
$out = IDF_Scm::shell_exec($cmd);
$lines = preg_split("/\015\012|\015|\012/", $out);
return (count($lines) > 100);
}
private function getDiff($rev='HEAD')
src/IDF/Views/Source.php
225225
226226
227227
228
229
228
230229
231230
232231
}
$title = sprintf(__('%s Commit Details'), (string) $request->project);
$page_title = sprintf(__('%s Commit Details - %s'), (string) $request->project, $commit);
$size = $scm->getCommitSize($commit);
$large = ($size[2] > 100 or ($size[0] + $size[1]) > 20000);
$large = $scm->isCommitLarge($commit);
$cobject = $scm->getCommit($commit, !$large);
$rcommit = IDF_Commit::getOrAdd($cobject, $request->project);
$diff = new IDF_Diff($cobject->changes);

Archive Download the corresponding diff file

Page rendered in 0.09782s using 13 queries.