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
1=== modified file 'tracbzr/backend.py'
2--- tracbzr/backend.py 2009-01-19 16:42:31 +0000
3+++ tracbzr/backend.py 2009-03-09 15:23:58 +0000
4@@ -712,17 +712,20 @@
5 It may also include a few revisions in which the revision_id did not
6 change, if the modification was subsequently undone.
7 """
8- weave = self.tree._get_weave(self.entry.file_id)
9- file_ancestry = weave.get_ancestry(self.entry.revision)
10 # Can't use None here, because it's a legitimate revision id.
11 last_yielded = 'bogus:'
12+ file_id = self.entry.file_id
13+ repo = self.repo
14 for num, revision_id, depth, revno, eom in \
15 self.bzr_repo.sorted_revision_history(self.branch):
16 if depth == 0:
17 last_mainline = revision_id
18 if last_mainline == last_yielded:
19 continue
20- if revision_id in file_ancestry:
21+ if revision_id in ('null:', None):
22+ continue
23+ this_inv = repo.get_revision_inventory(revision_id)
24+ if file_id in this_inv:
25 yield last_mainline
26 last_yielded = last_mainline
27 yield None

Subscribers

People subscribed via source and target branches