~abentley/bzrtools/bzrtools.dev

« back to all changes in this revision

Viewing changes to hunk_selector.py

  • Committer: Michael Ellerman
  • Date: 2005-11-28 08:59:54 UTC
  • mto: (0.3.1 shelf-dev) (325.1.2 bzrtools)
  • mto: This revision was merged to the branch mainline in revision 334.
  • Revision ID: michael@ellerman.id.au-20051128085954-ce1fa812eeeab31d
Restart after a done was broken, and we weren't resetting the print logic at
the end of the loop either, so we wouldn't print the hunk after a 'dr'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
        self.patches = patches
29
29
        self.total_hunks = 0
30
30
 
31
 
        self.last_printed = -1
32
31
        self.interactor = UserInteractor()
33
32
        self.interactor.set_item_callback(self.hunk_callback)
34
33
        self.interactor.set_start_callback(self.start_callback)
45
44
 
46
45
    # Called at the start of the main loop
47
46
    def start_callback(self):
 
47
        self.last_printed = -1
48
48
        self.interactor.set_prompt('Shelve this change? ' \
49
49
            '(%(count)d of %(total)d)')
50
50
        self.interactor.set_options(self.standard_options)