Indefero

Indefero Commit Details


Date:2009-11-06 09:12:54 (15 years 1 month ago)
Author:Mehdi Kabab
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:8050463a12f462bd4efebb8cef94bb778c2526ef
Parents: 73dba2fa1a573ed01c1554c8880148a6d3492b15
Message:Added ticket 271, support of the Git tags.

Changes:

File differences

AUTHORS
1010
1111
1212
13
13
1414
1515
1616
Julien Issler
Manuel Eidenberger <eidenberger@gmail.com>
Ciaran Gultnieks
Mehdi Kabab
Mehdi Kabab <http://pioupioum.fr/>
Sindre R. Myren
Patrick Georgi <patrick.georgi@coresystems.de>
Adrien Bustany
src/IDF/Scm.php
203203
204204
205205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
206224
207225
208226
}
/**
* Returns in which tags a commit/path is.
*
* A commit can be in several tags and some of the SCMs are
* managing tags using subfolders (like Subversion).
*
* This means that to know in which tag we are at the moment,
* one needs to have both the path and the commit.
*
* @param string Commit
* @param string Path
* @return array Tags
*/
public function inTags($commit, $path)
{
throw new Pluf_Exception_NotImplemented();
}
/**
* Returns the main branch.
*
* The main branch is the one displayed by default. For example
src/IDF/Scm/Git.php
9191
9292
9393
94
95
96
97
98
99
100
101
94
95
96
97
98
99
100
101
102
102103
103104
104105
......
109110
110111
111112
112
113
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
114145
115146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
116182
117183
118184
......
226292
227293
228294
229
295
296
230297
231298
232299
233300
234301
235302
236
303
237304
238305
239306
......
257324
258325
259326
260
327
261328
262329
263330
......
276343
277344
278345
279
280346
281347
282348
......
315381
316382
317383
318
319384
320385
321386
......
342407
343408
344409
345
346
347
348
349
350
351
352
353
354
355
410
411
412
413
414
415
416
417
418
419
420
421
422
356423
424
425
426
427
428
357429
358
359
360430
361431
362432
......
408478
409479
410480
411
481
412482
413483
414484
......
478548
479549
480550
481
551
482552
483553
484554
public function getMainBranch()
{
$possible = array('master', 'main', 'trunk', 'local');
$branches = array_keys($this->getBranches());
foreach ($possible as $p) {
if (in_array($p, $branches)) {
return $p;
}
}
return (isset($branches[0])) ? $branches[0] : 'master';
$branches = $this->getBranches();
if (array_key_exists('master', $branches))
return 'master';
static $possible = array('main', 'trunk', 'local');
for ($i = 0; 3 > $i; ++$i) {
if (array_key_exists($possible[$i], $branches))
return $possible[$i];
}
return key($branches);
}
/**
*/
public function inBranches($commit, $path)
{
return (in_array($commit, array_keys($this->getBranches())))
? array($commit) : array();
return $this->_inObject($commit, 'branch');
}
/**
* @see IDF_Scm::getTags()
**/
public function getTags()
{
if (isset($this->cache['tags'])) {
return $this->cache['tags'];
}
$cmd = Pluf::f('idf_exec_cmd_prefix', '')
.sprintf('GIT_DIR=%s %s tag',
escapeshellarg($this->repo),
Pluf::f('git_path', 'git'));
exec($cmd, $out, $return);
if (0 != $return) {
throw new IDF_Scm_Exception(sprintf($this->error_tpl,
$cmd,
$return,
implode("\n", $out)));
}
$res = array();
foreach ($out as $b) {
if (false !== strpos($b, '/')) {
$res[$this->getCommit($b)->commit] = $b;
} else {
$res[$b] = '';
}
}
$this->cache['tags'] = $res;
return $res;
}
/**
* @see IDF_Scm::inTags()
**/
public function inTags($commit, $path)
{
return $this->_inObject($commit, 'tag');
}
/**
* Returns in which branches or tags a commit is.
*
* @param string Commit
* @param string Object's type: 'branch' or 'tag'.
* @return array
*/
private function _inObject($commit, $object)
{
$object = strtolower($object);
if ('branch' === $object) {
$objects = $this->getBranches();
} else if ('tag' === $object) {
$objects = $this->getTags();
} else {
throw new InvalidArgumentException(sprintf(__('Invalid value for the parameter %1$s: %2$s. Use %3$s.'),
'$object',
$object,
'\'branch\' or \'tag\''));
}
unset($object);
$result = array();
if (array_key_exists($commit, $objects)) {
$result[] = $commit;
}
return $result;
}
/**
* Git "tree" is not the same as the tree we get here.
public function isValidRevision($commit)
{
return ('commit' == $this->testHash($commit));
$type = $this->testHash($commit);
return ('commit' == $type || 'tag' == $type);
}
/**
* Test a given object hash.
*
* @param string Object hash.
* @return mixed false if not valid or 'blob', 'tree', 'commit'
* @return mixed false if not valid or 'blob', 'tree', 'commit', 'tag'
*/
public function testHash($hash)
{
*/
public function getTreeInfo($tree, $folder='')
{
if (!in_array($this->testHash($tree), array('tree', 'commit'))) {
if (!in_array($this->testHash($tree), array('tree', 'commit', 'tag'))) {
throw new Exception(sprintf(__('Not a valid tree: %s.'), $tree));
}
$cmd_tmpl = 'GIT_DIR=%s '.Pluf::f('git_path', 'git').' ls-tree -l %s %s';
return $res;
}
/**
* Get the file info.
*
return ($cmd_only) ? $cmd : shell_exec($cmd);
}
/**
* Get commit details.
*
if ($ret != 0 or count($out) == 0) {
return false;
}
$log = array();
$change = array();
$inchange = false;
foreach ($out as $line) {
if (!$inchange and 0 === strpos($line, 'diff --git a')) {
$inchange = true;
}
if ($inchange) {
$change[] = $line;
} else {
$log[] = $line;
if ($getdiff) {
$log = array();
$change = array();
$inchange = false;
foreach ($out as $line) {
if (!$inchange and 0 === strpos($line, 'diff --git a')) {
$inchange = true;
}
if ($inchange) {
$change[] = $line;
} else {
$log[] = $line;
}
}
$out = self::parseLog($log);
$out[0]->changes = implode("\n", $change);
} else {
$out = self::parseLog($out);
$out[0]->changes = '';
}
$out = self::parseLog($log, 4);
$out[0]->changes = implode("\n", $change);
return $out[0];
}
$out = array();
$cmd = Pluf::f('idf_exec_cmd_prefix', '').$cmd;
exec($cmd, $out);
return self::parseLog($out, 4);
return self::parseLog($out);
}
/**
* Specific Git Commands
* =====================================================
*/
/**
* Get submodule details.
*
src/IDF/Views/Source.php
6262
6363
6464
65
66
6765
6866
6967
......
8583
8684
8785
86
87
8888
8989
9090
......
9494
9595
9696
97
98
9799
98100
99101
......
102104
103105
104106
107
108
105109
106110
107111
......
110114
111115
112116
113
114
115117
116118
117119
......
126128
127129
128130
131
132
129133
130134
135
136
131137
132138
133139
......
146152
147153
148154
155
156
149157
150158
151159
......
154162
155163
156164
157
158
159165
160166
161
162167
163168
164169
165170
166171
167172
168
169173
170174
171175
176
172177
173178
174179
......
185190
186191
187192
193
194
188195
189
196
190197
191198
192
193199
194200
195201
......
197203
198204
199205
206
200207
201208
202209
......
207214
208215
209216
217
218
210219
211220
212221
......
218227
219228
220229
230
221231
222232
223233
......
243253
244254
245255
256
257
246258
247259
248260
......
270282
271283
272284
273
274285
275286
276287
......
293304
294305
295306
296
307
308
309
310
297311
298312
299313
......
303317
304318
305319
320
321
306322
307323
308324
......
315331
316332
317333
318
319334
320335
321336
......
338353
339354
340355
356
341357
342358
343359
......
345361
346362
347363
364
348365
349366
350367
......
365382
366383
367384
385
386
368387
369388
370389
......
378397
379398
380399
381
382400
383401
384402
......
413431
414432
415433
416
417434
418435
419436
public $changeLog_precond = array('IDF_Precondition::accessSource');
public function changeLog($request, $match)
{
$title = sprintf(__('%1$s %2$s Change Log'), (string) $request->project,
$this->getScmType($request));
$scm = IDF_Scm::get($request->project);
if (!$scm->isAvailable()) {
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::help',
$scm->getMainBranch()));
return new Pluf_HTTP_Response_Redirect($url);
}
$title = sprintf(__('%1$s %2$s Change Log'), (string) $request->project,
$this->getScmType($request));
$changes = $scm->getChangeLog($commit, 25);
$rchanges = array();
// Sync with the database
$rchanges = new Pluf_Template_ContextVars($rchanges);
$scmConf = $request->conf->getVal('scm', 'git');
$in_branches = $scm->inBranches($commit, '');
$tags = $scm->getTags();
$in_tags = $scm->inTags($commit, '');
return Pluf_Shortcuts_RenderToResponse('idf/source/'.$scmConf.'/changelog.html',
array(
'page_title' => $title,
'commit' => $commit,
'branches' => $branches,
'tree_in' => $in_branches,
'tags' => $tags,
'tags_in' => $in_tags,
'scm' => $scmConf,
),
$request);
public $treeBase_precond = array('IDF_Precondition::accessSource');
public function treeBase($request, $match)
{
$title = sprintf(__('%1$s %2$s Source Tree'),
$request->project, $this->getScmType($request));
$scm = IDF_Scm::get($request->project);
if (!$scm->isAvailable()) {
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::help',
$scm->getMainBranch()));
return new Pluf_HTTP_Response_Redirect($url);
}
$title = sprintf(__('%1$s %2$s Source Tree'),
$request->project, $this->getScmType($request));
$branches = $scm->getBranches();
$in_branches = $scm->inBranches($commit, '');
$tags = $scm->getTags();
$in_tags = $scm->inTags($commit, '');
$cache = Pluf_Cache::factory();
$key = sprintf('Project:%s::IDF_Views_Source::treeBase:%s::',
$request->project->id, $commit);
'commit' => $commit,
'tree_in' => $in_branches,
'branches' => $branches,
'tags' => $tags,
'tags_in' => $in_tags,
'props' => $props,
),
$request);
public $tree_precond = array('IDF_Precondition::accessSource');
public function tree($request, $match)
{
$title = sprintf(__('%1$s %2$s Source Tree'),
$request->project, $this->getScmType($request));
$scm = IDF_Scm::get($request->project);
$commit = $match[2];
$request_file = $match[3];
if (!$scm->isAvailable()) {
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::help',
array($request->project->shortname));
return new Pluf_HTTP_Response_Redirect($url);
}
$branches = $scm->getBranches();
$fburl = Pluf_HTTP_URL_urlForView('IDF_Views_Source::treeBase',
array($request->project->shortname,
$scm->getMainBranch()));
$request_file = $match[3];
if (substr($request_file, -1) == '/') {
$request_file = substr($request_file, 0, -1);
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::tree',
// Redirect to the first branch
return new Pluf_HTTP_Response_Redirect($fburl);
}
$branches = $scm->getBranches();
$tags = $scm->getTags();
if ($request_file_info->type != 'tree') {
$info = self::getRequestedFileMimeType($request_file_info,
$info = self::getRequestedFileMimeType($request_file_info,
$commit, $scm);
if (!self::isText($info)) {
$rep = new Pluf_HTTP_Response($scm->getFile($request_file_info),
$info[0]);
$rep->headers['Content-Disposition'] = 'attachment; filename="'.$info[1].'"';
} else {
// We want to display the content of the file as text
$extra = array('branches' => $branches,
'tags' => $tags,
'commit' => $commit,
'request_file' => $request_file,
'request_file_info' => $request_file_info,
}
$bc = self::makeBreadCrumb($request->project, $commit, $request_file_info->fullpath);
$title = sprintf(__('%1$s %2$s Source Tree'),
$request->project, $this->getScmType($request));
$page_title = $bc.' - '.$title;
$cobject = $scm->getCommit($commit);
return new Pluf_HTTP_Response_Redirect($url);
}
$in_branches = $scm->inBranches($commit, $request_file);
$in_tags = $scm->inTags($commit, $request_file);
$cache = Pluf_Cache::factory();
$key = sprintf('Project:%s::IDF_Views_Source::tree:%s::%s',
$request->project->id, $commit, $request_file);
'prev' => $previous,
'tree_in' => $in_branches,
'branches' => $branches,
'tags' => $tags,
'tags_in' => $in_tags,
'props' => $props,
),
$request);
{
$scm = IDF_Scm::get($request->project);
$commit = $match[2];
$branches = $scm->getBranches();
if (!$scm->isValidRevision($commit)) {
// Redirect to the first branch
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::treeBase',
$diff = new IDF_Diff($cobject->changes);
$diff->parse();
$scmConf = $request->conf->getVal('scm', 'git');
$in_branches = $scm->inBranches($commit, '');
$branches = $scm->getBranches();
$in_branches = $scm->inBranches($cobject->commit, '');
$tags = $scm->getTags();
$in_tags = $scm->inTags($cobject->commit, '');
return Pluf_Shortcuts_RenderToResponse('idf/source/commit.html',
array(
'page_title' => $page_title,
'commit' => $commit,
'branches' => $branches,
'tree_in' => $in_branches,
'tags' => $tags,
'tags_in' => $in_tags,
'scm' => $scmConf,
'rcommit' => $rcommit,
'large_commit' => $large,
{
$scm = IDF_Scm::get($request->project);
$commit = $match[2];
$branches = $scm->getBranches();
if (!$scm->isValidRevision($commit)) {
// Redirect to the first branch
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::treeBase',
$this->getScmType($request));
$scm = IDF_Scm::get($request->project);
$branches = $extra['branches'];
$tags = $extra['tags'];
$commit = $extra['commit'];
$request_file = $extra['request_file'];
$request_file_info = $extra['request_file_info'];
$page_title = $bc.' - '.$title;
$cobject = $scm->getCommit($commit);
$in_branches = $scm->inBranches($commit, $request_file);
$in_tags = $scm->inTags($commit, '');
// try to find the previous level if it exists.
$prev = explode('/', $request_file);
$l = array_pop($prev);
'prev' => $previous,
'tree_in' => $in_branches,
'branches' => $branches,
'tags' => $tags,
'tags_in' => $in_tags,
'props' => $props,
),
$request);
public function getFile($request, $match)
{
$scm = IDF_Scm::get($request->project);
$branches = $scm->getBranches();
$commit = $match[2];
$request_file = $match[3];
if (!$scm->isValidRevision($commit)) {
{
$commit = trim($match[2]);
$scm = IDF_Scm::get($request->project);
$branches = $scm->getBranches();
if (!$scm->isValidRevision($commit)) {
// Redirect to the first branch
$url = Pluf_HTTP_URL_urlForView('IDF_Views_Source::treeBase',
src/IDF/templates/idf/source/base.html
11
22
33
4
4
55
66
77
{extends "idf/base.html"}
{block tabsource} class="active"{/block}
{block subtabs}
{if !$inHelp and array_key_exists($commit, $branches)}{assign $currentCommit = $commit}{else}{assign $currentCommit = $project.getScmRoot()}{/if}
{if !$inHelp and (in_array($commit, $tree_in) or (in_array($commit, $tags_in)))}{assign $currentCommit = $commit}{else}{assign $currentCommit = $project.getScmRoot()}{/if}
<div id="sub-tabs">
<a {if $inSourceTree}class="active" {/if}href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $currentCommit)}">{trans 'Source Tree'}</a> |
<a {if $inChangeLog}class="active" {/if}href="{url 'IDF_Views_Source::changeLog', array($project.shortname, $currentCommit)}">{trans 'Change Log'}</a>
src/IDF/templates/idf/source/commit.html
11
2
2
33
44
55
......
1313
1414
1515
16
16
1717
1818
1919
......
2121
2222
2323
24
24
2525
2626
2727
......
3333
3434
3535
36
36
3737
3838
3939
4040
4141
42
42
4343
4444
45
45
4646
4747
48
49
50
51
52
53
54
55
4856
4957
5058
5159
52
53
60
61
5462
5563
5664
{extends "idf/source/base.html"}
{block extraheader}<link rel="stylesheet" type="text/css" href="{media '/idf/css/prettify.css'}" />{/block}
{block extraheader}<link rel="stylesheet" type="text/css" href="{media '/idf/css/prettify.css'}"/>{/block}
{block docclass}yui-t1{assign $inCommit=true}{/block}
{block body}
<table class="commit" summary="">
<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>
<th><strong>{trans 'Message:'}</strong></th><td>{issuetext $cobject.title, $request}{if isset($cobject.full_message)}<br /><br />{issuetext $cobject.full_message, $request, true, false, true, true, true}{/if}</td>
<th><strong>{trans 'Message:'}</strong></th><td>{issuetext $cobject.title, $request}{if isset($cobject.full_message)}<br/><br/>{issuetext $cobject.full_message, $request, true, false, true, true, true}{/if}</td>
</tr>
{if count($diff.files)}
<tr>
<td>
{foreach $diff.files as $filename=>$diffdef}
{assign $ndiff = count($diffdef['chunks'])}
<a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $filename)}">{$filename}</a> (<a href="#diff-{$filename|md5}">{blocktrans $ndiff}{$ndiff} diff{plural}{$ndiff} diffs{/blocktrans}</a>)<br />
<a href="{url 'IDF_Views_Source::tree', array($project.shortname, $commit, $filename)}">{$filename}</a> (<a href="#diff-{$filename|md5}">{blocktrans $ndiff}{$ndiff} diff{plural}{$ndiff} diffs{/blocktrans}</a>)<br/>
{/foreach}
</td>
</tr>
{$diff.as_html()}
{/if}{if count($diff.files) or $large_commit}
{aurl 'url', 'IDF_Views_Source::downloadDiff', array($project.shortname, $commit)}
<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom" /></a> <a href="{$url}">{trans 'Download the corresponding diff file'}</a></p>
<p class="right soft"><a href="{$url}"><img style="vertical-align: text-bottom;" src="{media '/idf/img/package-grey.png'}" alt="{trans 'Archive'}" align="bottom"/></a> <a href="{$url}">{trans 'Download the corresponding diff file'}</a></p>
{/if}
{/block}
{block context}
{if $scm != 'svn'}
<p><strong>{trans 'Branches:'}</strong><br />
<p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $branch => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br />
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{$branch}</a></span><br/>
{/foreach}
</p>
{if $tags}
<p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $tag => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)}
<span class="label{if in_array($tag, $tags_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$tag}{/if}</a></span><br/>
{/foreach}
</p>
{/if}
{else}
<form class="star" action="{url 'IDF_Views_Source_Svn::changelogRev', array($project.shortname)}" method="get">
<p><strong>{trans 'Revision:'}</strong> {$commit}</p>
<p>
<input accesskey="4" type="text" value="{$commit}" name="rev" size="5" />
<input type="submit" name="s" value="{trans 'Go to revision'}" />
<input accesskey="4" type="text" value="{$commit}" name="rev" size="5"/>
<input type="submit" name="s" value="{trans 'Go to revision'}"/>
</p>
</form>
{/if}
src/IDF/templates/idf/source/git/changelog.html
11
22
3
3
44
55
6
6
77
88
9
10
11
12
13
14
15
16
917
10
{extends "idf/source/changelog.html"}
{block context}
<p><strong>{trans 'Branches:'}</strong><br />
<p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $branch => $path}
{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $branch)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$branch}{/if}</a></span><br />
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$branch}{/if}</a></span><br/>
{/foreach}
</p>
{if $tags}
<p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $tag => $path}
{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $tag)}
<span class="label{if in_array($tag, $tags_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$tag}{/if}</a></span><br/>
{/foreach}
</p>
{/if}
{/block}
src/IDF/templates/idf/source/git/file.html
55
66
77
8
8
99
1010
11
11
1212
1313
1414
......
2222
2323
2424
25
25
2626
2727
28
28
2929
3030
31
32
33
34
35
36
37
38
3139
3240
3341
<h2 class="top"><a href="{url 'IDF_Views_Source::treeBase', array($project.shortname, $commit)}">{trans 'Root'}</a><span class="sep">/</span>{if $breadcrumb}{$breadcrumb|safe}{/if}</h2>
<table class="code" summary=" ">
{if !$tree_in}
{if !$tree_in and !$tags_in}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)}
<tfoot>
<tr><th colspan="2">{blocktrans}Source at commit <a class="mono" href="{$url}">{$commit}</a> created {$cobject.date|dateago}.{/blocktrans}<br />
<tr><th colspan="2">{blocktrans}Source at commit <a class="mono" href="{$url}">{$commit}</a> created {$cobject.date|dateago}.{/blocktrans}<br/>
<span class="smaller">{blocktrans}By {$cobject.author|strip_tags|trim}, {$cobject.title}{/blocktrans}</span>
</th></tr>
</tfoot>
{/block}
{block context}
<p><strong>{trans 'Branches:'}</strong><br />
<p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $branch => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$branch}{/if}</a></span><br />
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$branch}{/if}</a></span><br/>
{/foreach}
</p>
{if $tags}
<p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $tag => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)}
<span class="label{if in_array($tag, $tags_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$tag}{/if}</a></span><br/>
{/foreach}
</p>
{/if}
{/block}
{block javascript}
src/IDF/templates/idf/source/git/tree.html
1111
1212
1313
14
14
1515
1616
17
17
1818
1919
2020
......
5252
5353
5454
55
55
5656
5757
58
58
5959
6060
61
62
63
64
65
66
67
68
6169
<th>{trans 'Message'}</th>
<th>{trans 'Size'}</th>
</tr>
</thead>{if !$tree_in}
</thead>{if !$tree_in and !$tags_in}
{aurl 'url', 'IDF_Views_Source::commit', array($project.shortname, $commit)}
<tfoot>
<tr><th colspan="5">{blocktrans}Source at commit <a class="mono" href="{$url}">{$commit}</a> created {$cobject.date|dateago}.{/blocktrans}<br />
<tr><th colspan="5">{blocktrans}Source at commit <a class="mono" href="{$url}">{$commit}</a> created {$cobject.date|dateago}.{/blocktrans}<br/>
<span class="smaller">{blocktrans}By {$cobject.author|strip_tags|trim}, {$cobject.title}{/blocktrans}</span>
</th></tr>
</tfoot>
{/block}
{block context}
<p><strong>{trans 'Branches:'}</strong><br />
<p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $branch => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$branch}{/if}</a></span><br />
<span class="label{if in_array($branch, $tree_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$branch}{/if}</a></span><br/>
{/foreach}
</p>
{if $tags}
<p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $tag => $path}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)}
<span class="label{if in_array($tag, $tags_in)} active{/if}"><a href="{$url}" class="label">{if $path}{$path}{else}{$tag}{/if}</a></span><br/>
{/foreach}
</p>
{/if}
{/block}

Archive Download the corresponding diff file

Page rendered in 0.10902s using 14 queries.