Code review comment for lp:~thumper/loggerhead/branch_locations

Revision history for this message
Tim Penhey (thumper) wrote :

=== modified file 'loggerhead/apps/branch.py'
--- loggerhead/apps/branch.py 2008-07-17 23:52:30 +0000
+++ loggerhead/apps/branch.py 2008-08-04 21:35:47 +0000
@@ -23,10 +23,12 @@

 class BranchWSGIApp(object):

- def __init__(self, branch, friendly_name=None, config={}, graph_cache=None):
+ def __init__(self, branch, friendly_name=None, config={},
+ graph_cache=None, branch_link=None):
         self.branch = branch
         self._config = config
         self.friendly_name = friendly_name
+ self.branch_link = branch_link
         self.log = logging.getLogger('loggerhead.%s' % (friendly_name,))
         if graph_cache is None:
             graph_cache = bzrlib.lru_cache.LRUCache()

=== modified file 'loggerhead/templates/annotate.pt'
--- loggerhead/templates/annotate.pt 2008-07-28 21:40:58 +0000
+++ loggerhead/templates/annotate.pt 2008-08-04 21:35:47 +0000
@@ -15,8 +15,16 @@
   <body>

     <h1 metal:fill-slot="heading">
- <tal:block content="branch/friendly_name"></tal:block>
- <span>: <span tal:content="path"></span> (revision <tal:revno content="change/revno"></tal:revno>)</span>
+ <tal:has-link condition="branch/branch_link">
+ <a tal:attributes="href branch/branch_link"
+ tal:content="branch/friendly_name">
+ nice/branch/name
+ </a>
+ </tal:has-link>
+ <tal:no-link condition="not: branch/branch_link">
+ <tal:branch-name replace="branch/friendly_name" />
+ </tal:no-link>
+ <span>: <span tal:content="path"></span> (revision <tal:revno content="change/revno"></tal:revno>)</span>
     </h1>

     <div metal:fill-slot="content">

=== modified file 'loggerhead/templates/changelog.pt'
--- loggerhead/templates/changelog.pt 2008-07-28 21:40:58 +0000
+++ loggerhead/templates/changelog.pt 2008-08-04 21:35:47 +0000
@@ -14,7 +14,16 @@
     <body>
         <tal:block metal:fill-slot="heading">
          <h1>
- <tal:block content="branch/friendly_name"></tal:block>: changes
+ <tal:has-link condition="branch/branch_link">
+ <a tal:attributes="href branch/branch_link"
+ tal:content="branch/friendly_name">
+ nice/branch/name
+ </a>
+ </tal:has-link>
+ <tal:no-link condition="not: branch/branch_link">
+ <tal:branch-name replace="branch/friendly_name" />
+ </tal:no-link>
+ : changes
           <tal:block condition="filter_file_id">to <span tal:content="python:history.get_path(revid, filter_file_id)" /></tal:block>
           <tal:block condition="start_revid">from revision <tal:block content="python:history.get_revno(start_revid)" /></tal:block>
           <tal:block condition="query">matching <tal:block content="query" /></tal:block>

=== modified file 'loggerhead/templates/inventory.pt'
--- loggerhead/templates/inventory.pt 2008-07-28 21:40:58 +0000
+++ loggerhead/templates/inventory.pt 2008-08-04 21:35:47 +0000
@@ -11,8 +11,17 @@
   <body>

     <h1 metal:fill-slot="heading">
- <tal:block content="branch/friendly_name" />: viewing
- <span><tal:block content="path" /></span> for revision <span><tal:revno content="change/revno"></tal:revno></span>
+ <tal:has-link condition="branch/branch_link">
+ <a tal:attributes="href branch/branch_link"
+ tal:content="branch/friendly_name">
+ nice/branch/name
+ </a>
+ </tal:has-link>
+ <tal:no-link condition="not: branch/branch_link">
+ <tal:branch-name replace="branch/friendly_name" />
+ </tal:no-link>
+ : viewing
+ <span tal:content="path" /> for revision <span tal:content="change/revno"/>
     </h1>

     <div metal:fill-slot="content">

=== modified file 'loggerhead/templates/macros.pt'
--- loggerhead/templates/macros.pt 2008-07-28 21:40:58 +0000
+++ loggerhead/templates/macros.pt 2008-08-04 21:35:47 +0000
@@ -32,7 +32,7 @@
             </div>
           </div>
         </form>
-
+
         <tal:block tal:condition="not:fileview_active">
         <li><a tal:attributes="href python:url('/changes', clear=1);
                                title string:Changes;
@@ -49,7 +49,7 @@
         </tal:block>
       </ul>
       <div id="loggerheadCont">
-
+
          <div id="search_terms"></div>

         <h1 metal:define-slot="heading"></h1>

=== modified file 'loggerhead/templates/revision.pt'
--- loggerhead/templates/revision.pt 2008-07-28 21:40:58 +0000
+++ loggerhead/templates/revision.pt 2008-08-04 21:35:47 +0000
@@ -15,7 +15,17 @@
     <body>

       <tal:block metal:fill-slot="heading">
- <h1><tal:block content="branch/friendly_name" /><span>: <tal:revno content="change/revno"></tal:revno>
+ <h1>
+ <tal:has-link condition="branch/branch_link">
+ <a tal:attributes="href branch/branch_link"
+ tal:content="branch/friendly_name">
+ nice/branch/name
+ </a>
+ </tal:has-link>
+ <tal:no-link condition="not: branch/branch_link">
+ <tal:branch-name replace="branch/friendly_name" />
+ </tal:no-link>
+ <span>: <tal:revno content="change/revno"></tal:revno>
         <tal:compare-to condition="python:compare_revid is not None">
           (compared to revision <tal:block content="python:history.get_revno(compare_revid)" />)
           </tal:compare-to>

« Back to merge proposal