P {$filename}
{foreach $properties as $key => $value}
{$key}
diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css
index ee95375..c346839 100644
--- a/www/media/idf/css/style.css
+++ b/www/media/idf/css/style.css
@@ -956,3 +956,41 @@ ol > li {
.context > .expander div.input-with-delete.default {
opacity: 0.5;
}
+
+/**
+ * SCM action icons in the commit view
+ */
+span.scm-action {
+ display: inline-block;
+ line-height: 9px;
+ font-size: 9px;
+ text-align: center;
+ padding: 2px;
+ width: 9px;
+ -moz-border-radius: 3px;
+ -webkit-border-radius: 3px;
+ border-radius: 3px;
+ color: white;
+ cursor: default;
+}
+
+span.scm-action.added {
+ background-color: darkgreen;
+}
+
+span.scm-action.deleted {
+ background-color: darkred;
+}
+
+span.scm-action.patched {
+ background-color: orange;
+}
+
+span.scm-action.renamed {
+ background-color: purple;
+}
+
+span.scm-action.property-changed {
+ background-color: blue;
+}
+
From a188e1b27505d6efcda59b0ea6f91c7e8d3bdceb Mon Sep 17 00:00:00 2001
From: Thomas Keller
Date: Wed, 26 Jan 2011 02:37:34 +0100
Subject: [PATCH 4/9] Use the proper unicode arrow code point instead of "->".
---
src/IDF/templates/idf/source/commit.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/IDF/templates/idf/source/commit.html b/src/IDF/templates/idf/source/commit.html
index 72dca0b..e07d373 100644
--- a/src/IDF/templates/idf/source/commit.html
+++ b/src/IDF/templates/idf/source/commit.html
@@ -32,7 +32,7 @@
D {$filename}{if !empty($diff.files[$filename])} ({trans 'full'} ){/if}
{/foreach}
{foreach $changes.renames as $oldname => $newname}
-R {$oldname} -> {$newname}
+R {$oldname} → {$newname}
{/foreach}
{foreach $changes.additions as $filename}
A {$filename} {if !empty($diff.files[$filename])} ({trans 'full'} ){/if}
From 2908e289992433970638064e9dceac51955a0e4e Mon Sep 17 00:00:00 2001
From: Thomas Keller
Date: Wed, 26 Jan 2011 02:40:28 +0100
Subject: [PATCH 5/9] Vertical-align properly.
---
www/media/idf/css/style.css | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css
index c346839..c515446 100644
--- a/www/media/idf/css/style.css
+++ b/www/media/idf/css/style.css
@@ -972,6 +972,7 @@ span.scm-action {
border-radius: 3px;
color: white;
cursor: default;
+ margin-top: 2px;
}
span.scm-action.added {
@@ -993,4 +994,3 @@ span.scm-action.renamed {
span.scm-action.property-changed {
background-color: blue;
}
-
From 7bcfb806b0af91433d46bc7bfd4f3fece6db2719 Mon Sep 17 00:00:00 2001
From: Thomas Keller
Date: Thu, 27 Jan 2011 14:12:42 +0100
Subject: [PATCH 6/9] Create valid HTML for the branch and tag list headings
(no block elements inside headings) and also use a lower heading, h3 and not
h1 for the subheadings. Reduce the amount of code duplication with include's
for each VCS.
---
.../idf/source/git/branch_tag_list.html | 39 +++++++++++++++++++
.../templates/idf/source/git/changelog.html | 37 +-----------------
src/IDF/templates/idf/source/git/commit.html | 36 +----------------
src/IDF/templates/idf/source/git/file.html | 36 +----------------
src/IDF/templates/idf/source/git/tree.html | 36 +----------------
.../idf/source/mercurial/branch_tag_list.html | 39 +++++++++++++++++++
.../idf/source/mercurial/changelog.html | 37 +-----------------
.../idf/source/mercurial/commit.html | 36 +----------------
.../templates/idf/source/mercurial/file.html | 35 +----------------
.../templates/idf/source/mercurial/tree.html | 36 +----------------
.../idf/source/mtn/branch_tag_list.html | 39 +++++++++++++++++++
.../templates/idf/source/mtn/changelog.html | 37 +-----------------
src/IDF/templates/idf/source/mtn/commit.html | 36 +----------------
src/IDF/templates/idf/source/mtn/file.html | 36 +----------------
src/IDF/templates/idf/source/mtn/tree.html | 36 +----------------
www/media/idf/css/style.css | 14 +++----
16 files changed, 139 insertions(+), 426 deletions(-)
create mode 100644 src/IDF/templates/idf/source/git/branch_tag_list.html
create mode 100644 src/IDF/templates/idf/source/mercurial/branch_tag_list.html
create mode 100644 src/IDF/templates/idf/source/mtn/branch_tag_list.html
diff --git a/src/IDF/templates/idf/source/git/branch_tag_list.html b/src/IDF/templates/idf/source/git/branch_tag_list.html
new file mode 100644
index 0000000..b9c4026
--- /dev/null
+++ b/src/IDF/templates/idf/source/git/branch_tag_list.html
@@ -0,0 +1,39 @@
+{if !$view_url}
+{assign $view_url = 'IDF_Views_Source::treeBase'}
+{/if}
+
+
+
+ {trans 'Branches'}
+
+
+
+
+
+
+{if $tags}
+
+ {trans 'Tags'}
+
+
+
+
+
+
+{/if}
+
+
diff --git a/src/IDF/templates/idf/source/git/changelog.html b/src/IDF/templates/idf/source/git/changelog.html
index a0373cd..a5a82bd 100644
--- a/src/IDF/templates/idf/source/git/changelog.html
+++ b/src/IDF/templates/idf/source/git/changelog.html
@@ -1,38 +1,5 @@
{extends "idf/source/changelog.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{assign $view_url = 'IDF_Views_Source::changeLog'}
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/git/commit.html b/src/IDF/templates/idf/source/git/commit.html
index 5e5850e..8421adf 100644
--- a/src/IDF/templates/idf/source/git/commit.html
+++ b/src/IDF/templates/idf/source/git/commit.html
@@ -1,39 +1,5 @@
{extends "idf/source/commit.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/git/file.html b/src/IDF/templates/idf/source/git/file.html
index c430faf..01691ad 100644
--- a/src/IDF/templates/idf/source/git/file.html
+++ b/src/IDF/templates/idf/source/git/file.html
@@ -22,41 +22,7 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
{block javascript}
diff --git a/src/IDF/templates/idf/source/git/tree.html b/src/IDF/templates/idf/source/git/tree.html
index 6f48023..e349376 100644
--- a/src/IDF/templates/idf/source/git/tree.html
+++ b/src/IDF/templates/idf/source/git/tree.html
@@ -52,39 +52,5 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/git/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mercurial/branch_tag_list.html b/src/IDF/templates/idf/source/mercurial/branch_tag_list.html
new file mode 100644
index 0000000..98b3312
--- /dev/null
+++ b/src/IDF/templates/idf/source/mercurial/branch_tag_list.html
@@ -0,0 +1,39 @@
+{if !$view_url}
+{assign $view_url = 'IDF_Views_Source::treeBase'}
+{/if}
+
+
+
+ {trans 'Branches'}
+
+
+
+
+
+
+{foreach $branches as $branch => $path}
+{aurl 'url', $view_url, array($project.shortname, $branch)}
+
+ {$branch}
+
+{/foreach}
+
+{if $tags}
+
+ {trans 'Tags'}
+
+
+
+
+
+
+{foreach $tags as $tag => $path}
+{aurl 'url', $view_url, array($project.shortname, $tag)}
+
+ {$tag}
+
+{/foreach}
+
+{/if}
+
+
diff --git a/src/IDF/templates/idf/source/mercurial/changelog.html b/src/IDF/templates/idf/source/mercurial/changelog.html
index fa648db..8fb2ac3 100644
--- a/src/IDF/templates/idf/source/mercurial/changelog.html
+++ b/src/IDF/templates/idf/source/mercurial/changelog.html
@@ -1,39 +1,6 @@
{extends "idf/source/changelog.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $branch)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $tag => $path}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $tag)}
-
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{assign $view_url = 'IDF_Views_Source::changeLog'}
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mercurial/commit.html b/src/IDF/templates/idf/source/mercurial/commit.html
index 5e5850e..707cb23 100644
--- a/src/IDF/templates/idf/source/mercurial/commit.html
+++ b/src/IDF/templates/idf/source/mercurial/commit.html
@@ -1,39 +1,5 @@
{extends "idf/source/commit.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{/if}
-
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mercurial/file.html b/src/IDF/templates/idf/source/mercurial/file.html
index eae2050..25d4572 100644
--- a/src/IDF/templates/idf/source/mercurial/file.html
+++ b/src/IDF/templates/idf/source/mercurial/file.html
@@ -23,40 +23,7 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $tag => $path}
-{aurl 'url', 'IDF_Views_Source::tree', array($project.shortname, 'HEAD', $path)}
-
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
{block javascript}
diff --git a/src/IDF/templates/idf/source/mercurial/tree.html b/src/IDF/templates/idf/source/mercurial/tree.html
index d2d9e27..4df5a30 100644
--- a/src/IDF/templates/idf/source/mercurial/tree.html
+++ b/src/IDF/templates/idf/source/mercurial/tree.html
@@ -47,40 +47,6 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $branch => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $branch)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $tag => $path}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $tag)}
-
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mercurial/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/branch_tag_list.html b/src/IDF/templates/idf/source/mtn/branch_tag_list.html
new file mode 100644
index 0000000..c0a772f
--- /dev/null
+++ b/src/IDF/templates/idf/source/mtn/branch_tag_list.html
@@ -0,0 +1,39 @@
+{if !$view_url}
+{assign $view_url = 'IDF_Views_Source::treeBase'}
+{/if}
+
+
+
+ {trans 'Branches'}
+
+
+
+
+
+
+{foreach $branches as $selector => $branch}
+{aurl 'url', $view_url, array($project.shortname, $selector)}
+
+ {$branch}
+
+{/foreach}
+
+{if $tags}
+
+ {trans 'Tags'}
+
+
+
+
+
+
+{foreach $tags as $selector => $tag}
+{aurl 'url', $view_url, array($project.shortname, $selector)}
+
+ {$tag}
+
+{/foreach}
+
+{/if}
+
+
diff --git a/src/IDF/templates/idf/source/mtn/changelog.html b/src/IDF/templates/idf/source/mtn/changelog.html
index abaf35f..cb124a6 100644
--- a/src/IDF/templates/idf/source/mtn/changelog.html
+++ b/src/IDF/templates/idf/source/mtn/changelog.html
@@ -1,38 +1,5 @@
{extends "idf/source/changelog.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $selector)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::changeLog', array($project.shortname, $selector)}
-
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{assign $view_url = 'IDF_Views_Source::changeLog'}
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/commit.html b/src/IDF/templates/idf/source/mtn/commit.html
index ff3ec7a..bec83e2 100644
--- a/src/IDF/templates/idf/source/mtn/commit.html
+++ b/src/IDF/templates/idf/source/mtn/commit.html
@@ -1,38 +1,4 @@
{extends "idf/source/commit.html"}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
-
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/file.html b/src/IDF/templates/idf/source/mtn/file.html
index a7c0d75..2901c60 100644
--- a/src/IDF/templates/idf/source/mtn/file.html
+++ b/src/IDF/templates/idf/source/mtn/file.html
@@ -25,40 +25,6 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
-
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/src/IDF/templates/idf/source/mtn/tree.html b/src/IDF/templates/idf/source/mtn/tree.html
index d310aeb..5ca9db5 100644
--- a/src/IDF/templates/idf/source/mtn/tree.html
+++ b/src/IDF/templates/idf/source/mtn/tree.html
@@ -53,40 +53,6 @@
{/block}
{block context}
-
-
-
- {trans 'Branches'}
-
-
-
-
-
-
-{foreach $branches as $selector => $branch}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
-
- {$branch}
-
-{/foreach}
-
-{if $tags}
-
- {trans 'Tags'}
-
-
-
-
-
-
-{foreach $tags as $selector => $tag}
-{aurl 'url', 'IDF_Views_Source::treeBase', array($project.shortname, $selector)}
-
- {$tag}
-
-{/foreach}
-
-{/if}
-
+{include 'idf/source/mtn/branch_tag_list.html'}
{/block}
diff --git a/www/media/idf/css/style.css b/www/media/idf/css/style.css
index c515446..1e6cafe 100644
--- a/www/media/idf/css/style.css
+++ b/www/media/idf/css/style.css
@@ -863,7 +863,7 @@ ol > li {
*/
.context {}
-.context h1 {
+.context h3 {
font-size: 13px;
font-weight: bold;
margin: 10px 0 5px;
@@ -918,7 +918,7 @@ ol > li {
display: none;
}
-.context > .expander div.input-with-delete {
+.context > .expander span.input-with-delete {
padding: 1px;
border: 1px dotted #474747;
display: none;
@@ -927,11 +927,11 @@ ol > li {
margin-top: -3px;
}
-.context > .expander div.input-with-delete * {
+.context > .expander span.input-with-delete * {
vertical-align: middle;
}
-.context > .expander div.input-with-delete span {
+.context > .expander span.input-with-delete span {
display: inline-block;
width: 13px;
height: 12px;
@@ -939,7 +939,7 @@ ol > li {
cursor: pointer;
}
-.context > .expander div.input-with-delete input.filter-list {
+.context > .expander span.input-with-delete input.filter-list {
font-size: 11px;
font-weight: normal;
color: #333;
@@ -948,8 +948,8 @@ ol > li {
height: 11px;
}
-.context > .expander:hover div.input-with-delete.activated,
-.context > .expander.activated div.input-with-delete.activated {
+.context > .expander:hover span.input-with-delete.activated,
+.context > .expander.activated span.input-with-delete.activated {
display: block;
}
From fbd1ebc294ab80928b414b5d4de38c3163734aad Mon Sep 17 00:00:00 2001
From: Patrick Georgi
Date: Sun, 30 Jan 2011 00:05:09 +0100
Subject: [PATCH 7/9] Add the parent property to a subversion commit.
---
src/IDF/Scm/Svn.php | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/IDF/Scm/Svn.php b/src/IDF/Scm/Svn.php
index ce90403..1904079 100644
--- a/src/IDF/Scm/Svn.php
+++ b/src/IDF/Scm/Svn.php
@@ -433,6 +433,9 @@ class IDF_Scm_Svn extends IDF_Scm
$res['date'] = gmdate('Y-m-d H:i:s', strtotime((string) $xml->logentry->date));
$res['title'] = (string) $xml->logentry->msg;
$res['commit'] = (string) $xml->logentry['revision'];
+ $res['parents'] = $xml->logentry['revision'] > 1
+ ? array((string) $xml->logentry['revision'] - 1)
+ : array();
$res['diff'] = ($getdiff) ? $this->getDiff($commit) : '';
$res['tree'] = '';
$res['branch'] = '';
From 336faa4503df5b232aeb219b7dc9829b99811765 Mon Sep 17 00:00:00 2001
From: Patrick Georgi
Date: Sun, 30 Jan 2011 00:14:35 +0100
Subject: [PATCH 8/9] Monotone's diff parsing conflicts with Subversion's -
make sure we do not let mtn recognize svn's underline that marks a new patch.
---
src/IDF/Diff.php | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/IDF/Diff.php b/src/IDF/Diff.php
index f097183..a9be715 100644
--- a/src/IDF/Diff.php
+++ b/src/IDF/Diff.php
@@ -71,7 +71,7 @@ class IDF_Diff
$current_chunk = 0;
$indiff = true;
continue;
- } else if (0 === strpos($line, '=========')) {
+ } else if (!$indiff && 0 === strpos($line, '=========')) {
// ignore pseudo stanzas with a hint of a binary file
if (preg_match("/^# (.+) is binary/", $this->lines[$i]))
continue;
From e31f10e648a563b34f1346459f34bd294c08f492 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lo=C3=AFc=20d=27Anterroches?=
Date: Tue, 1 Feb 2011 20:58:24 +0100
Subject: [PATCH 9/9] Fixed error in the cron job if a key has a bad format.
---
src/IDF/Key.php | 2 +-
src/IDF/Plugin/SyncGit/Cron.php | 8 +++++++-
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/IDF/Key.php b/src/IDF/Key.php
index 2320d8f..8896bdc 100644
--- a/src/IDF/Key.php
+++ b/src/IDF/Key.php
@@ -84,7 +84,7 @@ class IDF_Key extends Pluf_Model
return array('ssh', $m[2], $m[1]);
}
- throw new Exception('invalid or unknown key data detected');
+ throw new Exception(__('Invalid or unknown key data detected.'));
}
/**
diff --git a/src/IDF/Plugin/SyncGit/Cron.php b/src/IDF/Plugin/SyncGit/Cron.php
index cbcf8f6..f47063d 100644
--- a/src/IDF/Plugin/SyncGit/Cron.php
+++ b/src/IDF/Plugin/SyncGit/Cron.php
@@ -48,7 +48,13 @@ class IDF_Plugin_SyncGit_Cron
$out = '';
$keys = Pluf::factory('IDF_Key')->getList(array('view'=>'join_user'));
foreach ($keys as $key) {
- if ($key->getType() == 'ssh' and preg_match('/^[a-zA-Z][a-zA-Z0-9_.-]*(@[a-zA-Z][a-zA-Z0-9.-]*)?$/', $key->login)) {
+ try {
+ $key_type = $key->getType();
+ } catch (Exception $e) {
+ // The key is a bad key, skip it
+ continue;
+ }
+ if ($key_type == 'ssh' and preg_match('/^[a-zA-Z][a-zA-Z0-9_.-]*(@[a-zA-Z][a-zA-Z0-9.-]*)?$/', $key->login)) {
$content = trim(str_replace(array("\n", "\r"), '', $key->content));
$out .= sprintf($template, $cmd, $key->login, $content)."\n";
}