Ticket #836 (closed enhancement: fixed)
remove Change.links
| Reported by: | dustin | Owned by: | |
|---|---|---|---|
| Priority: | major | Milestone: | 0.8.6 |
| Version: | 0.8.0 | Keywords: | database, web |
| Cc: |
Description
Change.asDict does some weird stuff with files and links:
def asDict(self):
'''returns a dictonary with suitable info for html/mail rendering'''
result = {}
files = []
for file in self.files:
link = filter(lambda s: s.find(file) != -1, self.links)
if len(link) == 1:
url = link[0]
else:
url = None
files.append(dict(url=url, name=file))
files = sorted(files, cmp=lambda a,b: a['name'] < b['name'])
What is this all about? I don't know how to test it, because I don't know what it's supposed to do..
Change History
comment:2 Changed 21 months ago by marcusl
self.links might not be used anymore. If so, we can just prune it and be happy. :)
I suppose some ChangeSource:s (via PB et.al.) might set these URLs, but I'd prefer that to be urlified in Webstatus, as we do with rev-ids.
comment:3 Changed 21 months ago by dustin
- Summary changed from figure out what Change.links is to remove Change.links
comment:6 Changed 14 months ago by dustin
- Keywords database, web added; database removed
- Milestone changed from 0.8.3 to 0.8.4
Oo, removing code, I like doing that.
This is a schema change, though, so it will need to wait until SQLAlchemy lands.
comment:8 Changed 3 days ago by Dustin J. Mitchell
- Status changed from new to closed
- Resolution set to fixed
Drop support for change links
These were never well-defined, and were only honestly created by CVS. They are much better implemented with a revlink function on the status API. Fixes #836.
Changeset: 139222f3d6edb052e6870789e68298ba6cd2811e
![[Buildbot Logo]](/chrome/site/header-text-transparent.png)
I think each file can have a corresponding URL in self.links. The for loop matches them. It was there before I wrote that function (i.e. I just adapted the previous html-paste code to an asDict() instead.)
The sorting is just to get files in order, for easier human reading of the commited files list.