~loggerhead-team/loggerhead/trunk-rich

« back to all changes in this revision

Viewing changes to loggerhead/history.py

  • Committer: Michael Hudson
  • Date: 2007-05-29 12:51:34 UTC
  • mfrom: (128.1.11 testing)
  • Revision ID: michael.hudson@canonical.com-20070529125134-fffimo5o8ynk64uu
merge from my testing branch:
 includes unit tests, but more interestingly the fix for #116869

Show diffs side-by-side

added added

removed removed

Lines of Context:
854
854
        
855
855
        entries = inv.entries()
856
856
        
857
 
        fetch_set = set()
858
 
        for filepath, entry in entries:
859
 
            fetch_set.add(entry.revision)
860
 
        change_dict = dict([(c.revid, c) for c in self.get_changes(list(fetch_set))])
861
 
        
862
857
        file_list = []
863
858
        for filepath, entry in entries:
864
859
            if posixpath.dirname(filepath) != path:
868
863
            pathname = filename
869
864
            if entry.kind == 'directory':
870
865
                pathname += '/'
871
 
            
872
 
            # last change:
 
866
 
873
867
            revid = entry.revision
874
 
            change = change_dict[revid]
 
868
            revision = self._branch.repository.get_revision(revid)
 
869
 
 
870
            change = util.Container(date=datetime.datetime.fromtimestamp(revision.timestamp),
 
871
                                    revno=self.get_revno(revid))
875
872
            
876
873
            file = util.Container(filename=filename, rich_filename=rich_filename, executable=entry.executable, kind=entry.kind,
877
874
                                  pathname=pathname, file_id=entry.file_id, size=entry.text_size, revid=revid, change=change)