Indefero

Indefero Commit Details


Date:2010-06-29 02:59:49 (14 years 5 months ago)
Author:Thomas Keller
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:d2f0bac907e82ee394ada3db603354223cbc317f
Parents: e46a6fa1712991426e8482d422756834c285a133
Message:* Monotone.php: get inTags() and inBranches() correct - they need to return a list with selectors as keys, otherwise the main menu won't link the active revision, but instead use the main branch * changelog.html, tree.html: shorten the branch / tag output a bit (still ugly to have a fixed output like this, though), link tags by their selector, no longer by their revision ID. We loose some flexibility here, since tags could actually mark different revisions, which are now ignored

Changes:

File differences

src/IDF/Scm/Monotone.php
628628
629629
630630
631
631
632632
633633
634634
635
635636
636637
637
638
638639
639640
640641
......
642643
643644
644645
645
646
646
647
648
649
647650
648651
649652
......
686689
687690
688691
689
692
690693
691694
692695
......
716719
717720
718721
719
722
723
724
725
726
727
720728
721729
722730
......
733741
734742
735743
736
744
737745
738746
739747
/**
* Returns unique certificate values for the given revs and the specific
* cert name
* cert name, optionally prefixed with $prefix
*
* @param array
* @param string
* @param string
* @return array
*/
private function _getUniqueCertValuesFor($revs, $certName)
private function _getUniqueCertValuesFor($revs, $certName, $prefix)
{
$certValues = array();
foreach ($revs as $rev)
$certs = $this->_getCerts($rev);
if (!array_key_exists($certName, $certs))
continue;
$certValues = array_merge($certValues, $certs[$certName]);
foreach ($certs[$certName] as $certValue)
{
$certValues[] = "$prefix$certValue";
}
}
return array_unique($certValues);
}
{
$revs = $this->_resolveSelector($commit);
if (count($revs) == 0) return array();
return $this->_getUniqueCertValuesFor($revs, "branch");
return $this->_getUniqueCertValuesFor($revs, "branch", "h:");
}
/**
}
if ($stanzaline['key'] == "revision")
{
$tags[$stanzaline['hash']] = $tagname;
// FIXME: warn if multiple revisions have
// equally named tags
if (!array_key_exists("t:$tagname", $tags))
{
$tags["t:$tagname"] = $tagname;
}
break;
}
}
{
$revs = $this->_resolveSelector($commit);
if (count($revs) == 0) return array();
return $this->_getUniqueCertValuesFor($revs, "tag");
return $this->_getUniqueCertValuesFor($revs, "tag", "t:");
}
/**
src/IDF/templates/idf/source/mtn/changelog.html
33
44
55
6
6
77
8
8
99
1010
1111
......
1414
1515
1616
17
17
1818
19
19
2020
2121
2222
<p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $selector => $branch}
{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $selector)}
<span class="label{if in_array($branch, $tree_in)} active{/if}">
<span class="label{if in_array($selector, $tree_in)} active{/if}">
<a href="{$url}" class="label" title="{$branch}">
{$branch|shorten:25}
{$branch|shorten:24}
</a>
</span><br/>
{/foreach}
<p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $selector => $tag}
{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $selector)}
<span class="label{if in_array($tag, $tags_in)} active{/if}">
<span class="label{if in_array($selector, $tags_in)} active{/if}">
<a href="{$url}" class="label" title="{$tag}">
{$tag|shorten:25}
{$tag|shorten:24}
</a>
</span><br/>
{/foreach}
src/IDF/templates/idf/source/mtn/tree.html
3535
3636
3737
38
38
3939
4040
4141
......
5858
5959
6060
61
61
6262
63
63
6464
6565
6666
......
6969
7070
7171
72
72
7373
74
74
7575
7676
7777
<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.date|dateago:"without"}</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}
<p><strong>{trans 'Branches:'}</strong><br/>
{foreach $branches as $selector => $branch}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($branch, $tree_in)} active{/if}">
<span class="label{if in_array($selector, $tree_in)} active{/if}">
<a href="{$url}" class="label" title="{$branch}">
{$branch|shorten:25}
{$branch|shorten:24}
</a>
</span><br/>
{/foreach}
<p><strong>{trans 'Tags:'}</strong><br/>
{foreach $tags as $selector => $tag}
{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
<span class="label{if in_array($tag, $tags_in)} active{/if}">
<span class="label{if in_array($selector, $tags_in)} active{/if}">
<a href="{$url}" class="label" title="{$tag}">
{$tag|shorten:25}
{$tag|shorten:24}
</a>
</span><br/>
{/foreach}

Archive Download the corresponding diff file

Page rendered in 0.08404s using 13 queries.