Indefero

Indefero Commit Details


Date:2009-02-27 06:38:22 (15 years 9 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:cfafdbfde47e8e6b7916fdee7ea93fc598bc4ecf
Parents: e40485c56f844daccc88a76c6eec82fd130b76ea
Message:Fixed issues 137 and 138, support of the git submodules.

Changes:

File differences

src/IDF/Scm/Git.php
165165
166166
167167
168
169
170
171
168172
169173
170174
......
418422
419423
420424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
421454
$file->author = 'Unknown';
}
$file->fullpath = ($folder) ? $folder.'/'.$file->file : $file->file;
if ($file->type == 'commit') {
// We have a submodule
$file = $this->getSubmodule($file, $commit);
}
$res[] = $file;
}
return $res;
escapeshellarg($commit));
}
/*
* =====================================================
* Specific Git Commands
* =====================================================
*/
/**
* Get submodule details.
*
* Given a "commit" file in the tree, find the submodule details.
*
* @param stdClass File description of the module
* @param string Current commit
* @return stdClass File description
*/
public function getSubmodule($file, $commit)
{
$file->type = 'extern';
$info = $this->getFileInfo('.gitmodules', $commit);
if ($info == false) {
return $file;
}
$gitmodules = $this->getBlob($info);
if (preg_match('#\[submodule\s+\"'.$file->fullpath.'\"\]\s+path\s=\s(\S+)\s+url\s=\s(\S+)#mi', $gitmodules, $matches)) {
$file->extern = $matches[2];
}
return $file;
}
}
src/IDF/templates/idf/source/git/tree.html
3131
3232
3333
34
34
35
3536
3637
3738
3839
3940
4041
42
43
44
4145
4246
4347
{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, $commit, $file.fullpath)}
<tr>
<td class="fileicon"><img src="{media '/idf/img/'~$file.type~'.png'}" alt="{$file.type}" /></td>
<td{if $file.type != 'blob'} colspan="4"{/if}><a href="{$url}">{$file.file}</a></td>
{if $file.type != 'extern'}
<td{if $file.type == 'tree'} colspan="4"{/if}><a href="{$url}">{$file.file}</a></td>{else}<td><a href="#" title="{$file.hash}">{$file.file}</a></td>{/if}
{if $file.type == 'blob'}
{if isset($file.date) and $file.log != '----'}
<td><span class="smaller">{$file.date|dateago:"wihtout"}</span></td>
<td><span class="smaller">{$file.author|strip_tags|trim}{trans ':'} {issuetext $file.log, $request, true, false}</span></td>
{else}<td colspan="2"></td>{/if}
<td>{$file.size|size}</td>{/if}
{if $file.type == 'extern'}
<td colspan="3">{$file.extern}</td>
{/if}
</tr>
{/foreach}
</tbody>

Archive Download the corresponding diff file

Page rendered in 0.08367s using 15 queries.