~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to graph.py

MergeĀ fromĀ ab-baz2bzr

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
from dotgraph import RSVG_OUTPUT_TYPES, DOT_OUTPUT_TYPES, Edge, invoke_dot_html
20
20
from bzrlib.branch import Branch
21
21
from bzrlib.errors import BzrCommandError, NoCommonRoot, NoSuchRevision
22
 
from bzrlib.fetch import greedy_fetch
23
22
from bzrlib.graph import node_distances, select_farthest
24
23
from bzrlib.revision import combined_graph, revision_graph
25
24
from bzrlib.revision import MultipleRevisionSources
112
111
        self.other_branch = other_branch
113
112
        revision_a = self.branch.last_revision()
114
113
        if other_branch is not None:
115
 
            greedy_fetch(branch, other_branch)
 
114
            branch.fetch(other_branch)
116
115
            revision_b = self.other_branch.last_revision()
117
116
            try:
118
117
                self.root, self.ancestors, self.descendants, self.common = \
119
 
                    combined_graph(revision_a, revision_b, self.branch)
 
118
                    combined_graph(revision_a, revision_b,
 
119
                                   self.branch.repository)
120
120
            except bzrlib.errors.NoCommonRoot:
121
121
                raise bzrlib.errors.NoCommonAncestor(revision_a, revision_b)
122
122
        else:
123
123
            self.root, self.ancestors, self.descendants = \
124
 
                revision_graph(revision_a, branch)
 
124
                revision_graph(revision_a, branch.repository)
125
125
            self.common = []
126
126
 
127
127
        self.n_history = branch.revision_history()
174
174
            color = "#33ff99"
175
175
 
176
176
        label = [name]
177
 
        committer, message, date = get_rev_info(node, self.branch)
 
177
        committer, message, date = get_rev_info(node, self.branch.repository)
178
178
        if committer is not None:
179
179
            label.append(committer)
180
180
 
232
232
        m = Branch.open_containing(merge_branch)[0]
233
233
    else:
234
234
        m = None
235
 
    b.lock_read()
 
235
    b.lock_write()
236
236
    try:
237
237
        if m is not None:
238
238
            m.lock_read()