Show More
@@ -1556,19 +1556,12 b' class localrepository(object):' | |||||
1556 | if merge and cctx.deleted(): |
|
1556 | if merge and cctx.deleted(): | |
1557 | raise error.Abort(_("cannot commit merge with missing files")) |
|
1557 | raise error.Abort(_("cannot commit merge with missing files")) | |
1558 |
|
1558 | |||
1559 | unresolved, driverresolved = False, False |
|
|||
1560 | ms = mergemod.mergestate(self) |
|
1559 | ms = mergemod.mergestate(self) | |
1561 | for f in status.modified: |
|
|||
1562 | if f in ms: |
|
|||
1563 | if ms[f] == 'u': |
|
|||
1564 | unresolved = True |
|
|||
1565 | elif ms[f] == 'd': |
|
|||
1566 | driverresolved = True |
|
|||
1567 |
|
1560 | |||
1568 | if unresolved: |
|
1561 | if list(ms.unresolved()): | |
1569 | raise error.Abort(_('unresolved merge conflicts ' |
|
1562 | raise error.Abort(_('unresolved merge conflicts ' | |
1570 | '(see "hg help resolve")')) |
|
1563 | '(see "hg help resolve")')) | |
1571 | if driverresolved or ms.mdstate() != 's': |
|
1564 | if ms.mdstate() != 's' or list(ms.driverresolved()): | |
1572 | raise error.Abort(_('driver-resolved merge conflicts'), |
|
1565 | raise error.Abort(_('driver-resolved merge conflicts'), | |
1573 | hint=_('run "hg resolve --all" to resolve')) |
|
1566 | hint=_('run "hg resolve --all" to resolve')) | |
1574 |
|
1567 |
@@ -43,4 +43,25 b' Mark the conflict as resolved and commit' | |||||
43 | (no more unresolved files) |
|
43 | (no more unresolved files) | |
44 | $ hg commit -m "Merged" |
|
44 | $ hg commit -m "Merged" | |
45 |
|
45 | |||
|
46 | Test that if a file is removed but not marked resolved, the commit still fails | |||
|
47 | (issue4972) | |||
|
48 | ||||
|
49 | $ hg up ".^" | |||
|
50 | 1 files updated, 0 files merged, 1 files removed, 0 files unresolved | |||
|
51 | $ hg merge 2 | |||
|
52 | merging A | |||
|
53 | warning: conflicts while merging A! (edit, then use 'hg resolve --mark') | |||
|
54 | 1 files updated, 0 files merged, 0 files removed, 1 files unresolved | |||
|
55 | use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon | |||
|
56 | [1] | |||
|
57 | $ hg rm --force A | |||
|
58 | $ hg commit -m merged | |||
|
59 | abort: unresolved merge conflicts (see "hg help resolve") | |||
|
60 | [255] | |||
|
61 | ||||
|
62 | $ hg resolve -ma | |||
|
63 | (no more unresolved files) | |||
|
64 | $ hg commit -m merged | |||
|
65 | created new head | |||
|
66 | ||||
46 | $ cd .. |
|
67 | $ cd .. |
General Comments 0
You need to be logged in to leave comments.
Login now