--- a/tests/test-commit-unresolved.t Sun Nov 15 22:18:48 2015 +0100
+++ b/tests/test-commit-unresolved.t Mon Nov 30 16:31:28 2015 -0800
@@ -43,4 +43,25 @@
(no more unresolved files)
$ hg commit -m "Merged"
+Test that if a file is removed but not marked resolved, the commit still fails
+(issue4972)
+
+ $ hg up ".^"
+ 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
+ $ hg merge 2
+ merging A
+ warning: conflicts while merging A! (edit, then use 'hg resolve --mark')
+ 1 files updated, 0 files merged, 0 files removed, 1 files unresolved
+ use 'hg resolve' to retry unresolved file merges or 'hg update -C .' to abandon
+ [1]
+ $ hg rm --force A
+ $ hg commit -m merged
+ abort: unresolved merge conflicts (see "hg help resolve")
+ [255]
+
+ $ hg resolve -ma
+ (no more unresolved files)
+ $ hg commit -m merged
+ created new head
+
$ cd ..