~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:06:29 UTC
  • mto: This revision was merged to the branch mainline in revision 3823.
  • Revision ID: aaron@aaronbentley.com-20081008150629-8ey3cckvsfcpusc3
Regularize prompts

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
                        creator.shelve_rename(change[1])
75
75
                        changes_shelved += 1
76
76
            if changes_shelved > 0:
77
 
                if (self.prompt_bool('Shelve %d change(s)? [y/n]' %
 
77
                if (self.prompt_bool('Shelve %d change(s)?' %
78
78
                    changes_shelved, auto=self.auto_apply)):
79
79
                    shelf_id, shelf_file = self.manager.new_shelf()
80
80
                    try:
104
104
            auto = self.auto
105
105
        if auto:
106
106
            return True
107
 
        print question,
 
107
        print question + ' [yNfq]',
108
108
        char = getchar()
109
 
        print "\r",
 
109
        print ""
110
110
        if char == 'y':
111
111
            return True
112
112
        elif char == 'f':
113
113
            self.auto = True
114
114
            return True
 
115
        if char == 'q':
 
116
            sys.exit(0)
115
117
        else:
116
118
            return False
117
119
 
144
146
        if not self.auto:
145
147
            for hunk in parsed.hunks:
146
148
                self.diff_writer.write(str(hunk))
147
 
                if not self.prompt_bool('Shelve? [y/n/f]'):
 
149
                if not self.prompt_bool('Shelve?'):
148
150
                    final_patch.hunks.append(hunk)
149
151
        patched_text = self.get_patched_text(file_id, final_patch)
150
152
        creator.shelve_text(file_id, patched_text)