~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to graph.py

  • Committer: Aaron Bentley
  • Date: 2005-12-03 20:42:25 UTC
  • mfrom: (147.4.25 trunk)
  • mto: (147.4.27 trunk)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: aaron.bentley@utoronto.ca-20051203204225-25678bc921de4fc1
MergeĀ fromĀ lifeless

Show diffs side-by-side

added added

removed removed

Lines of Context:
237
237
        m = Branch.open_containing(merge_branch)[0]
238
238
    else:
239
239
        m = None
240
 
    grapher = Grapher(b, m)
241
 
    relations = grapher.get_relations(collapse)
 
240
    b.lock_read()
 
241
    try:
 
242
        if m is not None:
 
243
            m.lock_read()
 
244
        try:
 
245
            grapher = Grapher(b, m)
 
246
            relations = grapher.get_relations(collapse)
 
247
        finally:
 
248
            if m is not None:
 
249
                m.unlock()
 
250
    finally:
 
251
        b.unlock()
242
252
 
243
253
    ext = filename.split('.')[-1]
244
254
    output = dot_output(relations, ranking)