[PATCH 03 of 10] histedit-test: test that extra revision are detected

pierre-yves.david at logilab.fr pierre-yves.david at logilab.fr
Thu Apr 18 10:29:18 CDT 2013


# HG changeset patch
# User Pierre-Yves David <pierre-yves.david at logilab.fr>
# Date 1366285717 -7200
#      Thu Apr 18 13:48:37 2013 +0200
# Node ID c5c25ba5ed3adcda963433227e7cc37bdf30ebde
# Parent  6f96687e9afe8573bee0dce320e66ba6842c1237
histedit-test: test that extra revision are detected

We had not test for this case.

diff --git a/tests/test-histedit-arguments.t b/tests/test-histedit-arguments.t
--- a/tests/test-histedit-arguments.t
+++ b/tests/test-histedit-arguments.t
@@ -78,10 +78,21 @@ Test that missing revision are detected
   > pick 08d98a8350f3 4 five
   > EOF
   abort: must specify a rule for each changeset once
   [255]
 
+Test that extra revision are detected
+---------------------------------------
+
+  $ HGEDITOR=cat hg histedit "tip^^" --commands - << EOF
+  > pick 6058cbb6cfd7 0 one
+  > pick c8e68270e35a 3 four
+  > pick 08d98a8350f3 4 five
+  > EOF
+  abort: may not use changesets other than the ones listed
+  [255]
+
 Test short version of command
 ---------------------------------------
 
 Note: we use various number of white space between command name and changeset
 short hash. This test issue3893.


More information about the Mercurial-devel mailing list