srchub

srchub Commit Details


Date:2015-11-15 22:39:13 (9 years 1 month ago)
Author:Natalie Adams
Branch:master
Commit:7f1ef7dc403ad7c8bd7389b44886b77772c0662b
Parents: fef995b1e4c10d4e5899c0076a3a6f25cfb6efe8
Message:Issue 112: Missing git information for some files

Changes:

File differences

indefero/src/IDF/Scm/Git.php
724724
725725
726726
727
727
728728
729729
730730
......
778778
779779
780780
781
782
783
784
785
786
787
788
789
790
791
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
792801
793802
794803
$details = array();
for ($i=0;$i<$n;$i++) {
if ($tree[$i]->type == 'blob') {
$details[$tree[$i]->hash] = $i;
$details[sha1($tree[$i]->hash . $tree[$i]->fullpath)] = $i;
}
}
if (!count($details)) {
sprintf($cmd, $skip), $rawlog);
while (count($rawlog) and count($blobs)) {
$rawlog = implode("\n", array_reverse($rawlog));
foreach ($blobs as $blob => $idx) {
if (preg_match('/^\:\d{6} \d{6} [0-9a-f]{40} '
.$blob.' .*^([0-9a-f]{40})/msU',
$rawlog, $matches)) {
$fc = $this->getCommit($matches[1]);
$res[$blob] = (object) array('hash' => $blob,
'date' => $fc->date,
'title' => $fc->title,
'author' => $fc->author);
unset($blobs[$blob]);
}
$newRawLog = substr($rawlog, 0, strrpos(rtrim($rawlog), "\n"));
$rawLogArr = explode("\n", $rawlog);
$lastLine = $rawLogArr[count($rawLogArr) - 1];
$commit = explode(" ", $lastLine)[0];
$fc = $this->getCommit($commit);
foreach(explode("\n", $newRawLog) as $line) {
$sides = explode("\t", $line);
$leftSide = trim($sides[0]);
$rightSide = trim($sides[1]);
$leftSideSplit = explode(" ", $leftSide);
$newHash = sha1($leftSideSplit[3] . $rightSide);
$res[$newHash] = (object) [
"hash" => $newHash,
'date' => $fc->date,
'title' => $fc->title,
'author' => $fc->author
];
unset($blobs[$newHash]);
}
$rawlog = array();
$skip += 5000;
indefero/src/IDF/Views/Source.php
161161
162162
163163
164
165
166164
167
168
169
170
171
172
173165
174166
175167
$in_branches = $scm->inBranches($commit, '');
$tags = $scm->getTags();
$in_tags = $scm->inTags($commit, '');
// Cache may work only if we filter for "default" or "tip" commits
//$cache = Pluf_Cache::factory();
$res = new Pluf_Template_ContextVars($scm->getTree($commit));
$key = sprintf('Project:%s::IDF_Views_Source::treeBase:%s::',
$request->project->id, $commit);
/*if (null === ($res=$cache->get($key))) {
$cache->set($key, $res);
}*/
$scmConf = $request->conf->getVal('scm', 'git');
$props = $scm->getProperties($commit);
$res->uasort(array('IDF_Views_Source', 'treeSort'));

Archive Download the corresponding diff file

Branches

Number of commits:
Page rendered in 0.06595s using 20 queries.