Merge lp:~mwhudson/loggerhead/which-mainline-merged into lp:loggerhead

Proposed by Michael Hudson-Doyle
Status: Merged
Merged at revision: not available
Proposed branch: lp:~mwhudson/loggerhead/which-mainline-merged
Merge into: lp:loggerhead
Diff against target: None lines
To merge this branch: bzr merge lp:~mwhudson/loggerhead/which-mainline-merged
Reviewer Review Type Date Requested Status
Martin Albisetti Approve
Review via email: mp+5963@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Michael Hudson-Doyle (mwhudson) wrote :

Hi there,

This branch adds to the revision page of non-mainline revisions the revno of the mainline revision that merged it.

Cheers,
mwh

Revision history for this message
Martin Albisetti (beuno) wrote :

Hi Michael,

Thanks for throwing this together so quickly :)

The only comment I have, is that I think that this:

> + if '.' in change.revid:

should read:

> + if '.' in change.revno:

no?

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'loggerhead/controllers/revision_ui.py'
--- loggerhead/controllers/revision_ui.py 2009-03-19 19:04:40 +0000
+++ loggerhead/controllers/revision_ui.py 2009-04-28 03:01:54 +0000
@@ -95,6 +95,15 @@
9595
96 h.add_branch_nicks(change)96 h.add_branch_nicks(change)
9797
98 if '.' in change.revid:
99 ri = self._history._rev_info
100 i = self._history._rev_indices[change.revid]
101 while ri[i][0][2] > 0:
102 i += 1
103 merged_in = ri[i][0][3]
104 else:
105 merged_in = None
106
98 # Directory Breadcrumbs107 # Directory Breadcrumbs
99 directory_breadcrumbs = (108 directory_breadcrumbs = (
100 util.directory_breadcrumbs(109 util.directory_breadcrumbs(
@@ -116,6 +125,7 @@
116 'filter_file_id': filter_file_id,125 'filter_file_id': filter_file_id,
117 'util': util,126 'util': util,
118 'history': h,127 'history': h,
128 'merged_in': merged_in,
119 'navigation': navigation,129 'navigation': navigation,
120 'query': query,130 'query': query,
121 'remember': remember,131 'remember': remember,
122132
=== modified file 'loggerhead/templatefunctions.py'
--- loggerhead/templatefunctions.py 2009-03-19 00:18:46 +0000
+++ loggerhead/templatefunctions.py 2009-04-28 03:01:54 +0000
@@ -57,12 +57,12 @@
5757
5858
59@templatefunc59@templatefunc
60def revisioninfo(url, branch, entry, file_changes=None, currently_showing=None):60def revisioninfo(url, branch, entry, file_changes=None, currently_showing=None, merged_in=None):
61 from loggerhead import util61 from loggerhead import util
62 return _pt('revisioninfo').expand(62 return _pt('revisioninfo').expand(
63 url=url, change=entry, branch=branch, util=util,63 url=url, change=entry, branch=branch, util=util,
64 file_changes=file_changes, currently_showing=currently_showing,64 file_changes=file_changes, currently_showing=currently_showing,
65 **templatefunctions)65 merged_in=merged_in, **templatefunctions)
6666
6767
68@templatefunc68@templatefunc
6969
=== modified file 'loggerhead/templates/revision.pt'
--- loggerhead/templates/revision.pt 2009-03-31 21:15:48 +0000
+++ loggerhead/templates/revision.pt 2009-04-28 03:01:54 +0000
@@ -96,7 +96,7 @@
96 </ul>96 </ul>
97 </tal:we-are-comparing>97 </tal:we-are-comparing>
9898
99 <tal:revision-info replace="structure python:revisioninfo(url, branch, change, file_changes, specific_path)" />99 <tal:revision-info replace="structure python:revisioninfo(url, branch, change, file_changes, specific_path, merged_in)" />
100 <tal:specific-path condition="not:specific_path">100 <tal:specific-path condition="not:specific_path">
101 <p class="expand show_if_js" id="expand_all"><a href="#">101 <p class="expand show_if_js" id="expand_all"><a href="#">
102 <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"102 <img tal:attributes="src python:branch.static_url('/static/images/treeCollapsed.png')"
103103
=== modified file 'loggerhead/templates/revisioninfo.pt'
--- loggerhead/templates/revisioninfo.pt 2009-03-19 00:18:46 +0000
+++ loggerhead/templates/revisioninfo.pt 2009-04-28 03:01:54 +0000
@@ -12,6 +12,11 @@
12 href python:url(['/revision', merge_point.revno], clear=1)"12 href python:url(['/revision', merge_point.revno], clear=1)"
13 tal:content="python:revno_with_nick(merge_point)"></a>13 tal:content="python:revno_with_nick(merge_point)"></a>
14 </div>14 </div>
15 <div class="mto" tal:condition="merged_in">
16 This revision was merged to the branch mainline in
17 <a tal:attributes="href python:url(['/revision', merged_in], clear=1)">revision
18 <tal:b content="merged_in"/></a>.
19 </div>
15 <div class="revid" tal:content="string:Revision ID: ${change/revid}"></div>20 <div class="revid" tal:content="string:Revision ID: ${change/revid}"></div>
16 <div class="information" tal:content="structure python:util.fixed_width(change.comment)"></div>21 <div class="information" tal:content="structure python:util.fixed_width(change.comment)"></div>
17 </div>22 </div>

Subscribers

People subscribed via source and target branches