~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to shelver.py

  • Committer: Aaron Bentley
  • Date: 2008-10-08 15:07:13 UTC
  • mto: This revision was merged to the branch mainline in revision 3823.
  • Revision ID: aaron@aaronbentley.com-20081008150713-f82doq153z3i0tig
Show selected changes before shelving

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
import sys
23
23
import tempfile
24
24
 
25
 
from bzrlib import (builtins, diff, errors, osutils, patches, workingtree)
 
25
from bzrlib import (
 
26
    builtins,
 
27
    delta,
 
28
    diff,
 
29
    errors,
 
30
    osutils,
 
31
    patches,
 
32
    workingtree)
26
33
from bzrlib.plugins.bzrtools import colordiff, hunk_selector
27
34
from bzrlib.plugins.bzrtools.patch import run_patch
28
35
from bzrlib.plugins.bzrtools.userinteractor import getchar
74
81
                        creator.shelve_rename(change[1])
75
82
                        changes_shelved += 1
76
83
            if changes_shelved > 0:
 
84
                print "Selected changes:"
 
85
                changes = creator.work_transform.iter_changes()
 
86
                reporter = delta._ChangeReporter(output_file=sys.stdout)
 
87
                delta.report_changes(changes, reporter)
77
88
                if (self.prompt_bool('Shelve %d change(s)?' %
78
89
                    changes_shelved, auto=self.auto_apply)):
79
90
                    shelf_id, shelf_file = self.manager.new_shelf()