~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: John Arbash Meinel
  • Date: 2007-03-01 01:07:53 UTC
  • mto: (2255.11.3 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: john@arbash-meinel.com-20070301010753-ga844l1djraerga7
show_diff_trees() should lock any extra trees it is passed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
397
397
    """
398
398
    old_tree.lock_read()
399
399
    try:
 
400
        if extra_trees is not None:
 
401
            for tree in extra_trees:
 
402
                tree.lock_read()
400
403
        new_tree.lock_read()
401
404
        try:
402
405
            return _show_diff_trees(old_tree, new_tree, to_file,
405
408
                                    extra_trees=extra_trees)
406
409
        finally:
407
410
            new_tree.unlock()
 
411
            if extra_trees is not None:
 
412
                for tree in extra_trees:
 
413
                    tree.unlock()
408
414
    finally:
409
415
        old_tree.unlock()
410
416