Ticket #836 (closed enhancement: fixed)

Opened 21 months ago

Last modified 3 days ago

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:1 Changed 21 months ago by marcusl

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.

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

see #46 for the background on this. Part 1 is removing Change.links. The other part is a better display of changes, perhaps with a simple list of the latest changes - #858.

comment:4 Changed 21 months ago by dustin

  • Keywords database added

comment:5 Changed 18 months ago by dustin

  • Milestone changed from 0.8.2 to 0.8.3

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:7 Changed 9 months ago by dustin

  • Milestone changed from 0.8.4 to 0.8.5

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

Note: See TracTickets for help on using tickets.