~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/diff.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-08-20 08:06:53 UTC
  • mfrom: (5383.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20100820080653-klig2pem60bl1hz6
(mbp) handle diff --using --diff-options

Show diffs side-by-side

added added

removed removed

Lines of Context:
736
736
                     path_encoding)
737
737
 
738
738
    @classmethod
739
 
    def make_from_diff_tree(klass, command_string):
 
739
    def make_from_diff_tree(klass, command_string, external_diff_options=None):
740
740
        def from_diff_tree(diff_tree):
741
 
            return klass.from_string(command_string, diff_tree.old_tree,
 
741
            full_command_string = [command_string]
 
742
            if external_diff_options is not None:
 
743
                full_command_string += ' ' + external_diff_options
 
744
            return klass.from_string(full_command_string, diff_tree.old_tree,
742
745
                                     diff_tree.new_tree, diff_tree.to_file)
743
746
        return from_diff_tree
744
747
 
912
915
        :param using: Commandline to use to invoke an external diff tool
913
916
        """
914
917
        if using is not None:
915
 
            extra_factories = [DiffFromTool.make_from_diff_tree(using)]
 
918
            extra_factories = [DiffFromTool.make_from_diff_tree(using, external_diff_options)]
916
919
        else:
917
920
            extra_factories = []
918
921
        if external_diff_options: