~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to shelf_ui.py

  • Committer: Aaron Bentley
  • Date: 2008-10-11 17:36:00 UTC
  • mto: This revision was merged to the branch mainline in revision 3823.
  • Revision ID: aaron@aaronbentley.com-20081011173600-9c2lom0ac78zh1gw
Clean up I/O handling

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
                        creator.shelve_rename(change[1])
85
85
                        changes_shelved += 1
86
86
            if changes_shelved > 0:
87
 
                print "Selected changes:"
 
87
                trace.note("Selected changes:")
88
88
                changes = creator.work_transform.iter_changes()
89
 
                reporter = delta._ChangeReporter(output_file=sys.stdout)
 
89
                reporter = delta._ChangeReporter()
90
90
                delta.report_changes(changes, reporter)
91
91
                if (self.prompt_bool('Shelve %d change(s)?' %
92
92
                    changes_shelved, auto=self.auto_apply)):
94
94
                                                           self.message)
95
95
                    trace.note('Changes shelved with id "%d".' % shelf_id)
96
96
            else:
97
 
                print 'No changes to shelve.'
 
97
                trace.warning('No changes to shelve.')
98
98
        finally:
99
99
            shutil.rmtree(self.tempdir)
100
100
            creator.finalize()
116
116
        if auto:
117
117
            return True
118
118
        message = question + ' [yNfq]'
119
 
        print message,
 
119
        sys.stdout.write(message)
120
120
        char = getchar()
121
 
        print "\r" + ' ' * len(message) + '\r',
 
121
        sys.stdout.write("\r" + ' ' * len(message) + '\r')
 
122
        sys.stdout.flush()
122
123
        if char == 'y':
123
124
            return True
124
125
        elif char == 'f':