[PATCH] test-mq-qpush-fail - failing case for push of missing patch

Mads Kiilerich mads at kiilerich.com
Sun Jan 18 10:50:15 CST 2009


# HG changeset patch
# User Mads Kiilerich <mads at kiilerich.com>
# Date 1232297363 -3600
# Node ID e4d7ac1cf83e40effc8eb5efc5b8a52f04d3dfac
# Parent  f7256cd9beffe9efd85957368781a88171ed9977
test-mq-qpush-fail - failing case for push of missing patch

If a user somehow ends up with a reference to a missing patch file in his
.hg/patches/series file then he will get a confusing error message when he
tries to push:

	Unable to read missing-patch
	errors during apply, please fix and refresh the-top-most-applied-patch

Perhaps the message could be something like

	Unable to read missing-patch
	errors during apply, please fix missing-patch and re-apply

I don't see how it can be relevant to mention the good top patch in this case.

diff --git a/tests/test-mq-qpush-fail b/tests/test-mq-qpush-fail
--- a/tests/test-mq-qpush-fail
+++ b/tests/test-mq-qpush-fail
@@ -41,3 +41,10 @@
 
 echo '% bar should be gone; other unknown/ignored files should still be around'
 hg status -A
+
+echo '% preparing qpush of a missing patch'
+hg qpop -a
+hg qpush
+rm .hg/patches/patch2
+echo '% now we expect the push to fail, but it should NOT complain about patch1'
+hg qpush
diff --git a/tests/test-mq-qpush-fail.out b/tests/test-mq-qpush-fail.out
--- a/tests/test-mq-qpush-fail.out
+++ b/tests/test-mq-qpush-fail.out
@@ -17,3 +17,11 @@
 ? untracked-file
 I .hgignore
 C foo
+% preparing qpush of a missing patch
+no patches applied
+applying patch1
+now at: patch1
+% now we expect the push to fail, but it should NOT complain about patch1
+applying patch2
+Unable to read patch2
+errors during apply, please fix patch2 and re-apply


More information about the Mercurial-devel mailing list