Mercurial > public > mercurial-scm > hg
comparison mercurial/commands.py @ 19439:f4148c36f0aa
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.
author | Florence Laguzet <florence.laguzet@gmail.com> |
---|---|
date | Wed, 17 Jul 2013 23:58:04 +0200 |
parents | 7228cc98ca7d |
children | 4a0d0616c47d |
comparison
equal
deleted
inserted
replaced
19438:e8bcd7b0a653 | 19439:f4148c36f0aa |
---|---|
4156 fm.condwrite(ui.verbose, 'mode type', '%s %1s ', mode[fl], char[fl]) | 4156 fm.condwrite(ui.verbose, 'mode type', '%s %1s ', mode[fl], char[fl]) |
4157 fm.write('path', '%s\n', f) | 4157 fm.write('path', '%s\n', f) |
4158 fm.end() | 4158 fm.end() |
4159 | 4159 |
4160 @command('^merge', | 4160 @command('^merge', |
4161 [('f', 'force', None, _('force a merge with outstanding changes')), | 4161 [('f', 'force', None, |
4162 _('force a merge including outstanding changes (DEPRECATED)')), | |
4162 ('r', 'rev', '', _('revision to merge'), _('REV')), | 4163 ('r', 'rev', '', _('revision to merge'), _('REV')), |
4163 ('P', 'preview', None, | 4164 ('P', 'preview', None, |
4164 _('review revisions to merge (no merge is performed)')) | 4165 _('review revisions to merge (no merge is performed)')) |
4165 ] + mergetoolopts, | 4166 ] + mergetoolopts, |
4166 _('[-P] [-f] [[-r] REV]')) | 4167 _('[-P] [-f] [[-r] REV]')) |