Merge lp://staging/~beuno/loggerhead/revno2head into lp://staging/loggerhead

Proposed by Martin Albisetti
Status: Merged
Merged at revision: not available
Proposed branch: lp://staging/~beuno/loggerhead/revno2head
Merge into: lp://staging/loggerhead
To merge this branch: bzr merge lp://staging/~beuno/loggerhead/revno2head
Reviewer Review Type Date Requested Status
Paul Hummer (community) Approve
Review via email: mp+1456@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Martin Albisetti (beuno) wrote :

This makes the URLs in the files view use "head:" if you're looking at tip, so you have permanent URLs.

236. By Martin Albisetti

Dumb error we have had for a while

Revision history for this message
Paul Hummer (rockstar) wrote :
Download full text (7.1 KiB)

Martin-

  Quick turnaround for a branch! Kudos! I have one small nitpicky thing, but
other than that, r=me

> === modified file 'loggerhead/controllers/inventory_ui.py'
> --- loggerhead/controllers/inventory_ui.py 2008-10-25 19:26:49 +0000
> +++ loggerhead/controllers/inventory_ui.py 2008-10-30 11:49:30 +0000
> @@ -70,11 +70,10 @@ class InventoryUI(TemplatedBranchView):
> file_id = history.get_file_id(revid, path)
> else:
> path = inv.id2path(file_id)
> -
> +
> if file_id is None:
> file_id = inv.root.file_id
>
> -
> idpath = inv.get_idpath(file_id)
> if len(idpath) > 1:
> updir = dirname(path)[1:]
> @@ -95,6 +94,11 @@ class InventoryUI(TemplatedBranchView):
> raise HTTPServerError('Could not fetch changes')
>
> change = history.get_changes([ revid ])[0]
> + # If we're looking at the tip, use head: in the URL instead
> + if revid == history.last_revid:
> + revno_url = 'head:'
> + else:
> + revno_url = history.get_revno(revid)
> # add parent & merge-point branch-nick info, in case it's useful
> history.get_branch_nicks([ change ])
>
> @@ -107,6 +111,7 @@ class InventoryUI(TemplatedBranchView):
> start_revid = None
> sort_type = None
> change = None
> + revno_url = revno_url
> path = "/"
> idpath = None
> updir = None

This is weird. This variable value probably doesn't need to be assigned to
itself. While it's not a technical issue, it just reads funny.

> @@ -117,6 +122,7 @@ class InventoryUI(TemplatedBranchView):
> 'branch': self._branch,
> 'util': util,
> 'revid': revid,
> + 'revno_url': revno_url,
> 'change': change,
> 'file_id': file_id,
> 'path': path,
>
> === modified file 'loggerhead/templates/changelog.pt'
> --- loggerhead/templates/changelog.pt 2008-10-18 00:23:09 +0000
> +++ loggerhead/templates/changelog.pt 2008-10-30 11:49:30 +0000
> @@ -61,8 +61,7 @@
> alt="collapse all" /> collapse all</a>
> </p>
> <!-- Table -->
> - <table id="logentries"
> - tal:define="subcolspan python:4-bool(all_same_author)">
> + <table id="logentries">
> <tr class="logheader">
> <td class="revisionnumber">Rev</td>
> <td class="expandcell">&nbsp;</td>
>
> === modified file 'loggerhead/templates/inventory.pt'
> --- loggerhead/templates/inventory.pt 2008-10-25 18:01:55 +0000
> +++ loggerhead/templates/inventory.pt 2008-10-30 11:49:30 +0000
> @@ -55,7 +55,7 @@
>
> <tr class="blueRow0" tal:condition="python:updir is not None">
> <td class="summcell" colspan="6">
> - <a tal:attributes="href python:url(['/files', change.revno, updir])" class="link">
> + <a tal:attributes="href python:url(['/files', revno_url, updir])" class="link">
> <img tal:attribute...

Read more...

Revision history for this message
Paul Hummer (rockstar) :
review: Approve
Revision history for this message
Martin Albisetti (beuno) wrote :

On Thu, Oct 30, 2008 at 11:57 AM, Paul Hummer <email address hidden> wrote:
> Quick turnaround for a branch! Kudos! I have one small nitpicky thing, but
> other than that, r=me

Thanks for the quick review!

>> @@ -107,6 +111,7 @@ class InventoryUI(TemplatedBranchView):
>> start_revid = None
>> sort_type = None
>> change = None
>> + revno_url = revno_url

This is dumb, I changed things, and forgot to remove this.
I'll remove that and merge.

Thanks!

--
Martin

237. By Martin Albisetti

Remove cruft, r=rockstar

Subscribers

People subscribed via source and target branches