~treaves/trac-bzr/trac-bzr

« back to all changes in this revision

Viewing changes to tracbzr/backend.py

  • Committer: Martin von Gagern
  • Date: 2012-06-20 19:42:41 UTC
  • mfrom: (107.3.1 bug1015281)
  • Revision ID: martin.vgagern@gmx.net-20120620194241-9bzf3bcmy78ce5kt
Merge fix for created_path value.

Show diffs side-by-side

added added

removed removed

Lines of Context:
987
987
        self.branch = branch
988
988
        self.tree = revisiontree
989
989
        self.entry = entry
990
 
        rev_string = bzr_repo.string_rev(branch, self.get_content_revision())
 
990
        content_revision = self.get_content_revision()
 
991
        rev_string = bzr_repo.string_rev(branch, content_revision)
991
992
        BzrNode.__init__(self, bzr_repo, path, rev_string, self.kind)
992
993
        # XXX I am not sure if this makes any sense but it does make
993
994
        # the links in the changeset viewer work.
 
995
        self.root_path = path[:-len(self.tree.id2path(self.entry.file_id))]
994
996
        self.created_rev = self.rev
995
 
        self.created_path = self.path
996
 
        self.root_path = path[:-len(self.tree.id2path(self.entry.file_id))]
 
997
        created_tree = (
 
998
            self.branch.repository.revision_tree(content_revision))
 
999
        self.created_path = urlutils.joinpath(
 
1000
            self.root_path,
 
1001
            self.branch.repository.revision_tree(content_revision)
 
1002
                .id2path(self.entry.file_id))
 
1003
        self.bzr_repo.log.debug('path=%r, content_revision=%r, created_rev=%r, created_path=%r' %
 
1004
                                (path, content_revision, self.created_rev, self.created_path))
997
1005
 
998
1006
    def get_properties(self):
999
1007
        # Must at least return an empty dict here (base class version raises).