Yuya Nishihara  committed 0472f43

chunks: improve confirmation message for revertall

It asks whether to revert file completely or to remove chunks but keep file
entry. "Remove all file changes" could be misread as "remove changes of all

  • Participants
  • Parent commits 23dcd48

Comments (0)

Files changed (1)

File tortoisehg/hgqt/

         if not dchunks:
             self.showMessage.emit(_('No deletable chunks'))
+        ctx = self.ctx
         kchunks = [c for c in chunks[1:] if not c.selected]
         revertall = False
-        if not kchunks and qtlib.QuestionMsgBox(_('No chunks remain'),
-                                                _('Remove all file changes?')):
-            revertall = True
-        ctx = self.ctx
+        if not kchunks:
+            if isinstance(ctx, patchctx):
+                revertmsg = _('Completely remove file from patch?')
+            else:
+                revertmsg = _('Revert all file changes?')
+            revertall = qtlib.QuestionMsgBox(_('No chunks remain'), revertmsg)
         if isinstance(ctx, patchctx):
             fp = util.atomictempfile(ctx._path, 'wb')