Merge lp:~rocky-burt/trac-bzr/bug-263300 into lp:trac-bzr

Proposed by Rocky Burt
Status: Rejected
Rejected by: Martin von Gagern
Proposed branch: lp:~rocky-burt/trac-bzr/bug-263300
Merge into: lp:trac-bzr
Diff against target: None lines
To merge this branch: bzr merge lp:~rocky-burt/trac-bzr/bug-263300
Reviewer Review Type Date Requested Status
Trac-bzr-team Pending
Review via email: mp+4305@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Rocky Burt (rocky-burt) wrote :

The _get_weave call has been replaced, and the tests that failed on that now run on bzr 1.12

Revision history for this message
Jelmer Vernooij (jelmer) wrote :

Rocky Burt wrote:
> Rocky Burt has proposed merging lp:~rocky-burt/trac-bzr/bug-263300 into lp:trac-bzr.
>
> Requested reviews:
> Trac-bzr-team (trac-bzr-team)
>
> The _get_weave call has been replaced, and the tests that failed on that now run on bzr 1.12
>
vote reject

This adds a call to Repository.get_revision_inventory, which is very
slow compared to e.g. _get_weave or get_parent_map(), especially on
repositories with large inventories.

repo.texts really should be used here to obtain the ancestry, as can be
done with get_parent_map() and bzrlib.graph.Graph.

Cheers,

jelmer

Revision history for this message
Rocky Burt (rocky-burt) wrote :

Sounds good, I'll take another stab at this later on.

- Rocky

On Tue, Mar 17, 2009 at 11:06 AM, Jelmer Vernooij <email address hidden> wrote:

> Rocky Burt wrote:
> > Rocky Burt has proposed merging lp:~rocky-burt/trac-bzr/bug-263300 into
> lp:trac-bzr.
> >
> > Requested reviews:
> > Trac-bzr-team (trac-bzr-team)
> >
> > The _get_weave call has been replaced, and the tests that failed on that
> now run on bzr 1.12
> >
> vote reject
>
> This adds a call to Repository.get_revision_inventory, which is very
> slow compared to e.g. _get_weave or get_parent_map(), especially on
> repositories with large inventories.
>
> repo.texts really should be used here to obtain the ancestry, as can be
> done with get_parent_map() and bzrlib.graph.Graph.
>
> Cheers,
>
> jelmer
> --
> https://code.launchpad.net/~rocky-burt/trac-bzr/bug-263300/+merge/4305<https://code.launchpad.net/%7Erocky-burt/trac-bzr/bug-263300/+merge/4305>
> You are subscribed to branch lp:trac-bzr.
>

Unmerged revisions

55. By Rocky Burt

Replaced _get_weave call with logic that queries the revision inventory.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'tracbzr/backend.py'
--- tracbzr/backend.py 2009-01-19 16:42:31 +0000
+++ tracbzr/backend.py 2009-03-09 15:23:58 +0000
@@ -712,17 +712,20 @@
712 It may also include a few revisions in which the revision_id did not712 It may also include a few revisions in which the revision_id did not
713 change, if the modification was subsequently undone.713 change, if the modification was subsequently undone.
714 """714 """
715 weave = self.tree._get_weave(self.entry.file_id)
716 file_ancestry = weave.get_ancestry(self.entry.revision)
717 # Can't use None here, because it's a legitimate revision id.715 # Can't use None here, because it's a legitimate revision id.
718 last_yielded = 'bogus:'716 last_yielded = 'bogus:'
717 file_id = self.entry.file_id
718 repo = self.repo
719 for num, revision_id, depth, revno, eom in \719 for num, revision_id, depth, revno, eom in \
720 self.bzr_repo.sorted_revision_history(self.branch):720 self.bzr_repo.sorted_revision_history(self.branch):
721 if depth == 0:721 if depth == 0:
722 last_mainline = revision_id722 last_mainline = revision_id
723 if last_mainline == last_yielded:723 if last_mainline == last_yielded:
724 continue724 continue
725 if revision_id in file_ancestry:725 if revision_id in ('null:', None):
726 continue
727 this_inv = repo.get_revision_inventory(revision_id)
728 if file_id in this_inv:
726 yield last_mainline729 yield last_mainline
727 last_yielded = last_mainline730 last_yielded = last_mainline
728 yield None731 yield None

Subscribers

People subscribed via source and target branches