[#223] - Add reactor code for backlinking commits

Rick Copeland Rick Copeland 2010-04-27

added ForgeGit/forgegit/model/git_repo.py
changed ForgeGit/forgegit/model/__init__.py
changed ForgeGit/forgegit/reactors/reactors.py
changed ForgeGit/forgegit/widgets/templates/revision.html
changed ForgeGit/forgegit/git_main.py
changed pyforge/pyforge/lib/helpers.py
changed pyforge/pyforge/model/auth.py
copied ForgeGit/forgegit/model/git.py -> ForgeGit/forgegit/templates/commit.html
ForgeGit/forgegit/model/git_repo.py Diff Switch to side-by-side view
Loading...
ForgeGit/forgegit/model/__init__.py Diff Switch to side-by-side view
Loading...
ForgeGit/forgegit/reactors/reactors.py Diff Switch to side-by-side view
Loading...
ForgeGit/forgegit/widgets/templates/revision.html Diff Switch to side-by-side view
Loading...
ForgeGit/forgegit/git_main.py Diff Switch to side-by-side view
Loading...
pyforge/pyforge/lib/helpers.py Diff Switch to side-by-side view
Loading...
pyforge/pyforge/model/auth.py Diff Switch to side-by-side view
Loading...
ForgeGit/forgegit/model/git.py to ForgeGit/forgegit/templates/commit.html
--- a/ForgeGit/forgegit/model/git.py
+++ b/ForgeGit/forgegit/templates/commit.html
@@ -1,16 +1,29 @@
-from ming.orm.mapped_class import MappedClass
-from ming.orm.property import FieldProperty
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+                      "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+      xmlns:py="http://genshi.edgewall.org/"
+      xmlns:xi="http://www.w3.org/2001/XInclude">
 
-from pyforge.model import Repository
+  <xi:include href="${g.pyforge_templates}/master.html"/>
 
-class GitRepository(Repository):
-    class __mongometa__:
-        name='git-repository'
+  <head>
+    <meta content="text/html; charset=UTF-8" http-equiv="content-type" py:replace="''"/>
+    <title>Git Commit</title>
+  </head>
 
-    def index(self):
-        result = Repository.index(self)
-        result.update(
-            type_s='GitRepository')
-        return result
-
-MappedClass.compile_all()
+  <body>
+    ${c.revision_widget.display(value=commit)}
+    <h2>Parent(s)</h2>
+    <ul>
+      <li py:for="c in commit.parents">
+        <a href="${c.url()}">$c.sha</a>
+      </li>
+    </ul>
+    <h2>Diffs</h2>
+    <ul>
+      <li py:for="d in commit.diff(commit.parents[0].sha)">
+        <pre>$d</pre>
+      </li>
+    </ul>
+  </body>
+</html>