Commits

Friedrich Kastner-Masilko committed ea19c3c

fixed makewritable for 1.4 and TortoiseHg 0.9

  • Participants
  • Parent commits c565115

Comments (0)

Files changed (1)

                                    _('&No, leave this file read-only'),
                                    _('&All, make all remaining files writable without further notice'),
                                    _('&?'))
-                        r = (self.currentUi.prompt(_('make \'%s\' writable?') % f + _(' [Yna?] '), choices) or 'y').lower()
-                        if r == '?':
+                        r = self.currentUi.promptchoice(_('make \'%s\' writable?') % f + _(' (Yna?) '), choices)
+                        if r == 0:
+                            doit = True
+                            break
+                        elif r == 1:
+                            break
+                        elif r == 2:
+                            self.makewritable = True;
+                            doit = True;
+                            break
+                        elif r == 3:
                             c = opener.__doc__.find('y - make the file writable')
                             for l in opener.__doc__[c:].splitlines():
                                 if l: self.currentUi.write(_(l.strip()), '\n')
                             continue
-                        elif r == 'y':
-                            doit = True
-                            break
-                        elif r == 'n':
-                            break
-                        elif r == 'a':
-                            self.makewritable = True;
-                            doit = True;
-                            break
                 if doit:
                     os.chmod(f, s.st_mode | stat.S_IWRITE)
                     self.currentUi.status(_('made \'%s\' writable\n') % f)