Commits

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
files."

Comments (0)

Files changed (1)

tortoisehg/hgqt/chunks.py

         if not dchunks:
             self.showMessage.emit(_('No deletable chunks'))
             return
+        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):
             repo.thgbackup(ctx._path)
             fp = util.atomictempfile(ctx._path, 'wb')