Mercurial > public > mercurial-scm > hg-stable
diff mercurial/commands.py @ 26784:c0aab5961876
commands.resolve: don't allow users to mark or unmark driver-resolved files
Users will often be in the habit of running 'hg resolve --mark --all' after
resolving merge conflicts in source files. We need to make sure this doesn't
cause driver-resolved files to be marked.
'hg resolve --all' will resolve driver-resolved files, though.
The weird conditional structure is to accommodate an upcoming patch.
author | Siddharth Agarwal <sid0@fb.com> |
---|---|
date | Thu, 15 Oct 2015 01:15:22 -0700 |
parents | 50213e4d25bf |
children | d773150d71f2 |
line wrap: on
line diff
--- a/mercurial/commands.py Thu Oct 15 01:11:50 2015 -0700 +++ b/mercurial/commands.py Thu Oct 15 01:15:22 2015 -0700 @@ -5617,6 +5617,19 @@ didwork = True + # don't let driver-resolved files be marked + if ms[f] == "d": + exact = m.exact(f) + if mark: + if exact: + ui.warn(_('not marking %s as it is driver-resolved\n') + % f) + elif unmark: + if exact: + ui.warn(_('not unmarking %s as it is driver-resolved\n') + % f) + continue + if mark: ms.mark(f, "r") elif unmark: