diff tests/test-commit-unresolved @ 6888:7c36a4fb05a3

make commit fail when committing unresolved files
author Stefano Tortarolo <stefano.tortarolo@gmail.com>
date Wed, 13 Aug 2008 20:18:40 -0500
parents
children 93609576244e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-commit-unresolved	Wed Aug 13 20:18:40 2008 -0500
@@ -0,0 +1,40 @@
+#!/bin/sh
+
+echo "[extensions]" >> $HGRCPATH
+echo "graphlog=" >> $HGRCPATH
+
+function addcommit {
+    echo $1 > $1
+    hg add $1
+    hg commit -d "${2} 0" -u test -m $1
+}
+function commit {
+    hg commit -d "${2} 0" -u test -m $1
+}
+
+hg init a
+cd a
+addcommit "A" 0
+addcommit "B" 1
+echo "C" >> A
+commit "C" 2
+
+hg update -C 0
+echo "D" >> A
+commit "D" 3
+
+echo
+echo "% Merging a conflict araises"
+hg merge
+
+echo
+echo "% Correct the conflict without marking the file as resolved"
+echo "ABCD" > A
+hg commit -m "Merged"
+
+echo
+echo "% Mark the conflict as resolved and commit"
+hg resolve -m A
+hg commit -m "Merged"
+
+exit 0