Mercurial > public > mercurial-scm > hg-stable
comparison 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 |
comparison
equal
deleted
inserted
replaced
26783:50213e4d25bf | 26784:c0aab5961876 |
---|---|
5615 if not m(f): | 5615 if not m(f): |
5616 continue | 5616 continue |
5617 | 5617 |
5618 didwork = True | 5618 didwork = True |
5619 | 5619 |
5620 # don't let driver-resolved files be marked | |
5621 if ms[f] == "d": | |
5622 exact = m.exact(f) | |
5623 if mark: | |
5624 if exact: | |
5625 ui.warn(_('not marking %s as it is driver-resolved\n') | |
5626 % f) | |
5627 elif unmark: | |
5628 if exact: | |
5629 ui.warn(_('not unmarking %s as it is driver-resolved\n') | |
5630 % f) | |
5631 continue | |
5632 | |
5620 if mark: | 5633 if mark: |
5621 ms.mark(f, "r") | 5634 ms.mark(f, "r") |
5622 elif unmark: | 5635 elif unmark: |
5623 ms.mark(f, "u") | 5636 ms.mark(f, "u") |
5624 else: | 5637 else: |