~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to colordiff.py

  • Committer: Adeodato Simó
  • Date: 2006-07-01 21:26:27 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: dato@net.com.org.es-20060701212627-cff8927ffb4af78e
Get command objects via get_cmd_object(), instead of directly importing
them from bzrlib.builtins.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import sys
19
19
from os.path import expanduser
20
20
 
21
 
from bzrlib.builtins import cmd_diff
 
21
from bzrlib.commands import get_cmd_object
22
22
from bzrlib.patches import (hunk_from_header, InsertLine, RemoveLine,
23
23
                            ContextLine, Hunk)
24
24
 
113
113
    real_stdout = sys.stdout
114
114
    sys.stdout = DiffWriter(real_stdout)
115
115
    try:
116
 
        cmd_diff().run(*args, **kwargs)
 
116
        get_cmd_object('diff').run(*args, **kwargs)
117
117
    finally:
118
118
        sys.stdout = real_stdout