merge: deprecate the --force option
authorFlorence Laguzet <florence.laguzet@gmail.com>
Wed, 17 Jul 2013 23:58:04 +0200
changeset 19439 f4148c36f0aa
parent 19438 e8bcd7b0a653
child 19440 4a0d0616c47d
merge: deprecate the --force option The --force option in merge does not make what people think it does so it may not be visible to everyone. I have local changes and want to pull one's changes which made 2 heads. The --force option in help says -f --force force a merge with outstanding changes so I can expect that I can use it to force the merge and commit it in my local repository without taking my local changes into account. But merging with -f keeps local changes and "add" them: they must be committed or reverted before doing the merge commit. The merge -f cannot be reverted so it leads my repository in a bad state: cannot commit merge and don't want to revert/commit local changes yet. Message in help have been updated to emphasize the fact that local changes are included in the merge.
mercurial/commands.py
--- a/mercurial/commands.py	Thu Jul 18 09:42:44 2013 -0700
+++ b/mercurial/commands.py	Wed Jul 17 23:58:04 2013 +0200
@@ -4158,7 +4158,8 @@
     fm.end()
 
 @command('^merge',
-    [('f', 'force', None, _('force a merge with outstanding changes')),
+    [('f', 'force', None,
+      _('force a merge including outstanding changes (DEPRECATED)')),
     ('r', 'rev', '', _('revision to merge'), _('REV')),
     ('P', 'preview', None,
      _('review revisions to merge (no merge is performed)'))