--- a/mercurial/cmdutil.py Sat Aug 30 02:39:08 2014 +0200
+++ b/mercurial/cmdutil.py Sun Aug 31 13:01:00 2014 +0200
@@ -2640,6 +2640,10 @@
if opts.get('no_backup'):
backup = check = discard
+ backupanddel = actions['remove']
+ if not opts.get('no_backup'):
+ backupanddel = actions['drop']
+
disptable = (
# dispatch table:
# file state
@@ -2658,7 +2662,7 @@
# Added in working directory
(dsadded, actions['forget'], discard),
# Added since target, have local modification
- (modadded, actions['remove'], discard),
+ (modadded, backupanddel, backup),
# Added since target but file is missing in working directory
(deladded, actions['drop'], discard),
# Removed since target, before working copy parent