Merge branch 'master' of ssh://goatse.co.uk/~bobtfish/public_html/Gitalist/
Tomas Doran [Wed, 2 Dec 2009 10:11:10 +0000 (10:11 +0000)]
* 'master' of ssh://goatse.co.uk/~bobtfish/public_html/Gitalist/:
  Fix the FCGI issue locally using the new Catalyst script stuff..
  Change to new style scripts

.shipit [new file with mode: 0644]
ISSUES
Makefile.PL
lib/Gitalist/Controller/Root.pm
root/_history.tt2 [new file with mode: 0644]
root/_log_pager.tt2
root/_tree.tt2
root/history.tt2 [new file with mode: 0644]
root/summary.tt2

diff --git a/.shipit b/.shipit
new file mode 100644 (file)
index 0000000..d62b9d4
--- /dev/null
+++ b/.shipit
@@ -0,0 +1,10 @@
+# auto-generated shipit config file.
+steps = FindVersion, ChangeVersion, CheckChangeLog, DistTest, Commit, Tag, MakeDist, UploadCPAN
+
+git.tagpattern = %v
+git.push_to = origin
+
+# svn.tagpattern = MyProj-%v
+# svn.tagpattern = http://code.example.com/svn/tags/MyProj-%v
+
+CheckChangeLog.files = Changes
diff --git a/ISSUES b/ISSUES
index 64a0187..057c37d 100644 (file)
--- a/ISSUES
+++ b/ISSUES
@@ -1,2 +1,3 @@
 * Sort out commitdiff so conflicted merges have an equivalent display to gitweb (d7f39bebabeb31ce9a7b4f1b6f3db9f391b78c3e as a reference)
 * Need to sanitise the input ...
+* The snapshot action does not properly support tgz - requests for this format will receive a tar.  tbz2 is not supported at all (yet).
index a4ecc8f..5e110ca 100644 (file)
@@ -16,8 +16,7 @@ author 'Dan Brook <broq@cpan.org>';
 
 license 'gpl2';
 
-# Want trunk for FCGI to work correctly..
-requires 'Catalyst::Runtime' => '5.80014';
+requires 'Catalyst::Runtime' => '5.8001402';
 requires 'Catalyst::Plugin::ConfigLoader';
 requires 'Catalyst::Plugin::StackTrace';
 requires 'Catalyst::Plugin::Static::Simple';
index c479ee3..f9e94ad 100644 (file)
@@ -6,6 +6,7 @@ BEGIN { extends 'Catalyst::Controller' }
 
 __PACKAGE__->config->{namespace} = '';
 
+use Moose::Autobox;
 use Sys::Hostname ();
 use XML::Atom::Feed;
 use XML::Atom::Entry;
@@ -372,7 +373,18 @@ sub log : Local {
 
 # For legacy support.
 sub history : Local {
-  $_[1]->forward('shortlog');
+    my ( $self, $c ) = @_;
+    $self->shortlog($c);
+    my $project = $c->stash->{Project};
+    my $file = $project->get_object(
+        $project->hash_by_path(
+            $project->head_hash,
+            $c->stash->{filename}
+        )
+    );
+     $c->stash( action => 'history',
+               filetype => $file->type,
+           );
 }
 
 =head2 tree
diff --git a/root/_history.tt2 b/root/_history.tt2
new file mode 100644 (file)
index 0000000..83f09e1
--- /dev/null
@@ -0,0 +1,46 @@
+<table class='history listing'>
+ <thead>
+  <tr>
+   <th>sha1</th>
+   <th>time</th>
+   <th>author</th>
+   <th>message</th>
+   <th>actions</th>
+  </tr>
+ </thead>
+
+ <tfoot>
+  <tr>
+   <td>sha1</td>
+   <td>time</td>
+   <td>author</td>
+   <td>message</td>
+   <td>actions</td>
+  </tr>
+ </tfoot>
+
+ <tbody>
+ [% FOREACH line IN log_lines %]
+  <tr>
+   <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE '_chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
+   <td class='time-since' title='[% line.authored_time %]'>[% time_since(line.authored_time) %]</td>
+   <td class='author'>[% line.author.name | html %]</td>
+   <td>
+     [% short_cmt(line.comment) | html %]
+     [% INCLUDE '_refs.tt2' object = line.0 %]
+   </td>
+   <td class='action-list'>
+   [% IF filetype == 'tree' %]
+     <a href="[% c.uri_for("tree", {h=line.sha1, hb=line.sha1}) %]">tree</a>
+    [% ELSIF filetype == 'blob' %]
+     <a href="[% c.uri_for("blob", {hb=line.sha1, f=filename}) %]">blob</a>
+    [% END %]
+     <a href="[% c.uri_for("commitdiff", {h=line.sha1}) %]">commitdiff</a>
+    [% IF filetype == 'blob' %]
+     <a href="[% c.uri_for("blobdiff", {hb="HEAD", hpb=line.sha1, f=filename}) %]">diff to current</a>
+     [% END %]
+   </td>
+  </tr>
+ [% END %]
+ </tbody>
+</table>
index 8d1401c..c332d35 100644 (file)
@@ -1,9 +1,9 @@
 <div class='pager'>
  <a href='[% c.uri_for(action, {h=HEAD}) %]'>HEAD</a> &sect;
  [% IF log_lines.first.sha1 != commit.sha1 %]
- <a href='[% c.uri_for(action, {pg=page - 1, h=commit.sha1}) %]'>&laquo; prev</a>
+ <a href='[% c.request.uri_with(pg => page - 1) %]'>&laquo; prev</a>
  [% END %]
  [% IF log_lines.size == 50 %]
- <a href='[% c.uri_for(action, {pg=page + 1, h=commit.sha1}) %]'>next &raquo;</a>
+ <a href='[% c.request.uri_with(pg => page + 1) %]'>next &raquo;</a>
  [% END %]
 </div>
index 176f36a..a403aa4 100644 (file)
@@ -25,7 +25,7 @@
    </td>
    <td class='action-list'>
      <a href="[% c.uri_for(theact, {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">[% theact %]</a>
-     <a href="[% c.uri_for('shortlog', {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">history</a>
+     <a href="[% c.uri_for('history', {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">history</a>
      [% IF item.type == 'blob' %]
      <a href="[% c.uri_for('raw', {hb=commit.sha1, f=fullpath}) %]">raw</a>
      [% END %]
diff --git a/root/history.tt2 b/root/history.tt2
new file mode 100644 (file)
index 0000000..babb960
--- /dev/null
@@ -0,0 +1,7 @@
+[% INCLUDE 'nav/actions.tt2' object = commit %]
+
+[%
+  INCLUDE '_log_pager.tt2';
+  INCLUDE '_history.tt2';
+  INCLUDE '_log_pager.tt2';
+%]
index 7b6adb4..ce0f77a 100644 (file)
@@ -1,4 +1,4 @@
-[% PROCESS 'nav/actions.tt2' object = head %]
+[% PROCESS 'nav/actions.tt2' object = commit %]
 
 <div class='summary'>
 <!-- <div id='stats'>