Switch to side-by-side view

--- a/ForgeGit/forgegit/git_main.py
+++ b/ForgeGit/forgegit/git_main.py
@@ -65,7 +65,7 @@
         repo = c.app.repo
         if repo and repo.status == 'ready':
             branches= [ b.name for b in repo.branches ]
-            tags = [ t.name for t in repo.tags ]
+            tags = [ t.name for t in repo.repo_tags() ]
             if branches:
                 links.append(SitemapEntry('Branches'))
                 for b in branches:
@@ -123,17 +123,13 @@
 
 class RootController(object):
 
-    def __init__(self):
-        setattr(self, 'feed.atom', self.feed)
-        setattr(self, 'feed.rss', self.feed)
-
     @expose('forgegit.templates.index')
     def index(self, offset=0, branch='master'):
         offset=int(offset)
         repo = c.app.repo
         if repo and c.app.repo.status=='ready':
-            revisions = list(islice(repo.iter_commits(branch), offset, offset+10))
-        else:
+            revisions = list(islice(repo.log(branch), offset, offset+10))
+        else: # pragma no cover
             revisions = []
         c.revision_widget=W.revision_widget
         next_link='?' + urlencode(dict(offset=offset+10, branch=branch))
@@ -143,51 +139,6 @@
                     revisions=revisions,
                     next_link=next_link,
                     offset=offset)
-
-    @with_trailing_slash
-    @expose('forgewiki.templates.search')
-    @validate(dict(q=validators.UnicodeString(if_empty=None),
-                   history=validators.StringBool(if_empty=False)))
-    def search(self, q=None, history=None):
-        'local wiki search'
-        results = []
-        count=0
-        if not q:
-            q = ''
-        else:
-            search_query = '''%s
-            AND is_history_b:%s
-            AND project_id_s:%s
-            AND mount_point_s:%s''' % (
-                q, history, c.project._id, c.app.config.options.mount_point)
-            results = search(search_query)
-            if results: count=results.hits
-        return dict(q=q, history=history, results=results or [], count=count)
-
-    @without_trailing_slash
-    @expose()
-    @validate(dict(
-            since=DateTimeConverter(if_empty=None),
-            until=DateTimeConverter(if_empty=None),
-            offset=validators.Int(if_empty=None),
-            limit=validators.Int(if_empty=None)))
-    def feed(self, since=None, until=None, offset=None, limit=None):
-        if request.environ['PATH_INFO'].endswith('.atom'):
-            feed_type = 'atom'
-        else:
-            feed_type = 'rss'
-        title = 'Recent changes to %s' % c.app.config.options.mount_point
-        feed = Feed.feed(
-            {'artifact_reference.mount_point':c.app.config.options.mount_point,
-             'artifact_reference.project_id':c.project._id},
-            feed_type,
-            title,
-            c.app.url,
-            title,
-            since, until, offset, limit)
-        response.headers['Content-Type'] = ''
-        response.content_type = 'application/xml'
-        return feed.writeString('utf-8')
 
     @expose()
     def _lookup(self, hash, *remainder):
@@ -200,7 +151,7 @@
 
     @expose('forgegit.templates.commit')
     def index(self):
-        commit = c.app.repo.commit(rev=self._hash)
+        commit = c.app.repo.revision(rev=self._hash)
         c.revision_widget=W.revision_widget
         return dict(commit=commit)