Index: peerReviewBrowser.py
===================================================================
--- peerReviewBrowser.py	(revision 10338)
+++ peerReviewBrowser.py	(working copy)
@@ -21,6 +21,7 @@
 from trac.web import IRequestHandler, RequestDone
 from trac.web.chrome import add_link, add_stylesheet
 from trac.wiki import wiki_to_html, wiki_to_oneliner, IWikiSyntaxProvider
+from trac.versioncontrol.api import *
 from trac.versioncontrol.web_ui.util import *
 from trac.util import sorted, embedded_numbers
 
@@ -87,7 +88,9 @@
         path = req.args.get('path', '/')
         rev = req.args.get('rev')
 
-        repos = self.env.get_repository(req.authname)
+        reposDic = RepositoryManager(self.env).get_all_repositories()
+        reposName = reposDic.get(reposDic.keys()[0])['name']
+        repos = self.env.get_repository(reposName)
 
         try:
             node = get_existing_node(self.env, repos, path, rev)
@@ -113,13 +116,14 @@
             'log_href': util.escape(self.env.href.log(path, rev=rev or None)),
             'path_links': path_links,
             'dir': node.isdir and self._render_directory(req, repos, node, rev),
-            'file': node.isfile and self._render_file(req, context, repos, node, rev) 
+            'file': node.isfile and self._render_file(req, context, repos, node, rev) ,
+            'reponame': reposName
         }
 
         add_stylesheet(req, 'common/css/browser.css')
         add_stylesheet(req, 'common/css/code.css')
         
-	return 'peerReviewBrowser.html', data, None
+        return 'peerReviewBrowser.html', data, None
 
     # Internal methods
 
Index: peerReviewPerform.py
===================================================================
--- peerReviewPerform.py	(revision 10338)
+++ peerReviewPerform.py	(working copy)
@@ -25,6 +25,7 @@
 from trac.util import escape
 from codereview.dbBackend import *
 from trac.web.chrome import add_stylesheet
+from trac.versioncontrol.api import *
 from trac.versioncontrol.web_ui.util import *
 from trac.web.chrome import add_link, add_stylesheet
 import string
@@ -88,7 +89,7 @@
         return req.path_info == '/peerReviewPerform'
                                         
     def process_request(self, req):
-
+        self.env.log.debug("0")
         data = {}
 
         if req.perm.has_permission('CODE_REVIEW_MGR'):
@@ -103,16 +104,19 @@
         data['search'] = "no"
         data['options'] = "no"
 
+        self.env.log.debug("1")
         #get the fileID from the request arguments
         idFile = req.args.get('IDFile')
         self.fileID = idFile
+        self.env.log.debug("2")
         #if the file id is not set - display an error message
         if idFile == None:
             data['error.type'] = "TracError"
             data['error.title'] = "File ID Error"
             data['error.message'] = "No file ID given - unable to load page."
-            return 'error.cs', data, None
+            return 'error.html', data, None
 
+        self.env.log.debug("3")
         #get the database
         db = self.env.get_db_cnx()
         dbBack = dbBackend(db)
@@ -123,15 +127,20 @@
         #make the thumbtac image global so the line annotator has access to it
         self.imagePath = self.env.href.chrome() + '/hw/images/thumbtac11x11.gif'
 
+        self.env.log.debug("4")
         #if the file is not found in the database - display an error message
         if resultFile == None:
             data['error.type'] = "TracError"
             data['error.title'] = "File ID Error"
             data['error.message'] = "Unable to locate given file ID in database."
-            return 'error.cs', data, None
+            return 'error.html', data, None
 
+        self.env.log.debug("5")
         #get the respository
-        repos = self.env.get_repository(req.authname)
+        #repos = self.env.get_repository(req.authname)
+        reposDic = RepositoryManager(self.env).get_all_repositories()
+        reposName = reposDic.get(reposDic.keys()[0])['name']
+        repos = self.env.get_repository(reposName)
         #get the file attributes
         data['review_path'] = resultFile.Path
         data['review_version'] = resultFile.Version
@@ -142,13 +151,15 @@
         self.lineEnd = resultFile.LineEnd
         self.lineStart = resultFile.LineStart
 
+        self.env.log.debug("6")
         #if the repository can't be found - display an error message
         if(repos == None):
             data['error.type'] = "TracError"
             data['error.title'] = "Subversion Repository Error"
             data['error.message'] = "Unable to acquire subversion repository."
-            return 'error.cs', data, None
+            return 'error.html', data, None
 
+        self.env.log.debug("7")
         #get the correct location - using revision number and repository path
         try:
             node = get_existing_node(self.env, repos, resultFile.Path, resultFile.Version)
@@ -156,24 +167,28 @@
             youngest_rev = repos.youngest_rev
             node = get_existing_node(self.env, repos, resultFile.Path, youngest_rev)
 
+        self.env.log.debug("8")
         #if the node can't be found - display error message
         if(node == None):
             data['error.type'] = "TracError"
             data['error.title'] = "Subversion Node Error"
             data['error.message'] = "Unable to locate subversion node for this file."
-            return 'error.cs', data, None
+            return 'error.html', data, None
 
+        self.env.log.debug("9")
         # Generate HTML preview - this code take from Trac - refer to their documentation
         mime_type = node.content_type
         if not mime_type or mime_type == 'application/octet-stream':
             mime_type = get_mimetype(node.name) or mime_type or 'text/plain'
 
+        self.env.log.debug("10")
         ctpos = mime_type.find('charset=')
         if ctpos >= 0:
             charset = mime_type[ctpos + 8:]
         else:
             charset = None
 
+        self.env.log.debug("11")
         mimeview = Mimeview(self.env)
         path = req.args.get('path', '/')
         rev = None
@@ -183,6 +198,7 @@
                 plain_href = self.env.href.peerReviewBrowser(node.path, rev=rev and node.rev, format='txt')
                 add_link(req, 'alternate', plain_href, 'Plain Text', 'text/plain')
 
+        self.env.log.debug("12")
         #assign the preview to a variable for clearsilver
         context = Context.from_request(req, 'source', path, node.created_rev)
         preview_data = mimeview.preview_data(context, content, len(content),
@@ -190,8 +206,10 @@
                                              None,
                                              annotations=['performCodeReview'])
         
+        self.env.log.debug("13")
         data['file'] = preview_data['rendered'];
         
+        self.env.log.debug("14")
         add_stylesheet(req, 'common/css/browser.css')
         add_stylesheet(req, 'common/css/code.css')
         return 'peerReviewPerform.html', data, None
Index: ReviewerStruct.py
===================================================================
--- ReviewerStruct.py	(revision 10338)
+++ ReviewerStruct.py	(working copy)
@@ -35,8 +35,9 @@
 
     def save(self, db):
         #Add information to a new database entry
-        cursor = db.cursor();
+        #cursor = db.cursor();
         try:
+            cursor = db.cursor();
             cursor.execute("INSERT INTO Reviewers "
                            "(IDReview, Reviewer, Status, Vote) "
                            "VALUES(%s, %s, %s, %s) ",
@@ -44,6 +45,7 @@
             db.commit()
         except:
             #Update information in existing database entry
+            cursor = db.cursor();
             cursor.execute("UPDATE Reviewers SET "
                            "Status=%s, Vote=%s WHERE IDReview=%s AND Reviewer=%s",
                            (self.Status, self.Vote, self.IDReview, self.Reviewer))
Index: templates/peerReviewBrowser.html
===================================================================
--- templates/peerReviewBrowser.html	(revision 10338)
+++ templates/peerReviewBrowser.html	(working copy)
@@ -2,12 +2,34 @@
     xmlns:py="http://genshi.edgewall.org/"
     xmlns:xi="http://www.w3.org/2001/XInclude" py:strip="">
 
-<xi:include href="macros.html" />
+<!-- xi:include href="macros.html" / -->
+<xi:include href="/macros.html"><xi:fallback/></xi:include>
 <head>
 <link rel="stylesheet" href="/trac-mysql/chrome/common/css/code.css" type="text/css" media="screen, projector, print" />
 <link rel="stylesheet" href="/trac-mysql/chrome/common/css/browser.css" type="text/css" media="screen, projector, print" />
 </head>
 <body>
+ <!--!  Display a sequence of path components. 
+- 
+-      Each component is a link to the corresponding location in the browser. 
+--> 
+<py:def function="browser_path_links(path_links,rev=None, reponame=None)"> 
+    <py:for each="idx, part in enumerate(path_links)"><py:with  
+        vars="first = idx == 0; last = idx == len(path_links) - 1"><a  
+            class="${classes('pathentry', first=first)}" 
+            title="${first and 'Go to root directory' or 'View ' + part.name}" 
+            href="$part.href">$part.name</a><py:if  
+        test="not last"><span class="pathentry sep">/</span></py:if></py:with></py:for> 
+    <py:if test="rev"><span class="pathentry sep">@</span> 
+        <a class="pathentry" href="${href.changeset(rev, reponame)}" title="View changeset $rev">$rev</a> 
+    </py:if> 
+    <br style="clear: both" /> 
+</py:def>
+
+<py:def function="sizeinfo(size)"><span title="${_('%(size)s bytes', size=size)}">${
+    pretty_size(size)
+}</span></py:def>
+
 <py:def function="sortable_th(order, desc, class_, title)">
 	<th class="$class_${order == class_ and (desc and ' desc' or ' asc') or ''}">
                   <a title="Sort by $class_${order == class_ and not desc and
@@ -18,7 +40,7 @@
 </py:def>
 
 <div id="content" class="browser">
-	<h2>${browser_path_links(path_links, stickyrev)}</h2>
+	<h2>${browser_path_links(path_links, stickyrev, reponame)}</h2>
 	
       <div id="jumprev">
           <div>
