~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-04-14 04:35:47 UTC
  • mfrom: (5147.3.7 diff-relock)
  • Revision ID: pqm@pqm.ubuntu.com-20100414043547-j4t4napw7duy07if
(andrew) Read-lock the trees and branches only once in cmd_diff.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1955
1955
    @display_command
1956
1956
    def run(self, revision=None, file_list=None, diff_options=None,
1957
1957
            prefix=None, old=None, new=None, using=None, format=None):
1958
 
        from bzrlib.diff import (get_trees_and_branches_to_diff,
 
1958
        from bzrlib.diff import (get_trees_and_branches_to_diff_locked,
1959
1959
            show_diff_trees)
1960
1960
 
1961
1961
        if (prefix is None) or (prefix == '0'):
1982
1982
 
1983
1983
        (old_tree, new_tree,
1984
1984
         old_branch, new_branch,
1985
 
         specific_files, extra_trees) = get_trees_and_branches_to_diff(
1986
 
            file_list, revision, old, new, apply_view=True)
 
1985
         specific_files, extra_trees) = get_trees_and_branches_to_diff_locked(
 
1986
            file_list, revision, old, new, self.add_cleanup, apply_view=True)
1987
1987
        return show_diff_trees(old_tree, new_tree, sys.stdout,
1988
1988
                               specific_files=specific_files,
1989
1989
                               external_diff_options=diff_options,