~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/shelf_ui.py

  • Committer: Guilherme Salgado
  • Date: 2009-12-21 14:15:36 UTC
  • mto: This revision was merged to the branch mainline in revision 4955.
  • Revision ID: salgado@canonical.com-20091221141536-kmclo10yl1bgkf5g
Change Unshelveer.show_changes() to write the diff to stdout.

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
from bzrlib import (
24
24
    builtins,
25
 
    commands,
26
25
    delta,
27
26
    diff,
28
27
    errors,
476
475
    def show_changes(self, merger):
477
476
        """Show the changes that this operation specifies."""
478
477
        tree_merger = merger.make_merger()
479
 
        # This implicitly shows the changes via the reporter, so we're done...
 
478
        # This implicitly shows the changes via the reporter.
480
479
        tt = tree_merger.make_preview_transform()
 
480
        # And now we show the diff that would've been applied if this was for
 
481
        # real.
 
482
        new_tree = tt.get_preview_tree()
 
483
        diff.show_diff_trees(merger.this_tree, new_tree, sys.stdout)
481
484
        tt.finalize()